kitchen-azurerm 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2e163e7f873cd30975117e7959c9f860980e67c6a57a57cceea3b5784a15c88
|
|
4
|
+
data.tar.gz: 842ce181806cd18fd1ce064222311cb24f7702b5c569f9e57c1971ef0e8a2843
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57922ce563572966e695342e34e01eb89c04bb30528c0931baa41b28bcf043ed2d6ccbd45141df8febbbc1739b038d9307ed666b0bd349b33b626df685f2ca70
|
|
7
|
+
data.tar.gz: 44e874be227fa2625d1b73091c80b1402e548b5bf7851da030737d80f58f479409585c7b5248d95c67e42d536bbada211127612cd037a38bf4b2257b214c66bc
|
|
@@ -63,6 +63,10 @@ module Kitchen
|
|
|
63
63
|
# Every supported cloud, keyed by its downcased name so that lookups are
|
|
64
64
|
# case-insensitive.
|
|
65
65
|
#
|
|
66
|
+
# +AzureGermanCloud+ is kept only so that an existing kitchen.yml naming
|
|
67
|
+
# it still loads: Microsoft closed that cloud in 2021, and its endpoints
|
|
68
|
+
# no longer answer.
|
|
69
|
+
#
|
|
66
70
|
# @return [Hash{String => Environment}]
|
|
67
71
|
ALL = [
|
|
68
72
|
Environment.new("Azure",
|
|
@@ -22,11 +22,12 @@ module Kitchen
|
|
|
22
22
|
|
|
23
23
|
# The HTTP status code of the failing response.
|
|
24
24
|
#
|
|
25
|
-
# @return [Integer]
|
|
25
|
+
# @return [Integer, nil] nil when the error was raised before a
|
|
26
|
+
# response arrived, as the token providers do.
|
|
26
27
|
attr_reader :status
|
|
27
28
|
|
|
28
29
|
# @param message [String] human-readable summary.
|
|
29
|
-
# @param status [Integer] HTTP status code.
|
|
30
|
+
# @param status [Integer, nil] HTTP status code, when there was one.
|
|
30
31
|
# @param body [Hash] parsed ARM error body.
|
|
31
32
|
def initialize(message, status: nil, body: {})
|
|
32
33
|
super(message)
|
|
@@ -2,6 +2,7 @@ require "kitchen"
|
|
|
2
2
|
|
|
3
3
|
require_relative "azure_credentials"
|
|
4
4
|
require_relative "azure/errors"
|
|
5
|
+
require_relative "azurerm_version"
|
|
5
6
|
require "securerandom" unless defined?(SecureRandom)
|
|
6
7
|
require "base64" unless defined?(Base64)
|
|
7
8
|
autoload :SSHKey, "sshkey"
|
|
@@ -29,8 +30,21 @@ module Kitchen
|
|
|
29
30
|
# @return [Azure::ArmClient, nil]
|
|
30
31
|
attr_accessor :arm_client
|
|
31
32
|
|
|
33
|
+
# The writer needs a docstring of its own: one comment above an
|
|
34
|
+
# attr_accessor is copied to both methods, so the argument the writer
|
|
35
|
+
# takes can only be described here. The directive has to come after the
|
|
36
|
+
# accessor - placed before it, the accessor overwrites it.
|
|
37
|
+
|
|
38
|
+
# @!method arm_client=(client)
|
|
39
|
+
# Replaces the ARM client.
|
|
40
|
+
#
|
|
41
|
+
# @param client [Azure::ArmClient, nil] the client to use.
|
|
42
|
+
# @return [Azure::ArmClient, nil] the client that was set.
|
|
43
|
+
|
|
32
44
|
kitchen_driver_api_version 2
|
|
33
45
|
|
|
46
|
+
plugin_version Kitchen::Driver::AZURERM_VERSION
|
|
47
|
+
|
|
34
48
|
# Settings that Azure retirements have made inoperable. They are still
|
|
35
49
|
# accepted so that an existing kitchen.yml keeps loading, but they no
|
|
36
50
|
# longer do anything and {#warn_about_deprecated_config} says so.
|
|
@@ -253,6 +267,8 @@ module Kitchen
|
|
|
253
267
|
# @param state [Hash] the instance state, mutated in place.
|
|
254
268
|
# @return [void]
|
|
255
269
|
# @raise [RuntimeError] if no +subscription_id+ can be resolved.
|
|
270
|
+
# @raise [Kitchen::UserError] if +os_disk_size_gb+ is not a whole number,
|
|
271
|
+
# or the public half of the transport's SSH key cannot be found.
|
|
256
272
|
# @raise [Azure::OperationError] if an Azure API call fails
|
|
257
273
|
# for any reason other than an already-running deployment.
|
|
258
274
|
def create(state)
|
|
@@ -307,8 +323,9 @@ module Kitchen
|
|
|
307
323
|
# surface as an Azure error partway through a create, once the resource
|
|
308
324
|
# group already exists, so this looks for them up front.
|
|
309
325
|
#
|
|
310
|
-
# @param
|
|
311
|
-
# configuration and credentials, which exist
|
|
326
|
+
# @param _state [Hash] the instance state. Test Kitchen passes it, but
|
|
327
|
+
# the checks are about configuration and credentials, which exist
|
|
328
|
+
# before any instance does, so it is ignored.
|
|
312
329
|
# @return [Boolean] true when a problem was found, as +kitchen doctor+
|
|
313
330
|
# expects.
|
|
314
331
|
def doctor(_state)
|
|
@@ -556,7 +573,13 @@ module Kitchen
|
|
|
556
573
|
state.key?(property) && !state[property].to_s.empty?
|
|
557
574
|
end
|
|
558
575
|
|
|
559
|
-
# Fills in any state values that are not already present
|
|
576
|
+
# Fills in any state values that are not already present, and drops the
|
|
577
|
+
# generated password when the transport authenticates with an SSH key.
|
|
578
|
+
#
|
|
579
|
+
# +use_managed_disks+ is copied across with the settings that are still
|
|
580
|
+
# read, even though Azure's retirement of unmanaged disks left nothing
|
|
581
|
+
# reading it - see {DEPRECATED_CONFIG}. It is written as nil, since the
|
|
582
|
+
# setting has no default.
|
|
560
583
|
#
|
|
561
584
|
# @param state [Hash] existing Hash of state values.
|
|
562
585
|
# @return [Hash] the same Hash, with defaults applied.
|
|
@@ -930,7 +953,9 @@ module Kitchen
|
|
|
930
953
|
# worse than saying so promptly.
|
|
931
954
|
#
|
|
932
955
|
# @param state [Hash] the instance state.
|
|
933
|
-
# @return [Hash] +:live+, +:state
|
|
956
|
+
# @return [Hash] always +:live+, +:state+ and +:message+; +:resource_id+
|
|
957
|
+
# only when the virtual machine was found, since nothing else knows
|
|
958
|
+
# which resource to name.
|
|
934
959
|
def status(state)
|
|
935
960
|
resource_group = state[:azure_resource_group_name]
|
|
936
961
|
vm_name = state[:vm_name]
|
|
@@ -1391,7 +1416,11 @@ module Kitchen
|
|
|
1391
1416
|
|
|
1392
1417
|
# Base64-encoded custom data for the VM.
|
|
1393
1418
|
#
|
|
1394
|
-
#
|
|
1419
|
+
# An unset +custom_data+ is "" rather than nil, which encodes to "" - so
|
|
1420
|
+
# callers guard on the setting being empty rather than on this returning
|
|
1421
|
+
# nil.
|
|
1422
|
+
#
|
|
1423
|
+
# @return [String, nil] nil only when +custom_data+ is explicitly nil.
|
|
1395
1424
|
def prepared_custom_data
|
|
1396
1425
|
return nil if config[:custom_data].nil?
|
|
1397
1426
|
|
|
@@ -1540,7 +1569,7 @@ module Kitchen
|
|
|
1540
1569
|
# Requests deletion of a resource group without waiting for it to finish.
|
|
1541
1570
|
#
|
|
1542
1571
|
# @param resource_group_name [String] the resource group name.
|
|
1543
|
-
# @return [
|
|
1572
|
+
# @return [void] ARM answers a delete with no body worth returning.
|
|
1544
1573
|
def delete_resource_group_async(resource_group_name)
|
|
1545
1574
|
with_azure_retries("while sending resource group deletion request for '#{resource_group_name}'.") do
|
|
1546
1575
|
arm_client.delete_resource_group(resource_group_name)
|
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: 2.
|
|
4
|
+
version: 2.4.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: 2026-
|
|
11
|
+
date: 2026-09-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: inifile
|