kitchen-centurylink 0.1.5 → 0.1.6
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 +4 -4
- data/lib/kitchen/driver/centurylink.rb +9 -9
- data/lib/kitchen/driver/centurylink_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6642ed7b8701ffe6038eb48c887ef9fef6ee3a1d
|
|
4
|
+
data.tar.gz: 734ee5bff7478833c3dcd616f8b295f09ce08239
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8bb7d3bf3b3ec8a701363d3eee086b9ef0f44900ae72fa4413919ef9e4d147c2a0f256674bdeb8af9c8d4aca826d38aee8e88f54ea82da4f4e7cd809affaaf6
|
|
7
|
+
data.tar.gz: 6e6aedf6a1b645206d2574b4a2b0c10db12e4fe555347d843df3b1ac3fa1969a05319771a3ab1a01fb34667911c8f27ffc64c56b15ee675b6d95f351fdf2af17
|
|
@@ -31,7 +31,7 @@ module Kitchen
|
|
|
31
31
|
default_config :username, 'root'
|
|
32
32
|
default_config :password, 'Kitchen123'
|
|
33
33
|
default_config :server_name, 'test'
|
|
34
|
-
default_config :
|
|
34
|
+
default_config :accountAlias, 'DFT'
|
|
35
35
|
default_config :cpu, 2
|
|
36
36
|
default_config :memoryGB, 4
|
|
37
37
|
default_config :serverTemplate, 'CENTOS-6-64-TEMPLATE'
|
|
@@ -56,13 +56,13 @@ module Kitchen
|
|
|
56
56
|
@@client.setToken(config[:token] || state[:token])
|
|
57
57
|
|
|
58
58
|
queueId = create_server
|
|
59
|
-
serverInfo = @@client.getServerDetails(config[:
|
|
59
|
+
serverInfo = @@client.getServerDetails(config[:accountAlias], queueId + '?uuid=True')
|
|
60
60
|
|
|
61
61
|
info 'Checking server status before continuing'
|
|
62
62
|
|
|
63
63
|
while serverInfo['status'] != 'active' do
|
|
64
64
|
info "Server not up. Server status is: #{serverInfo['status']}."
|
|
65
|
-
serverInfo = @@client.getServerDetails(config[:
|
|
65
|
+
serverInfo = @@client.getServerDetails(config[:accountAlias], queueId + '?uuid=True')
|
|
66
66
|
sleep 20
|
|
67
67
|
end
|
|
68
68
|
info serverInfo
|
|
@@ -82,7 +82,7 @@ module Kitchen
|
|
|
82
82
|
info "Sending delete request for server #{state[:server_id]}"
|
|
83
83
|
|
|
84
84
|
@@client.setToken(config[:token] || state[:token])
|
|
85
|
-
response = @@client.deleteServer(config[:
|
|
85
|
+
response = @@client.deleteServer(config[:accountAlias], state[:server_id])
|
|
86
86
|
if response['isQueued'] == true
|
|
87
87
|
info 'Delete request is queued up'
|
|
88
88
|
state.delete(:server_id)
|
|
@@ -92,7 +92,7 @@ module Kitchen
|
|
|
92
92
|
|
|
93
93
|
def create_server
|
|
94
94
|
info 'Sending create server request'
|
|
95
|
-
response = @@client.createServer(config[:
|
|
95
|
+
response = @@client.createServer(config[:accountAlias],
|
|
96
96
|
{
|
|
97
97
|
:name => config[:server_name],
|
|
98
98
|
:groupId => config[:groupId],
|
|
@@ -111,7 +111,7 @@ module Kitchen
|
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
def assign_public_ip(state)
|
|
114
|
-
response = @@client.addPublicIpAddress(config[:
|
|
114
|
+
response = @@client.addPublicIpAddress(config[:accountAlias], state[:server_id], {
|
|
115
115
|
:ports => [ {:protocol => 'TCP', :port => 80},
|
|
116
116
|
{:protocol => 'TCP', :port => 8080},
|
|
117
117
|
{:protocol => 'TCP', :port => 443},
|
|
@@ -119,15 +119,15 @@ module Kitchen
|
|
|
119
119
|
]})
|
|
120
120
|
puts response
|
|
121
121
|
statusId = response['id']
|
|
122
|
-
status = @@client.getQueueStatus(config[:
|
|
122
|
+
status = @@client.getQueueStatus(config[:accountAlias], statusId)
|
|
123
123
|
|
|
124
124
|
while status['status'] != 'succeeded' do
|
|
125
125
|
|
|
126
126
|
info "Waiting for public IP job to complete. Status is #{status["status"]}"
|
|
127
127
|
sleep 20
|
|
128
|
-
status = @@client.getQueueStatus(config[:
|
|
128
|
+
status = @@client.getQueueStatus(config[:accountAlias], statusId)
|
|
129
129
|
end
|
|
130
|
-
serverInfo = @@client.getServerDetails(config[:
|
|
130
|
+
serverInfo = @@client.getServerDetails(config[:accountAlias], state[:server_id])
|
|
131
131
|
state[:hostname] = serverInfo['details']['ipAddresses'].find {|ipSet| ipSet['public'] }['public']
|
|
132
132
|
info "Assigned public IP of: #{state[:hostname]}"
|
|
133
133
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-centurylink
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anthony Howell
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-03-
|
|
12
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: test-kitchen
|
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
177
177
|
version: '0'
|
|
178
178
|
requirements: []
|
|
179
179
|
rubyforge_project:
|
|
180
|
-
rubygems_version: 2.
|
|
180
|
+
rubygems_version: 2.4.6
|
|
181
181
|
signing_key:
|
|
182
182
|
specification_version: 4
|
|
183
183
|
summary: A Test Kitchen Driver for Centurylink
|