fog-profitbricks 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/fog-profitbricks.gemspec +12 -11
- data/lib/fog/compute/profit_bricks.rb +217 -0
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/datacenter.rb +0 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/datacenters.rb +1 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/flavor.rb +0 -6
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/flavors.rb +1 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/image.rb +0 -6
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/images.rb +1 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/interface.rb +0 -6
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/interfaces.rb +1 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/region.rb +0 -6
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/regions.rb +1 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/server.rb +0 -8
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/servers.rb +1 -2
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/volume.rb +0 -6
- data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/volumes.rb +1 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/clear_data_center.rb +0 -2
- data/lib/fog/compute/profit_bricks/requests/connect_storage_to_server.rb +83 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/create_data_center.rb +1 -3
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/create_flavor.rb +2 -2
- data/lib/fog/compute/profit_bricks/requests/create_nic.rb +79 -0
- data/lib/fog/compute/profit_bricks/requests/create_server.rb +105 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/create_storage.rb +4 -6
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_data_center.rb +3 -5
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_nic.rb +3 -5
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_server.rb +2 -4
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_storage.rb +2 -4
- data/lib/fog/compute/profit_bricks/requests/disconnect_storage_from_server.rb +76 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_data_centers.rb +0 -1
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_flavors.rb +0 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_images.rb +0 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_locations.rb +0 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_nic.rb +2 -4
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_servers.rb +0 -1
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_storages.rb +2 -4
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_data_center.rb +0 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_data_center_state.rb +2 -3
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_flavor.rb +0 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_image.rb +0 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_location.rb +0 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_nic.rb +0 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_server.rb +0 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_storage.rb +0 -2
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/reset_server.rb +0 -2
- data/lib/fog/compute/profit_bricks/requests/set_internet_access.rb +59 -0
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/start_server.rb +0 -1
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/stop_server.rb +0 -1
- data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/update_data_center.rb +3 -4
- data/lib/fog/compute/profit_bricks/requests/update_nic.rb +74 -0
- data/lib/fog/compute/profit_bricks/requests/update_server.rb +79 -0
- data/lib/fog/compute/profit_bricks/requests/update_storage.rb +73 -0
- data/lib/fog/{profitbricks/models → models/profit_bricks}/base.rb +0 -0
- data/lib/fog/parsers/compute.rb +37 -0
- data/lib/fog/parsers/compute/profit_bricks/base.rb +51 -0
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/clear_data_center.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/connect_storage_to_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_data_center.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_nic.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_storage.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_data_center.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_nic.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_storage.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/disconnect_storage_from_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_data_centers.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_images.rb +2 -2
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_nic.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_servers.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_storages.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_data_center.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_data_center_state.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_image.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_nic.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_storage.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/reset_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/set_internet_access.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_data_center.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_nic.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_server.rb +1 -1
- data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_storage.rb +1 -1
- data/lib/fog/profitbricks.rb +32 -4
- data/lib/fog/profitbricks/compute.rb +1 -215
- data/lib/fog/profitbricks/storage.rb +1 -0
- data/lib/fog/profitbricks/version.rb +1 -1
- metadata +107 -103
- data/lib/fog/profitbricks/core.rb +0 -18
- data/lib/fog/profitbricks/parsers/base.rb +0 -49
- data/lib/fog/profitbricks/requests/compute/connect_storage_to_server.rb +0 -85
- data/lib/fog/profitbricks/requests/compute/create_nic.rb +0 -81
- data/lib/fog/profitbricks/requests/compute/create_server.rb +0 -107
- data/lib/fog/profitbricks/requests/compute/disconnect_storage_from_server.rb +0 -78
- data/lib/fog/profitbricks/requests/compute/set_internet_access.rb +0 -61
- data/lib/fog/profitbricks/requests/compute/update_nic.rb +0 -76
- data/lib/fog/profitbricks/requests/compute/update_server.rb +0 -81
- data/lib/fog/profitbricks/requests/compute/update_storage.rb +0 -75
@@ -0,0 +1 @@
|
|
1
|
+
# This file is intentionally left blank
|
metadata
CHANGED
@@ -1,156 +1,158 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-profitbricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan Devenport
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: fog-xml
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: shindo
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: turn
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: pry
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: coveralls
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
description:
|
153
|
+
description: |-
|
154
|
+
This library can be used as a module for 'fog' or as
|
155
|
+
standalone ProfitBricks provider.
|
154
156
|
email:
|
155
157
|
- ethand@stackpointcloud.com
|
156
158
|
executables: []
|
@@ -174,88 +176,90 @@ files:
|
|
174
176
|
- gemfiles/Gemfile.1.9.2+
|
175
177
|
- gemfiles/Gemfile.1.9.2-
|
176
178
|
- lib/fog/bin/profitbricks.rb
|
179
|
+
- lib/fog/compute/profit_bricks.rb
|
180
|
+
- lib/fog/compute/profit_bricks/models/datacenter.rb
|
181
|
+
- lib/fog/compute/profit_bricks/models/datacenters.rb
|
182
|
+
- lib/fog/compute/profit_bricks/models/flavor.rb
|
183
|
+
- lib/fog/compute/profit_bricks/models/flavors.rb
|
184
|
+
- lib/fog/compute/profit_bricks/models/image.rb
|
185
|
+
- lib/fog/compute/profit_bricks/models/images.rb
|
186
|
+
- lib/fog/compute/profit_bricks/models/interface.rb
|
187
|
+
- lib/fog/compute/profit_bricks/models/interfaces.rb
|
188
|
+
- lib/fog/compute/profit_bricks/models/region.rb
|
189
|
+
- lib/fog/compute/profit_bricks/models/regions.rb
|
190
|
+
- lib/fog/compute/profit_bricks/models/server.rb
|
191
|
+
- lib/fog/compute/profit_bricks/models/servers.rb
|
192
|
+
- lib/fog/compute/profit_bricks/models/volume.rb
|
193
|
+
- lib/fog/compute/profit_bricks/models/volumes.rb
|
194
|
+
- lib/fog/compute/profit_bricks/requests/clear_data_center.rb
|
195
|
+
- lib/fog/compute/profit_bricks/requests/connect_storage_to_server.rb
|
196
|
+
- lib/fog/compute/profit_bricks/requests/create_data_center.rb
|
197
|
+
- lib/fog/compute/profit_bricks/requests/create_flavor.rb
|
198
|
+
- lib/fog/compute/profit_bricks/requests/create_nic.rb
|
199
|
+
- lib/fog/compute/profit_bricks/requests/create_server.rb
|
200
|
+
- lib/fog/compute/profit_bricks/requests/create_storage.rb
|
201
|
+
- lib/fog/compute/profit_bricks/requests/delete_data_center.rb
|
202
|
+
- lib/fog/compute/profit_bricks/requests/delete_nic.rb
|
203
|
+
- lib/fog/compute/profit_bricks/requests/delete_server.rb
|
204
|
+
- lib/fog/compute/profit_bricks/requests/delete_storage.rb
|
205
|
+
- lib/fog/compute/profit_bricks/requests/disconnect_storage_from_server.rb
|
206
|
+
- lib/fog/compute/profit_bricks/requests/get_all_data_centers.rb
|
207
|
+
- lib/fog/compute/profit_bricks/requests/get_all_flavors.rb
|
208
|
+
- lib/fog/compute/profit_bricks/requests/get_all_images.rb
|
209
|
+
- lib/fog/compute/profit_bricks/requests/get_all_locations.rb
|
210
|
+
- lib/fog/compute/profit_bricks/requests/get_all_nic.rb
|
211
|
+
- lib/fog/compute/profit_bricks/requests/get_all_servers.rb
|
212
|
+
- lib/fog/compute/profit_bricks/requests/get_all_storages.rb
|
213
|
+
- lib/fog/compute/profit_bricks/requests/get_data_center.rb
|
214
|
+
- lib/fog/compute/profit_bricks/requests/get_data_center_state.rb
|
215
|
+
- lib/fog/compute/profit_bricks/requests/get_flavor.rb
|
216
|
+
- lib/fog/compute/profit_bricks/requests/get_image.rb
|
217
|
+
- lib/fog/compute/profit_bricks/requests/get_location.rb
|
218
|
+
- lib/fog/compute/profit_bricks/requests/get_nic.rb
|
219
|
+
- lib/fog/compute/profit_bricks/requests/get_server.rb
|
220
|
+
- lib/fog/compute/profit_bricks/requests/get_storage.rb
|
221
|
+
- lib/fog/compute/profit_bricks/requests/reset_server.rb
|
222
|
+
- lib/fog/compute/profit_bricks/requests/set_internet_access.rb
|
223
|
+
- lib/fog/compute/profit_bricks/requests/start_server.rb
|
224
|
+
- lib/fog/compute/profit_bricks/requests/stop_server.rb
|
225
|
+
- lib/fog/compute/profit_bricks/requests/update_data_center.rb
|
226
|
+
- lib/fog/compute/profit_bricks/requests/update_nic.rb
|
227
|
+
- lib/fog/compute/profit_bricks/requests/update_server.rb
|
228
|
+
- lib/fog/compute/profit_bricks/requests/update_storage.rb
|
229
|
+
- lib/fog/models/profit_bricks/base.rb
|
230
|
+
- lib/fog/parsers/compute.rb
|
231
|
+
- lib/fog/parsers/compute/profit_bricks/base.rb
|
232
|
+
- lib/fog/parsers/compute/profit_bricks/clear_data_center.rb
|
233
|
+
- lib/fog/parsers/compute/profit_bricks/connect_storage_to_server.rb
|
234
|
+
- lib/fog/parsers/compute/profit_bricks/create_data_center.rb
|
235
|
+
- lib/fog/parsers/compute/profit_bricks/create_nic.rb
|
236
|
+
- lib/fog/parsers/compute/profit_bricks/create_server.rb
|
237
|
+
- lib/fog/parsers/compute/profit_bricks/create_storage.rb
|
238
|
+
- lib/fog/parsers/compute/profit_bricks/delete_data_center.rb
|
239
|
+
- lib/fog/parsers/compute/profit_bricks/delete_nic.rb
|
240
|
+
- lib/fog/parsers/compute/profit_bricks/delete_server.rb
|
241
|
+
- lib/fog/parsers/compute/profit_bricks/delete_storage.rb
|
242
|
+
- lib/fog/parsers/compute/profit_bricks/disconnect_storage_from_server.rb
|
243
|
+
- lib/fog/parsers/compute/profit_bricks/get_all_data_centers.rb
|
244
|
+
- lib/fog/parsers/compute/profit_bricks/get_all_images.rb
|
245
|
+
- lib/fog/parsers/compute/profit_bricks/get_all_nic.rb
|
246
|
+
- lib/fog/parsers/compute/profit_bricks/get_all_servers.rb
|
247
|
+
- lib/fog/parsers/compute/profit_bricks/get_all_storages.rb
|
248
|
+
- lib/fog/parsers/compute/profit_bricks/get_data_center.rb
|
249
|
+
- lib/fog/parsers/compute/profit_bricks/get_data_center_state.rb
|
250
|
+
- lib/fog/parsers/compute/profit_bricks/get_image.rb
|
251
|
+
- lib/fog/parsers/compute/profit_bricks/get_nic.rb
|
252
|
+
- lib/fog/parsers/compute/profit_bricks/get_server.rb
|
253
|
+
- lib/fog/parsers/compute/profit_bricks/get_storage.rb
|
254
|
+
- lib/fog/parsers/compute/profit_bricks/reset_server.rb
|
255
|
+
- lib/fog/parsers/compute/profit_bricks/set_internet_access.rb
|
256
|
+
- lib/fog/parsers/compute/profit_bricks/update_data_center.rb
|
257
|
+
- lib/fog/parsers/compute/profit_bricks/update_nic.rb
|
258
|
+
- lib/fog/parsers/compute/profit_bricks/update_server.rb
|
259
|
+
- lib/fog/parsers/compute/profit_bricks/update_storage.rb
|
177
260
|
- lib/fog/profitbricks.rb
|
178
261
|
- lib/fog/profitbricks/compute.rb
|
179
|
-
- lib/fog/profitbricks/
|
180
|
-
- lib/fog/profitbricks/models/base.rb
|
181
|
-
- lib/fog/profitbricks/models/compute/datacenter.rb
|
182
|
-
- lib/fog/profitbricks/models/compute/datacenters.rb
|
183
|
-
- lib/fog/profitbricks/models/compute/flavor.rb
|
184
|
-
- lib/fog/profitbricks/models/compute/flavors.rb
|
185
|
-
- lib/fog/profitbricks/models/compute/image.rb
|
186
|
-
- lib/fog/profitbricks/models/compute/images.rb
|
187
|
-
- lib/fog/profitbricks/models/compute/interface.rb
|
188
|
-
- lib/fog/profitbricks/models/compute/interfaces.rb
|
189
|
-
- lib/fog/profitbricks/models/compute/region.rb
|
190
|
-
- lib/fog/profitbricks/models/compute/regions.rb
|
191
|
-
- lib/fog/profitbricks/models/compute/server.rb
|
192
|
-
- lib/fog/profitbricks/models/compute/servers.rb
|
193
|
-
- lib/fog/profitbricks/models/compute/volume.rb
|
194
|
-
- lib/fog/profitbricks/models/compute/volumes.rb
|
195
|
-
- lib/fog/profitbricks/parsers/base.rb
|
196
|
-
- lib/fog/profitbricks/parsers/compute/clear_data_center.rb
|
197
|
-
- lib/fog/profitbricks/parsers/compute/connect_storage_to_server.rb
|
198
|
-
- lib/fog/profitbricks/parsers/compute/create_data_center.rb
|
199
|
-
- lib/fog/profitbricks/parsers/compute/create_nic.rb
|
200
|
-
- lib/fog/profitbricks/parsers/compute/create_server.rb
|
201
|
-
- lib/fog/profitbricks/parsers/compute/create_storage.rb
|
202
|
-
- lib/fog/profitbricks/parsers/compute/delete_data_center.rb
|
203
|
-
- lib/fog/profitbricks/parsers/compute/delete_nic.rb
|
204
|
-
- lib/fog/profitbricks/parsers/compute/delete_server.rb
|
205
|
-
- lib/fog/profitbricks/parsers/compute/delete_storage.rb
|
206
|
-
- lib/fog/profitbricks/parsers/compute/disconnect_storage_from_server.rb
|
207
|
-
- lib/fog/profitbricks/parsers/compute/get_all_data_centers.rb
|
208
|
-
- lib/fog/profitbricks/parsers/compute/get_all_images.rb
|
209
|
-
- lib/fog/profitbricks/parsers/compute/get_all_nic.rb
|
210
|
-
- lib/fog/profitbricks/parsers/compute/get_all_servers.rb
|
211
|
-
- lib/fog/profitbricks/parsers/compute/get_all_storages.rb
|
212
|
-
- lib/fog/profitbricks/parsers/compute/get_data_center.rb
|
213
|
-
- lib/fog/profitbricks/parsers/compute/get_data_center_state.rb
|
214
|
-
- lib/fog/profitbricks/parsers/compute/get_image.rb
|
215
|
-
- lib/fog/profitbricks/parsers/compute/get_nic.rb
|
216
|
-
- lib/fog/profitbricks/parsers/compute/get_server.rb
|
217
|
-
- lib/fog/profitbricks/parsers/compute/get_storage.rb
|
218
|
-
- lib/fog/profitbricks/parsers/compute/reset_server.rb
|
219
|
-
- lib/fog/profitbricks/parsers/compute/set_internet_access.rb
|
220
|
-
- lib/fog/profitbricks/parsers/compute/update_data_center.rb
|
221
|
-
- lib/fog/profitbricks/parsers/compute/update_nic.rb
|
222
|
-
- lib/fog/profitbricks/parsers/compute/update_server.rb
|
223
|
-
- lib/fog/profitbricks/parsers/compute/update_storage.rb
|
224
|
-
- lib/fog/profitbricks/requests/compute/clear_data_center.rb
|
225
|
-
- lib/fog/profitbricks/requests/compute/connect_storage_to_server.rb
|
226
|
-
- lib/fog/profitbricks/requests/compute/create_data_center.rb
|
227
|
-
- lib/fog/profitbricks/requests/compute/create_flavor.rb
|
228
|
-
- lib/fog/profitbricks/requests/compute/create_nic.rb
|
229
|
-
- lib/fog/profitbricks/requests/compute/create_server.rb
|
230
|
-
- lib/fog/profitbricks/requests/compute/create_storage.rb
|
231
|
-
- lib/fog/profitbricks/requests/compute/delete_data_center.rb
|
232
|
-
- lib/fog/profitbricks/requests/compute/delete_nic.rb
|
233
|
-
- lib/fog/profitbricks/requests/compute/delete_server.rb
|
234
|
-
- lib/fog/profitbricks/requests/compute/delete_storage.rb
|
235
|
-
- lib/fog/profitbricks/requests/compute/disconnect_storage_from_server.rb
|
236
|
-
- lib/fog/profitbricks/requests/compute/get_all_data_centers.rb
|
237
|
-
- lib/fog/profitbricks/requests/compute/get_all_flavors.rb
|
238
|
-
- lib/fog/profitbricks/requests/compute/get_all_images.rb
|
239
|
-
- lib/fog/profitbricks/requests/compute/get_all_locations.rb
|
240
|
-
- lib/fog/profitbricks/requests/compute/get_all_nic.rb
|
241
|
-
- lib/fog/profitbricks/requests/compute/get_all_servers.rb
|
242
|
-
- lib/fog/profitbricks/requests/compute/get_all_storages.rb
|
243
|
-
- lib/fog/profitbricks/requests/compute/get_data_center.rb
|
244
|
-
- lib/fog/profitbricks/requests/compute/get_data_center_state.rb
|
245
|
-
- lib/fog/profitbricks/requests/compute/get_flavor.rb
|
246
|
-
- lib/fog/profitbricks/requests/compute/get_image.rb
|
247
|
-
- lib/fog/profitbricks/requests/compute/get_location.rb
|
248
|
-
- lib/fog/profitbricks/requests/compute/get_nic.rb
|
249
|
-
- lib/fog/profitbricks/requests/compute/get_server.rb
|
250
|
-
- lib/fog/profitbricks/requests/compute/get_storage.rb
|
251
|
-
- lib/fog/profitbricks/requests/compute/reset_server.rb
|
252
|
-
- lib/fog/profitbricks/requests/compute/set_internet_access.rb
|
253
|
-
- lib/fog/profitbricks/requests/compute/start_server.rb
|
254
|
-
- lib/fog/profitbricks/requests/compute/stop_server.rb
|
255
|
-
- lib/fog/profitbricks/requests/compute/update_data_center.rb
|
256
|
-
- lib/fog/profitbricks/requests/compute/update_nic.rb
|
257
|
-
- lib/fog/profitbricks/requests/compute/update_server.rb
|
258
|
-
- lib/fog/profitbricks/requests/compute/update_storage.rb
|
262
|
+
- lib/fog/profitbricks/storage.rb
|
259
263
|
- lib/fog/profitbricks/version.rb
|
260
264
|
- spec/minitest_helper.rb
|
261
265
|
- tests/helper.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module ProfitBricks
|
3
|
-
def self.construct_envelope(&block)
|
4
|
-
namespaces = {
|
5
|
-
"xmlns" => "",
|
6
|
-
"xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/",
|
7
|
-
"xmlns:ws" => "http://ws.api.profitbricks.com/"
|
8
|
-
}
|
9
|
-
|
10
|
-
Nokogiri::XML::Builder.new do |xml|
|
11
|
-
xml[:soapenv].Envelope(namespaces) do
|
12
|
-
xml[:soapenv].Header
|
13
|
-
xml[:soapenv].Body(&block)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require "nokogiri"
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Parsers
|
5
|
-
module ProfitBricks
|
6
|
-
class Base < Nokogiri::XML::SAX::Document
|
7
|
-
attr_reader :response
|
8
|
-
|
9
|
-
def initialize
|
10
|
-
reset
|
11
|
-
end
|
12
|
-
|
13
|
-
def attr_value(name, attrs)
|
14
|
-
(entry = attrs.find {|a, v| a == name }) && entry.last
|
15
|
-
end
|
16
|
-
|
17
|
-
def reset
|
18
|
-
@response = {}
|
19
|
-
end
|
20
|
-
|
21
|
-
def characters(string)
|
22
|
-
@value ||= ''
|
23
|
-
@value << string
|
24
|
-
end
|
25
|
-
|
26
|
-
# ###############################################################################
|
27
|
-
# This is a workaround. Original implementation from Nokogiri is overwritten with
|
28
|
-
# one that does not join namespace prefix with local name.
|
29
|
-
def start_element_namespace name, attrs = [], prefix = nil, uri = nil, ns = []
|
30
|
-
start_element name, attrs
|
31
|
-
end
|
32
|
-
|
33
|
-
def end_element_namespace name, prefix = nil, uri = nil
|
34
|
-
end_element name
|
35
|
-
end
|
36
|
-
|
37
|
-
# ###############################################################################
|
38
|
-
|
39
|
-
def start_element(name, attrs = [])
|
40
|
-
@value = nil
|
41
|
-
end
|
42
|
-
|
43
|
-
def value
|
44
|
-
@value && @value.dup
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class ProfitBricks
|
4
|
-
class Real
|
5
|
-
require 'fog/profitbricks/parsers/compute/connect_storage_to_server'
|
6
|
-
|
7
|
-
# Connect virtual storage
|
8
|
-
#
|
9
|
-
# ==== Parameters
|
10
|
-
# * storageId<~String> - Required, UUID of virtual storage
|
11
|
-
# * serverId<~String> - Required,
|
12
|
-
# * options<~Hash>:
|
13
|
-
# * busType<~String> - Optional, VIRTIO, IDE
|
14
|
-
# * deviceNumber<~Integer> - Optional,
|
15
|
-
#
|
16
|
-
# ==== Returns
|
17
|
-
# * response<~Excon::Response>:
|
18
|
-
# * body<~Hash>:
|
19
|
-
# * connectStorageToServerResponse<~Hash>:
|
20
|
-
# * requestId<~String> - ID of request
|
21
|
-
# * dataCenterId<~String> - UUID of virtual data center
|
22
|
-
# * dataCenterVersion<~Integer> - Version of the virtual data center
|
23
|
-
#
|
24
|
-
# {ProfitBricks API Documentation}[http://www.profitbricks.com/apidoc/ConnectStorage.html]
|
25
|
-
def connect_storage_to_server(storage_id, server_id, options={})
|
26
|
-
soap_envelope = Fog::ProfitBricks.construct_envelope {
|
27
|
-
|xml| xml[:ws].connectStorageToServer {
|
28
|
-
xml.request {
|
29
|
-
xml.storageId(storage_id)
|
30
|
-
xml.serverId(server_id)
|
31
|
-
options.each { |key, value| xml.send(key, value) }
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
request(
|
37
|
-
:expects => [200],
|
38
|
-
:method => 'POST',
|
39
|
-
:body => soap_envelope.to_xml,
|
40
|
-
:parser =>
|
41
|
-
Fog::Parsers::Compute::ProfitBricks::ConnectStorageToServer.new
|
42
|
-
)
|
43
|
-
rescue Excon::Errors::InternalServerError => error
|
44
|
-
Fog::Errors::NotFound.new(error)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
class Mock
|
49
|
-
def connect_storage_to_server(storage_id, server_id, options={})
|
50
|
-
|
51
|
-
if storage = self.data[:volumes].find {
|
52
|
-
|attrib| attrib['storageId'] == storage_id
|
53
|
-
}
|
54
|
-
else
|
55
|
-
raise Fog::Errors::NotFound.new(
|
56
|
-
'The requested volume could not be found'
|
57
|
-
)
|
58
|
-
end
|
59
|
-
|
60
|
-
if server = self.data[:servers].find {
|
61
|
-
|attrib| attrib['serverId'] == server_id
|
62
|
-
}
|
63
|
-
server['connectedStorages'] << storage
|
64
|
-
else
|
65
|
-
raise Fog::Errors::NotFound.new(
|
66
|
-
'The requested server could not be found'
|
67
|
-
)
|
68
|
-
end
|
69
|
-
|
70
|
-
response = Excon::Response.new
|
71
|
-
response.status = 200
|
72
|
-
response.body =
|
73
|
-
{ 'connectStorageToServerResponse' =>
|
74
|
-
{
|
75
|
-
'requestId' => Fog::Mock::random_numbers(7),
|
76
|
-
'dataCenterId' => Fog::UUID.uuid,
|
77
|
-
'dataCenterVersion' => 1
|
78
|
-
}
|
79
|
-
}
|
80
|
-
response
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|