Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bosh-stemcell/lib/bosh/stemcell/stemcell_packager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def manifest(disk_format)
"sha1" => image_checksum,
"operating_system" => "#{definition.operating_system.name}-#{definition.operating_system.version}",
"stemcell_formats" => infrastructure.stemcell_formats,
"agent_features" => [],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this pr also add the hashed-password capability or do we split that into its own pr?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh i see:

http-password-hmac-sha256 will be added in the same PR that bumps stemcell_builder/stages/bosh_go_agent/assets/bosh-agent-version to a release that includes cloudfoundry/bosh-agent#487.

im guessing it wont literally be in the same pr? since that bump is automated, there will be a follow up which adds this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex agent here. A follow-up capability PR after the automated supporting-agent bump is safe. Until activation, create-env keeps using plaintext. The feature must be advertised only once the pinned agent supports it. Updated the PR wording to describe that sequence.

"cloud_properties" => manifest_cloud_properties(disk_format, infrastructure, stemcell_name)
}
end
Expand Down
11 changes: 11 additions & 0 deletions bosh-stemcell/spec/bosh/stemcell/stemcell_packager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def additional_cloud_properties
"version" => "1234",
"bosh_protocol" => 1,
"api_version" => 3,
"agent_features" => [],
"sha1" => "c1ebdefc3f8282a9d7d47803fb5030b61ffc793d", # SHA-1 of image above
"operating_system" => "ubuntu-jammy",
"stemcell_formats" => ["stemcell-format-a", "stemcell-format-b"],
Expand All @@ -124,6 +125,16 @@ def additional_cloud_properties
})
end

it "includes the agent feature list in the packaged manifest" do
packager.package(disk_format)

manifest = YAML.load_file(File.join(work_dir, "stemcell/stemcell.MF"))
expect(manifest["agent_features"]).to eq([])
contents, _, status = Open3.capture3("tar", "xOf", File.join(tarball_dir, "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-jammy-go_agent.tgz"), "stemcell.MF")
expect(status.success?).to be(true)
expect(YAML.safe_load(contents)["agent_features"]).to eq(manifest["agent_features"])
end

it "returns the path of the created tarball" do
expect(packager.package(disk_format)).to eq(
File.join(tarball_dir, "bosh-stemcell-1234-fake_infra-fake_hypervisor-ubuntu-jammy-go_agent.tgz")
Expand Down
Loading