Skip to content

Commit 8cd80ff

Browse files
authored
Merge branch 'main' into dependabot/bundler/ffi-yajl-gte-2.2.3-and-lt-3.1.0
2 parents 19c7f84 + 6ca4d6d commit 8cd80ff

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [v3.3.2](https://github.com/chef-partners/kitchen-vra/tree/v3.3.2)
4+
5+
[Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v3.3.1...v3.3.2)
6+
7+
- 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.
8+
39
## [v3.3.1](https://github.com/chef-partners/kitchen-vra/tree/v3.3.1)
410

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

lib/kitchen/driver/vra.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class Vra < Kitchen::Driver::Base # rubocop:disable Metrics/ClassLength
4949
default_config :request_timeout, 600
5050
default_config :request_refresh_rate, 2
5151
default_config :server_ready_retries, 1
52+
default_config :unique_name, false
5253
default_config :deployment_name do |driver|
5354
driver&.instance&.platform&.name
5455
end
@@ -152,6 +153,9 @@ def request_server
152153
deployment_request = catalog_request.submit
153154

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

156160
wait_for_request(deployment_request)
157161
raise "The vRA request failed: #{deployment_request.completion_details}" if deployment_request.failed?
@@ -232,10 +236,11 @@ def catalog_request # rubocop:disable Metrics/MethodLength
232236
deployment_params = {
233237
image_mapping: config[:image_mapping],
234238
flavor_mapping: config[:flavor_mapping],
235-
name: config[:deployment_name],
236239
project_id: config[:project_id],
237240
version: config[:version],
238-
}
241+
}.tap do |h|
242+
h[:name] = config[:deployment_name] unless config[:unique_name]
243+
end
239244

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

lib/kitchen/driver/vra_version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020

2121
module Kitchen
2222
module Driver
23-
VRA_VERSION = "3.3.1"
23+
VRA_VERSION = "3.3.2"
2424
end
2525
end

0 commit comments

Comments
 (0)