Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/bundler/ffi-yajl-gte-2.2.3-and-lt…
Browse files Browse the repository at this point in the history
…-3.1.0
  • Loading branch information
Stromweld authored Jun 17, 2024
2 parents 19c7f84 + 6ca4d6d commit 8cd80ff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [v3.3.2](https://github.com/chef-partners/kitchen-vra/tree/v3.3.2)

[Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v3.3.1...v3.3.2)

- This change helps in getting unique name of a deployment. The new deployement name will be deployment_deploymentId. We need to pass **unique_name** as true(unique_name: true) in the driver configuration.

## [v3.3.1](https://github.com/chef-partners/kitchen-vra/tree/v3.3.1)

[Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v3.3.0...v3.3.1)
Expand Down
9 changes: 7 additions & 2 deletions lib/kitchen/driver/vra.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Vra < Kitchen::Driver::Base # rubocop:disable Metrics/ClassLength
default_config :request_timeout, 600
default_config :request_refresh_rate, 2
default_config :server_ready_retries, 1
default_config :unique_name, false
default_config :deployment_name do |driver|
driver&.instance&.platform&.name
end
Expand Down Expand Up @@ -152,6 +153,9 @@ def request_server
deployment_request = catalog_request.submit

info("Catalog request #{deployment_request.id} submitted.")
if config[:unique_name]
info("Deployment name is deployment_#{deployment_request.id}")
end

wait_for_request(deployment_request)
raise "The vRA request failed: #{deployment_request.completion_details}" if deployment_request.failed?
Expand Down Expand Up @@ -232,10 +236,11 @@ def catalog_request # rubocop:disable Metrics/MethodLength
deployment_params = {
image_mapping: config[:image_mapping],
flavor_mapping: config[:flavor_mapping],
name: config[:deployment_name],
project_id: config[:project_id],
version: config[:version],
}
}.tap do |h|
h[:name] = config[:deployment_name] unless config[:unique_name]
end

catalog_request = vra_client.catalog.request(config[:catalog_id], deployment_params)

Expand Down
2 changes: 1 addition & 1 deletion lib/kitchen/driver/vra_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

module Kitchen
module Driver
VRA_VERSION = "3.3.1"
VRA_VERSION = "3.3.2"
end
end

0 comments on commit 8cd80ff

Please sign in to comment.