vagrant-cloudcenter 0.3.0 → 0.4.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 +9 -3
- data/lib/vagrant-cloudcenter/action/deploy.rb +11 -5
- data/lib/vagrant-cloudcenter/action/is_created.rb +7 -1
- data/lib/vagrant-cloudcenter/action/is_stopped.rb +30 -24
- data/lib/vagrant-cloudcenter/action/read_ssh_info.rb +6 -0
- data/lib/vagrant-cloudcenter/action/start_instance.rb +9 -0
- data/lib/vagrant-cloudcenter/action/stop_instance.rb +30 -21
- data/lib/vagrant-cloudcenter/action/terminate_instance.rb +9 -0
- data/lib/vagrant-cloudcenter/command/app.rb +3 -0
- data/lib/vagrant-cloudcenter/command/catalog.rb +3 -0
- data/lib/vagrant-cloudcenter/command/jobs.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f11a19ba41436dc5d7584a0a5ef50f92775775
|
4
|
+
data.tar.gz: 1c626b0a1fa473c599f3d78c844200cfce305ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1544bd17af89793ed643bf7a9bc3efb1f7b2dbaa3d98016793bc57f06a72d48830c2d23b5a3c8a43ee8a217b194ab14a2e7c6e17b2137af8268a022e7836be0
|
7
|
+
data.tar.gz: 07b7aa1882add8d0c16e6420bed898f0ce1c10a465817bbe15e0c3195a169db37d75937e3819b4353deffdd6d7dec633fd1edfa189e9dba19573f4c76511973c
|
data/README.md
CHANGED
@@ -69,8 +69,10 @@ Vagrant.configure(2) do |config|
|
|
69
69
|
config.vm.provider :cloudcenter do |cloudcenter|
|
70
70
|
cloudcenter.username = 'my_username'
|
71
71
|
cloudcenter.access_key = 'my_access_key'
|
72
|
-
cloudcenter.
|
72
|
+
cloudcenter.host = 'cloudcenter_host_ip_address'
|
73
73
|
cloudcenter.deployment_config = 'sample_deployment_config.json'
|
74
|
+
cloudcenter.use_https = true
|
75
|
+
cloudcenter.ssl_ca_file = '/Users/MYUSERNAME/MY_SSL_CA_FILE.crt'
|
74
76
|
end
|
75
77
|
|
76
78
|
config.vm.synced_folder '.', '/opt/my_files/', type: 'rsync'
|
@@ -97,8 +99,12 @@ This provider exposes quite a few provider-specific configuration options:
|
|
97
99
|
|
98
100
|
* `access_key` - The access key for accessing the Cisco CloudCenter API
|
99
101
|
* `username` - The username for accessing the CloudCenter API
|
100
|
-
* `
|
102
|
+
* `host` - The CloudCenter Manager address
|
101
103
|
* `deployment_config` - A JSON file used by CloudCenter to deploy the desired infrastructure
|
104
|
+
* `use_https` - Whether or not to use HTTPS when connecting to the CloudCenter API. Default is `true`
|
105
|
+
* `ssl_ca_file` - Location of your custom SSL CA file to use when connecting to the CloudCenter API. See the following document below for details on how to use your own customer client certificates with CloudCenter. This is not required if `use_https` is set to `false`
|
106
|
+
|
107
|
+
[CloudCenter - Certificate Authentication](http://docs.cloudcenter.cisco.com/display/CCD48/Certificate+Authentication)
|
102
108
|
|
103
109
|
## Deployment Config
|
104
110
|
|
@@ -137,7 +143,7 @@ To work on the CloudCenter plugin, clone this repository then run the following
|
|
137
143
|
|
138
144
|
```
|
139
145
|
$ gem build vagrant-cloudcenter.gemspec
|
140
|
-
$ vagrant plugin install ./vagrant-cloudcenter-0.
|
146
|
+
$ vagrant plugin install ./vagrant-cloudcenter-0.3.0.gem
|
141
147
|
```
|
142
148
|
|
143
149
|
To uninstall the plugin run `vagrant plugin uninstall vagrant-cloudcenter`
|
@@ -107,19 +107,22 @@ module VagrantPlugins
|
|
107
107
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
108
108
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
109
109
|
exit
|
110
|
-
|
110
|
+
elsif e.to_s == "401 Unauthorized"
|
111
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
112
|
+
exit
|
113
|
+
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
111
114
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
112
115
|
exit
|
113
|
-
|
116
|
+
elsif e.to_s.include? "No route to host"
|
114
117
|
puts "\n ERROR: No route to host. Check connectivity and try again\n\n"
|
115
118
|
exit
|
116
|
-
|
119
|
+
elsif e.to_s.== "Timed out connecting to server"
|
117
120
|
puts "\n ERROR: Timed out connecting to server. Check connectivity and try again\n\n"
|
118
121
|
exit
|
119
|
-
|
122
|
+
elsif e.to_s.== "getaddrinfo: nodename nor servname provided, or not known"
|
120
123
|
puts "\n ERROR: Unable to connect to \"#{host}\" \n\n"
|
121
124
|
exit
|
122
|
-
|
125
|
+
else
|
123
126
|
error = JSON.parse(e.response)
|
124
127
|
code = error["errors"][0]["code"]
|
125
128
|
|
@@ -190,6 +193,9 @@ module VagrantPlugins
|
|
190
193
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
191
194
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
192
195
|
exit
|
196
|
+
elsif e.to_s == "401 Unauthorized"
|
197
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
198
|
+
exit
|
193
199
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
194
200
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
195
201
|
exit
|
@@ -65,10 +65,13 @@ module VagrantPlugins
|
|
65
65
|
end
|
66
66
|
|
67
67
|
rescue => e
|
68
|
-
|
68
|
+
|
69
69
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
70
70
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
71
71
|
exit
|
72
|
+
elsif e.to_s == "401 Unauthorized"
|
73
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
74
|
+
exit
|
72
75
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
73
76
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
74
77
|
exit
|
@@ -125,6 +128,9 @@ module VagrantPlugins
|
|
125
128
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
126
129
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
127
130
|
exit
|
131
|
+
elsif e.to_s == "401 Unauthorized"
|
132
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
133
|
+
exit
|
128
134
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
129
135
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
130
136
|
exit
|
@@ -68,6 +68,9 @@ module VagrantPlugins
|
|
68
68
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
69
69
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
70
70
|
exit
|
71
|
+
elsif e.to_s == "401 Unauthorized"
|
72
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
73
|
+
exit
|
71
74
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
72
75
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
73
76
|
exit
|
@@ -130,33 +133,36 @@ module VagrantPlugins
|
|
130
133
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
131
134
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
132
135
|
exit
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
code = error["errors"][0]["code"]
|
148
|
-
|
149
|
-
if code == "DEPLOYMENT_STATUS_NOT_VALID_FOR_OPERATION"
|
150
|
-
puts "\n Error code: #{error['errors'][0]['code']}\n"
|
151
|
-
puts "\n #{error['errors'][0]['message']}\n\n"
|
136
|
+
elsif e.to_s == "401 Unauthorized"
|
137
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
138
|
+
exit
|
139
|
+
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
140
|
+
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
141
|
+
exit
|
142
|
+
elsif e.to_s.include? "No route to host"
|
143
|
+
puts "\n ERROR: No route to host. Check connectivity and try again\n\n"
|
144
|
+
exit
|
145
|
+
elsif e.to_s.== "Timed out connecting to server"
|
146
|
+
puts "\n ERROR: Timed out connecting to server. Check connectivity and try again\n\n"
|
147
|
+
exit
|
148
|
+
elsif e.to_s.== "getaddrinfo: nodename nor servname provided, or not known"
|
149
|
+
puts "\n ERROR: Unable to connect to \"#{host}\" \n\n"
|
152
150
|
exit
|
153
151
|
else
|
154
|
-
|
155
|
-
|
156
|
-
end
|
152
|
+
error = JSON.parse(e.response)
|
153
|
+
code = error["errors"][0]["code"]
|
157
154
|
|
158
|
-
|
159
|
-
|
155
|
+
if code == "DEPLOYMENT_STATUS_NOT_VALID_FOR_OPERATION"
|
156
|
+
puts "\n Error code: #{error['errors'][0]['code']}\n"
|
157
|
+
puts "\n #{error['errors'][0]['message']}\n\n"
|
158
|
+
exit
|
159
|
+
else
|
160
|
+
puts "\n Error code: #{error['errors'][0]['code']}\n"
|
161
|
+
puts "\n #{error['errors'][0]['message']}\n\n"
|
162
|
+
end
|
163
|
+
|
164
|
+
exit
|
165
|
+
end
|
160
166
|
end
|
161
167
|
|
162
168
|
if response["deploymentEntity"]["attributes"]["health"] == "Healthy"
|
@@ -70,6 +70,9 @@ module VagrantPlugins
|
|
70
70
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
71
71
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
72
72
|
exit
|
73
|
+
elsif e.to_s == "401 Unauthorized"
|
74
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
75
|
+
exit
|
73
76
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
74
77
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
75
78
|
exit
|
@@ -127,6 +130,9 @@ module VagrantPlugins
|
|
127
130
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
128
131
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
129
132
|
exit
|
133
|
+
elsif e.to_s == "401 Unauthorized"
|
134
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
135
|
+
exit
|
130
136
|
elsif e.to_s.include? "No route to host"
|
131
137
|
puts "\n ERROR: No route to host. Check connectivity and try again\n\n"
|
132
138
|
exit
|
@@ -79,6 +79,9 @@ module VagrantPlugins
|
|
79
79
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
80
80
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
81
81
|
exit
|
82
|
+
elsif e.to_s == "401 Unauthorized"
|
83
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
84
|
+
exit
|
82
85
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
83
86
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
84
87
|
exit
|
@@ -148,6 +151,9 @@ module VagrantPlugins
|
|
148
151
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
149
152
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
150
153
|
exit
|
154
|
+
elsif e.to_s == "401 Unauthorized"
|
155
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
156
|
+
exit
|
151
157
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
152
158
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
153
159
|
exit
|
@@ -206,6 +212,9 @@ module VagrantPlugins
|
|
206
212
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
207
213
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
208
214
|
exit
|
215
|
+
elsif e.to_s == "401 Unauthorized"
|
216
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
217
|
+
exit
|
209
218
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
210
219
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
211
220
|
exit
|
@@ -70,6 +70,9 @@ module VagrantPlugins
|
|
70
70
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
71
71
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
72
72
|
exit
|
73
|
+
elsif e.to_s == "401 Unauthorized"
|
74
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
75
|
+
exit
|
73
76
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
74
77
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
75
78
|
exit
|
@@ -136,6 +139,9 @@ module VagrantPlugins
|
|
136
139
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
137
140
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
138
141
|
exit
|
142
|
+
elsif e.to_s == "401 Unauthorized"
|
143
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
144
|
+
exit
|
139
145
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
140
146
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
141
147
|
exit
|
@@ -194,27 +200,30 @@ module VagrantPlugins
|
|
194
200
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
195
201
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
196
202
|
exit
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
203
|
+
elsif e.to_s == "401 Unauthorized"
|
204
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
205
|
+
exit
|
206
|
+
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
207
|
+
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
208
|
+
exit
|
209
|
+
elsif e.to_s.include? "No route to host"
|
210
|
+
puts "\n ERROR: No route to host. Check connectivity and try again\n\n"
|
211
|
+
exit
|
212
|
+
elsif e.to_s.== "Timed out connecting to server"
|
213
|
+
puts "\n ERROR: Timed out connecting to server. Check connectivity and try again\n\n"
|
214
|
+
exit
|
215
|
+
elsif e.to_s.== "getaddrinfo: nodename nor servname provided, or not known"
|
216
|
+
puts "\n ERROR: Unable to connect to \"#{host}\" \n\n"
|
217
|
+
exit
|
218
|
+
else
|
219
|
+
error = JSON.parse(e.response)
|
220
|
+
code = error["errors"][0]["code"]
|
221
|
+
|
222
|
+
puts "\n Error code: #{error['errors'][0]['code']}\n"
|
223
|
+
puts "\n #{error['errors'][0]['message']}\n\n"
|
224
|
+
|
225
|
+
exit
|
226
|
+
end
|
218
227
|
end
|
219
228
|
|
220
229
|
if response["deploymentEntity"]["attributes"]["status"] == "Suspended"
|
@@ -76,6 +76,9 @@ module VagrantPlugins
|
|
76
76
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
77
77
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
78
78
|
exit
|
79
|
+
elsif e.to_s == "401 Unauthorized"
|
80
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
81
|
+
exit
|
79
82
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
80
83
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
81
84
|
exit
|
@@ -132,6 +135,9 @@ module VagrantPlugins
|
|
132
135
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
133
136
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
134
137
|
exit
|
138
|
+
elsif e.to_s == "401 Unauthorized"
|
139
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
140
|
+
exit
|
135
141
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
136
142
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
137
143
|
exit
|
@@ -195,6 +201,9 @@ module VagrantPlugins
|
|
195
201
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
196
202
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
197
203
|
exit
|
204
|
+
elsif e.to_s == "401 Unauthorized"
|
205
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
206
|
+
exit
|
198
207
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
199
208
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
200
209
|
exit
|
@@ -51,6 +51,9 @@ module VagrantPlugins
|
|
51
51
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
52
52
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
53
53
|
exit
|
54
|
+
elsif e.to_s == "401 Unauthorized"
|
55
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
56
|
+
exit
|
54
57
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
55
58
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
56
59
|
exit
|
@@ -94,6 +94,9 @@ module VagrantPlugins
|
|
94
94
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
95
95
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
96
96
|
exit
|
97
|
+
elsif e.to_s == "401 Unauthorized"
|
98
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
99
|
+
exit
|
97
100
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
98
101
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
99
102
|
exit
|
@@ -98,6 +98,9 @@ module VagrantPlugins
|
|
98
98
|
if e.to_s == "SSL_connect returned=1 errno=0 state=error: certificate verify failed"
|
99
99
|
puts "\n ERROR: Failed to verify certificate\n\n"
|
100
100
|
exit
|
101
|
+
elsif e.to_s == "401 Unauthorized"
|
102
|
+
puts "\n ERROR: Incorrect credentials\n\n"
|
103
|
+
exit
|
101
104
|
elsif e.to_s == "hostname \"#{host}\" does not match the server certificate"
|
102
105
|
puts "\n ERROR: Hostname \"#{host}\" does not match the server certificate\n\n"
|
103
106
|
exit
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-cloudcenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Conor Murphy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|