octopus-serverspec-extensions 0.15.1 → 0.15.2
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: 13115f860370fc23e7afccc23f377acf9b9c0d6e6346bc8853eeb6da81693839
|
4
|
+
data.tar.gz: 21fb4fffb4c6a449e11972a9fadafaf8f45d95fef64eed593e3e916c49a45faa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fad47a76f0ef479313bf1bf8324613f4f912086232937da687e9c78a73d11afed67eca9e0b153aeb3085f8729738d62e1e64599c3091295e1988b14769761aad
|
7
|
+
data.tar.gz: '09f0cb80856e3229d4e4dd9cbd5ca4a964a3c25ec150bb743e00bfd703df37a1ecb817ae55b30af435c48b1ad0e0b7895601c797142fcbd05717977521465b64'
|
@@ -67,7 +67,7 @@ module Serverspec::Type
|
|
67
67
|
|
68
68
|
def in_environment?(environment_name)
|
69
69
|
return false if @machine.nil?
|
70
|
-
url = "#{@serverUrl}/api/#{spaceFragment}environments/all?api-key=#{@apiKey}"
|
70
|
+
url = "#{@serverUrl}/api/#{@spaceFragment}environments/all?api-key=#{@apiKey}"
|
71
71
|
resp = Net::HTTP.get_response(URI.parse(url))
|
72
72
|
environments = JSON.parse(resp.body)
|
73
73
|
environment_id = environments.select {|e| e["Name"] == environment_name}.first["Id"]
|
@@ -77,7 +77,7 @@ module Serverspec::Type
|
|
77
77
|
def in_space?(space_name)
|
78
78
|
return false if @machine.nil?
|
79
79
|
return false if @serverSupportsSpaces
|
80
|
-
url = "#{@serverUrl}/api/#{spaceFragment}spaces/all?api-key=#{@apiKey}"
|
80
|
+
url = "#{@serverUrl}/api/#{@spaceFragment}spaces/all?api-key=#{@apiKey}"
|
81
81
|
resp = Net::HTTP.get_response(URI.parse(url))
|
82
82
|
spaces = JSON.parse(resp.body)
|
83
83
|
space_id = spaces.select {|e| e["Name"] == space_name}.first["Id"]
|
@@ -86,7 +86,7 @@ module Serverspec::Type
|
|
86
86
|
|
87
87
|
def has_tenant?(tenant_name)
|
88
88
|
return false if @machine.nil?
|
89
|
-
url = "#{@serverUrl}/api/#{spaceFragment}tenants/all?api-key=#{@apiKey}"
|
89
|
+
url = "#{@serverUrl}/api/#{@spaceFragment}tenants/all?api-key=#{@apiKey}"
|
90
90
|
resp = Net::HTTP.get_response(URI.parse(url))
|
91
91
|
tenants = JSON.parse(resp.body)
|
92
92
|
tenant_id = tenants.select {|e| e["Name"] == tenant_name}.first["Id"]
|
@@ -101,7 +101,7 @@ module Serverspec::Type
|
|
101
101
|
|
102
102
|
def has_policy?(policy_name)
|
103
103
|
return false if @machine.nil?
|
104
|
-
url = "#{@serverUrl}/api/#{spaceFragment}machinepolicies/all?api-key=#{@apiKey}"
|
104
|
+
url = "#{@serverUrl}/api/#{@spaceFragment}machinepolicies/all?api-key=#{@apiKey}"
|
105
105
|
resp = Net::HTTP.get_response(URI.parse(url))
|
106
106
|
policies = JSON.parse(resp.body)
|
107
107
|
policy_id = policies.select {|e| e["Name"] == policy_name}.first["Id"]
|
@@ -163,7 +163,7 @@ module Serverspec::Type
|
|
163
163
|
|
164
164
|
def poll_until_machine_has_completed_healthcheck(serverUrl, apiKey, thumbprint)
|
165
165
|
machine = nil
|
166
|
-
url = "#{serverUrl}/api/#{spaceFragment}machines/all?api-key=#{apiKey}"
|
166
|
+
url = "#{serverUrl}/api/#{@spaceFragment}machines/all?api-key=#{apiKey}"
|
167
167
|
|
168
168
|
now = Time.now
|
169
169
|
counter = 1
|
@@ -187,7 +187,7 @@ module Serverspec::Type
|
|
187
187
|
|
188
188
|
def get_machine_via_api(serverUrl, apiKey, thumbprint)
|
189
189
|
machine = nil
|
190
|
-
url = "#{serverUrl}/api/#{spaceFragment}machines/all?api-key=#{apiKey}"
|
190
|
+
url = "#{serverUrl}/api/#{@spaceFragment}machines/all?api-key=#{apiKey}"
|
191
191
|
|
192
192
|
begin
|
193
193
|
resp = Net::HTTP.get_response(URI.parse(url))
|