kitchen-oci 1.18.0 → 1.18.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc3416b97957d72c5262acfed751b388a1387a5e18b85fc02193bc88c2283c72
|
4
|
+
data.tar.gz: 2946ba6f22ac36f50e6699c8d20acbf628ba19ad0d6f80b042d89f3e269aff20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c260f31d16ba17bfdffb4384b93263d7ffe415e45c65a1f6c7b432ca78aa0cc89f14140988cbe9918c01b2c7b2496b2126d3584bc8792e4a31c954b2a6164e0
|
7
|
+
data.tar.gz: d7ba936db2bc7d265bab692250a595b2b94bfe9f5fe85dd9536e5d6b583bb68454c56d5d8240df5042b27b667d5c94063a4f2f3fa14d6ba4db31769e1904ad4c
|
@@ -66,13 +66,19 @@ module Kitchen
|
|
66
66
|
def generic_api(klass)
|
67
67
|
params = {}
|
68
68
|
params[:proxy_settings] = api_proxy if api_proxy
|
69
|
-
params[:signer] =
|
70
|
-
OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
|
71
|
-
elsif config[:use_token_auth]
|
72
|
-
token_signer
|
73
|
-
end
|
69
|
+
params[:signer] = signer
|
74
70
|
params[:config] = oci_config unless config[:use_instance_principals]
|
75
|
-
|
71
|
+
# this is to accommodate old versions of ruby that do not have a compact method on a Hash
|
72
|
+
params.reject! { |_, v| v.nil? }
|
73
|
+
klass.new(**params)
|
74
|
+
end
|
75
|
+
|
76
|
+
def signer
|
77
|
+
if config[:use_instance_principals]
|
78
|
+
OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
|
79
|
+
elsif config[:use_token_auth]
|
80
|
+
token_signer
|
81
|
+
end
|
76
82
|
end
|
77
83
|
|
78
84
|
def token_signer
|
@@ -65,7 +65,9 @@ module Kitchen
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def config_loader(opts = {})
|
68
|
-
|
68
|
+
# this is to accommodate old versions of ruby that do not have a compact method on a Hash
|
69
|
+
opts.reject! { |_, v| v.nil? }
|
70
|
+
OCI::ConfigFileLoader.load_config(**opts)
|
69
71
|
rescue OCI::ConfigFileLoader::Errors::ConfigFileNotFoundError
|
70
72
|
OCI::Config.new
|
71
73
|
end
|
@@ -63,7 +63,7 @@ module Kitchen
|
|
63
63
|
|
64
64
|
def image_id_by_name
|
65
65
|
image_name = config[:image_name].gsub(" ", "-")
|
66
|
-
image_list = images.select { |i| i.display_name.match
|
66
|
+
image_list = images.select { |i| i.display_name.match(/#{image_name}/) }
|
67
67
|
raise "unable to find image_id" if image_list.empty?
|
68
68
|
|
69
69
|
image_list = filter_image_list(image_list, image_name) if image_list.count > 1
|
@@ -73,7 +73,7 @@ module Kitchen
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def filter_image_list(image_list, image_name)
|
76
|
-
image_list.select { |i| i.display_name.match
|
76
|
+
image_list.select { |i| i.display_name.match(/#{image_name}-[0-9]{4}\.[0-9]{2}\.[0-9]{2}/) }
|
77
77
|
end
|
78
78
|
|
79
79
|
def latest_image_id(image_list)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-oci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Pearson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-04-
|
12
|
+
date: 2024-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oci
|