kitchen-azurerm 1.5.3 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/kitchen/driver/azurerm.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a47e2282b156031bc220f784b2fc11d9e689450a1681bcab96e00edf4c40d075
|
4
|
+
data.tar.gz: 69d729b824fdb55d6849dcd602be3729079bb12db1f51b729d9f1b4635df5c73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f18774a15ca7ee6b741ebb1a07f8e0e9d684a1253424c3a8d5589f029eacab23bf6e647264e05bbcebaf1401b3182a3c20cf1ce74ef80c4b349880971efa1ee1
|
7
|
+
data.tar.gz: '059138541c0d19ffc591fad58292eececc2f70e1b4dfca5a3a5352c7a612b240505e28e34966132b413fdb74331dfd4fd0b607716c8fec0630157fb4bb69ca84'
|
data/README.md
CHANGED
@@ -190,7 +190,7 @@ The following properties are able to be specified in the `driver` section of the
|
|
190
190
|
#### vm_name
|
191
191
|
|
192
192
|
* _string_ : Optional name for vm instances to create.
|
193
|
-
* Default Value: `"
|
193
|
+
* Default Value: `"tk-#{SecureRandom.hex(6)[0..11]}"` (Randomly generated 12 character name prefixed with `tk-`)
|
194
194
|
|
195
195
|
#### nic_name
|
196
196
|
|
@@ -84,9 +84,7 @@ module Kitchen
|
|
84
84
|
SecureRandom.base64(25)
|
85
85
|
end
|
86
86
|
|
87
|
-
default_config
|
88
|
-
"vm"
|
89
|
-
end
|
87
|
+
default_config :vm_name, nil
|
90
88
|
|
91
89
|
default_config(:nic_name) do |_config|
|
92
90
|
""
|
@@ -253,7 +251,7 @@ module Kitchen
|
|
253
251
|
end
|
254
252
|
|
255
253
|
if config[:nic_name].to_s == ""
|
256
|
-
vmnic = "nic-#{
|
254
|
+
vmnic = "nic-#{state[:vm_name]}"
|
257
255
|
else
|
258
256
|
vmnic = config[:nic_name]
|
259
257
|
end
|
@@ -376,9 +374,10 @@ module Kitchen
|
|
376
374
|
# @return [Hash] Updated Hash of state values.
|
377
375
|
def validate_state(state = {})
|
378
376
|
state[:uuid] = SecureRandom.hex(8) unless existing_state_value?(state, :uuid)
|
377
|
+
state[:vm_name] = config[:vm_name] || "tk-#{state[:uuid][0..11]}" unless existing_state_value?(state, :vm_name)
|
379
378
|
state[:server_id] = "vm#{state[:uuid]}" unless existing_state_value?(state, :server_id)
|
380
379
|
state[:azure_resource_group_name] = azure_resource_group_name unless existing_state_value?(state, :azure_resource_group_name)
|
381
|
-
%i{subscription_id
|
380
|
+
%i{subscription_id azure_environment use_managed_disks}.each do |config_element|
|
382
381
|
state[config_element] = config[config_element] unless existing_state_value?(state, config_element)
|
383
382
|
end
|
384
383
|
state.delete(:password) unless instance.transport[:ssh_key].nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-azurerm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Preston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure_mgmt_network
|