fog-profitbricks 0.0.5 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +1465 -4
- data/Rakefile +3 -0
- data/examples/pb_demo.rb +83 -35
- data/fog-profitbricks.gemspec +10 -10
- data/gemfiles/Gemfile.1.8.7 +0 -1
- data/lib/fog/profitbricks.rb +4 -23
- data/lib/fog/profitbricks/compute.rb +1082 -1
- data/lib/fog/profitbricks/helpers/compute/data_helper.rb +12 -0
- data/lib/fog/profitbricks/models/base.rb +37 -0
- data/lib/fog/profitbricks/models/compute/datacenter.rb +64 -0
- data/lib/fog/{compute/profit_bricks/models → profitbricks/models/compute}/datacenters.rb +9 -4
- data/lib/fog/profitbricks/models/compute/firewall_rule.rb +101 -0
- data/lib/fog/profitbricks/models/compute/firewall_rules.rb +40 -0
- data/lib/fog/{compute/profit_bricks/models → profitbricks/models/compute}/flavor.rb +0 -0
- data/lib/fog/{compute/profit_bricks/models → profitbricks/models/compute}/flavors.rb +0 -0
- data/lib/fog/profitbricks/models/compute/image.rb +72 -0
- data/lib/fog/profitbricks/models/compute/images.rb +28 -0
- data/lib/fog/profitbricks/models/compute/ip_block.rb +58 -0
- data/lib/fog/profitbricks/models/compute/ip_blocks.rb +30 -0
- data/lib/fog/profitbricks/models/compute/lan.rb +89 -0
- data/lib/fog/profitbricks/models/compute/lans.rb +36 -0
- data/lib/fog/profitbricks/models/compute/load_balancer.rb +126 -0
- data/lib/fog/profitbricks/models/compute/load_balancers.rb +34 -0
- data/lib/fog/profitbricks/models/compute/location.rb +18 -0
- data/lib/fog/profitbricks/models/compute/locations.rb +28 -0
- data/lib/fog/profitbricks/models/compute/nic.rb +111 -0
- data/lib/fog/profitbricks/models/compute/nics.rb +38 -0
- data/lib/fog/{compute/profit_bricks/models → profitbricks/models/compute}/region.rb +0 -0
- data/lib/fog/{compute/profit_bricks/models → profitbricks/models/compute}/regions.rb +0 -0
- data/lib/fog/profitbricks/models/compute/request.rb +24 -0
- data/lib/fog/profitbricks/models/compute/requests.rb +37 -0
- data/lib/fog/profitbricks/models/compute/server.rb +263 -0
- data/lib/fog/profitbricks/models/compute/servers.rb +32 -0
- data/lib/fog/profitbricks/models/compute/snapshot.rb +81 -0
- data/lib/fog/profitbricks/models/compute/snapshots.rb +28 -0
- data/lib/fog/profitbricks/models/compute/volume.rb +123 -0
- data/lib/fog/profitbricks/models/compute/volumes.rb +33 -0
- data/lib/fog/profitbricks/requests/compute/associate_nic_to_load_balancer.rb +104 -0
- data/lib/fog/profitbricks/requests/compute/attach_cdrom.rb +88 -0
- data/lib/fog/profitbricks/requests/compute/attach_volume.rb +89 -0
- data/lib/fog/profitbricks/requests/compute/create_datacenter.rb +89 -0
- data/lib/fog/profitbricks/requests/compute/create_firewall_rule.rb +103 -0
- data/lib/fog/{compute/profit_bricks/requests → profitbricks/requests/compute}/create_flavor.rb +0 -0
- data/lib/fog/profitbricks/requests/compute/create_ip_block.rb +81 -0
- data/lib/fog/profitbricks/requests/compute/create_lan.rb +160 -0
- data/lib/fog/profitbricks/requests/compute/create_load_balancer.rb +87 -0
- data/lib/fog/profitbricks/requests/compute/create_nic.rb +124 -0
- data/lib/fog/profitbricks/requests/compute/create_server.rb +257 -0
- data/lib/fog/profitbricks/requests/compute/create_volume.rb +133 -0
- data/lib/fog/profitbricks/requests/compute/create_volume_snapshot.rb +113 -0
- data/lib/fog/profitbricks/requests/compute/delete_datacenter.rb +43 -0
- data/lib/fog/profitbricks/requests/compute/delete_firewall_rule.rb +47 -0
- data/lib/fog/profitbricks/requests/compute/delete_image.rb +43 -0
- data/lib/fog/profitbricks/requests/compute/delete_ip_block.rb +43 -0
- data/lib/fog/profitbricks/requests/compute/delete_lan.rb +44 -0
- data/lib/fog/profitbricks/requests/compute/delete_load_balancer.rb +44 -0
- data/lib/fog/profitbricks/requests/compute/delete_nic.rb +46 -0
- data/lib/fog/profitbricks/requests/compute/delete_server.rb +48 -0
- data/lib/fog/profitbricks/requests/compute/delete_snapshot.rb +43 -0
- data/lib/fog/profitbricks/requests/compute/delete_volume.rb +44 -0
- data/lib/fog/profitbricks/requests/compute/detach_cdrom.rb +52 -0
- data/lib/fog/profitbricks/requests/compute/detach_volume.rb +53 -0
- data/lib/fog/profitbricks/requests/compute/get_all_datacenters.rb +59 -0
- data/lib/fog/profitbricks/requests/compute/get_all_firewall_rules.rb +76 -0
- data/lib/fog/{compute/profit_bricks/requests → profitbricks/requests/compute}/get_all_flavors.rb +0 -0
- data/lib/fog/profitbricks/requests/compute/get_all_images.rb +66 -0
- data/lib/fog/profitbricks/requests/compute/get_all_ip_blocks.rb +56 -0
- data/lib/fog/profitbricks/requests/compute/get_all_lans.rb +120 -0
- data/lib/fog/profitbricks/requests/compute/get_all_load_balanced_nics.rb +100 -0
- data/lib/fog/profitbricks/requests/compute/get_all_load_balancers.rb +117 -0
- data/lib/fog/profitbricks/requests/compute/get_all_locations.rb +44 -0
- data/lib/fog/profitbricks/requests/compute/get_all_nic.rb +102 -0
- data/lib/fog/profitbricks/requests/compute/get_all_requests.rb +43 -0
- data/lib/fog/profitbricks/requests/compute/get_all_servers.rb +134 -0
- data/lib/fog/profitbricks/requests/compute/get_all_snapshots.rb +66 -0
- data/lib/fog/profitbricks/requests/compute/get_all_volumes.rb +78 -0
- data/lib/fog/profitbricks/requests/compute/get_attached_cdrom.rb +78 -0
- data/lib/fog/profitbricks/requests/compute/get_attached_volume.rb +79 -0
- data/lib/fog/profitbricks/requests/compute/get_datacenter.rb +65 -0
- data/lib/fog/profitbricks/requests/compute/get_firewall_rule.rb +71 -0
- data/lib/fog/{compute/profit_bricks/requests → profitbricks/requests/compute}/get_flavor.rb +0 -0
- data/lib/fog/profitbricks/requests/compute/get_image.rb +71 -0
- data/lib/fog/profitbricks/requests/compute/get_ip_block.rb +58 -0
- data/lib/fog/profitbricks/requests/compute/get_lan.rb +120 -0
- data/lib/fog/profitbricks/requests/compute/get_load_balanced_nic.rb +99 -0
- data/lib/fog/profitbricks/requests/compute/get_load_balancer.rb +116 -0
- data/lib/fog/profitbricks/requests/compute/get_location.rb +49 -0
- data/lib/fog/profitbricks/requests/compute/get_nic.rb +98 -0
- data/lib/fog/profitbricks/requests/compute/get_request.rb +61 -0
- data/lib/fog/profitbricks/requests/compute/get_request_status.rb +50 -0
- data/lib/fog/profitbricks/requests/compute/get_server.rb +133 -0
- data/lib/fog/profitbricks/requests/compute/get_snapshot.rb +70 -0
- data/lib/fog/profitbricks/requests/compute/get_volume.rb +73 -0
- data/lib/fog/profitbricks/requests/compute/list_attached_cdroms.rb +74 -0
- data/lib/fog/profitbricks/requests/compute/list_attached_volumes.rb +75 -0
- data/lib/fog/profitbricks/requests/compute/reboot_server.rb +47 -0
- data/lib/fog/profitbricks/requests/compute/remove_nic_association.rb +44 -0
- data/lib/fog/profitbricks/requests/compute/restore_volume_snapshot.rb +61 -0
- data/lib/fog/profitbricks/requests/compute/start_server.rb +49 -0
- data/lib/fog/profitbricks/requests/compute/stop_server.rb +50 -0
- data/lib/fog/profitbricks/requests/compute/update_datacenter.rb +73 -0
- data/lib/fog/profitbricks/requests/compute/update_firewall_rule.rb +87 -0
- data/lib/fog/profitbricks/requests/compute/update_image.rb +90 -0
- data/lib/fog/profitbricks/requests/compute/update_lan.rb +126 -0
- data/lib/fog/profitbricks/requests/compute/update_load_balancer.rb +70 -0
- data/lib/fog/profitbricks/requests/compute/update_nic.rb +107 -0
- data/lib/fog/profitbricks/requests/compute/update_server.rb +147 -0
- data/lib/fog/profitbricks/requests/compute/update_snapshot.rb +90 -0
- data/lib/fog/profitbricks/requests/compute/update_volume.rb +82 -0
- data/lib/fog/profitbricks/version.rb +1 -1
- data/tests/profitbricks/requests/compute/composite_create_tests.rb +241 -0
- data/tests/profitbricks/requests/compute/location_tests.rb +24 -12
- data/tests/profitbricks/requests/compute/nic_tests.rb +290 -0
- data/tests/profitbricks/requests/compute/request_tests.rb +52 -0
- data/tests/profitbricks/requests/compute/server_tests.rb +398 -175
- metadata +140 -133
- data/lib/fog/compute/profit_bricks.rb +0 -217
- data/lib/fog/compute/profit_bricks/models/datacenter.rb +0 -60
- data/lib/fog/compute/profit_bricks/models/image.rb +0 -27
- data/lib/fog/compute/profit_bricks/models/images.rb +0 -22
- data/lib/fog/compute/profit_bricks/models/interface.rb +0 -61
- data/lib/fog/compute/profit_bricks/models/interfaces.rb +0 -23
- data/lib/fog/compute/profit_bricks/models/server.rb +0 -104
- data/lib/fog/compute/profit_bricks/models/servers.rb +0 -22
- data/lib/fog/compute/profit_bricks/models/volume.rb +0 -71
- data/lib/fog/compute/profit_bricks/models/volumes.rb +0 -23
- data/lib/fog/compute/profit_bricks/requests/clear_data_center.rb +0 -51
- data/lib/fog/compute/profit_bricks/requests/connect_storage_to_server.rb +0 -83
- data/lib/fog/compute/profit_bricks/requests/create_data_center.rb +0 -62
- data/lib/fog/compute/profit_bricks/requests/create_nic.rb +0 -79
- data/lib/fog/compute/profit_bricks/requests/create_server.rb +0 -105
- data/lib/fog/compute/profit_bricks/requests/create_storage.rb +0 -96
- data/lib/fog/compute/profit_bricks/requests/delete_data_center.rb +0 -60
- data/lib/fog/compute/profit_bricks/requests/delete_nic.rb +0 -64
- data/lib/fog/compute/profit_bricks/requests/delete_server.rb +0 -64
- data/lib/fog/compute/profit_bricks/requests/delete_storage.rb +0 -64
- data/lib/fog/compute/profit_bricks/requests/disconnect_storage_from_server.rb +0 -76
- data/lib/fog/compute/profit_bricks/requests/get_all_data_centers.rb +0 -31
- data/lib/fog/compute/profit_bricks/requests/get_all_images.rb +0 -65
- data/lib/fog/compute/profit_bricks/requests/get_all_locations.rb +0 -44
- data/lib/fog/compute/profit_bricks/requests/get_all_nic.rb +0 -53
- data/lib/fog/compute/profit_bricks/requests/get_all_servers.rb +0 -57
- data/lib/fog/compute/profit_bricks/requests/get_all_storages.rb +0 -56
- data/lib/fog/compute/profit_bricks/requests/get_data_center.rb +0 -38
- data/lib/fog/compute/profit_bricks/requests/get_data_center_state.rb +0 -42
- data/lib/fog/compute/profit_bricks/requests/get_image.rb +0 -69
- data/lib/fog/compute/profit_bricks/requests/get_location.rb +0 -48
- data/lib/fog/compute/profit_bricks/requests/get_nic.rb +0 -63
- data/lib/fog/compute/profit_bricks/requests/get_server.rb +0 -98
- data/lib/fog/compute/profit_bricks/requests/get_storage.rb +0 -63
- data/lib/fog/compute/profit_bricks/requests/reset_server.rb +0 -49
- data/lib/fog/compute/profit_bricks/requests/set_internet_access.rb +0 -59
- data/lib/fog/compute/profit_bricks/requests/start_server.rb +0 -58
- data/lib/fog/compute/profit_bricks/requests/stop_server.rb +0 -58
- data/lib/fog/compute/profit_bricks/requests/update_data_center.rb +0 -54
- data/lib/fog/compute/profit_bricks/requests/update_nic.rb +0 -74
- data/lib/fog/compute/profit_bricks/requests/update_server.rb +0 -79
- data/lib/fog/compute/profit_bricks/requests/update_storage.rb +0 -73
- data/lib/fog/models/profit_bricks/base.rb +0 -11
- data/lib/fog/parsers/compute.rb +0 -37
- data/lib/fog/parsers/compute/profit_bricks/base.rb +0 -51
- data/lib/fog/parsers/compute/profit_bricks/clear_data_center.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/connect_storage_to_server.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/create_data_center.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/create_nic.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/create_server.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/create_storage.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/delete_data_center.rb +0 -20
- data/lib/fog/parsers/compute/profit_bricks/delete_nic.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/delete_server.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/delete_storage.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/disconnect_storage_from_server.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/get_all_data_centers.rb +0 -26
- data/lib/fog/parsers/compute/profit_bricks/get_all_images.rb +0 -30
- data/lib/fog/parsers/compute/profit_bricks/get_all_nic.rb +0 -30
- data/lib/fog/parsers/compute/profit_bricks/get_all_servers.rb +0 -57
- data/lib/fog/parsers/compute/profit_bricks/get_all_storages.rb +0 -33
- data/lib/fog/parsers/compute/profit_bricks/get_data_center.rb +0 -23
- data/lib/fog/parsers/compute/profit_bricks/get_data_center_state.rb +0 -20
- data/lib/fog/parsers/compute/profit_bricks/get_image.rb +0 -26
- data/lib/fog/parsers/compute/profit_bricks/get_nic.rb +0 -27
- data/lib/fog/parsers/compute/profit_bricks/get_server.rb +0 -57
- data/lib/fog/parsers/compute/profit_bricks/get_storage.rb +0 -30
- data/lib/fog/parsers/compute/profit_bricks/reset_server.rb +0 -20
- data/lib/fog/parsers/compute/profit_bricks/set_internet_access.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/update_data_center.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/update_nic.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/update_server.rb +0 -22
- data/lib/fog/parsers/compute/profit_bricks/update_storage.rb +0 -22
- data/lib/fog/profitbricks/storage.rb +0 -1
- data/tests/profitbricks/requests/compute/image_tests.rb +0 -50
- data/tests/profitbricks/requests/compute/interface_tests.rb +0 -101
metadata
CHANGED
@@ -1,153 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-profitbricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan Devenport
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-15 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
|
-
version: '
|
19
|
+
version: '1.42'
|
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
|
-
version: '
|
26
|
+
version: '1.42'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: fog-
|
28
|
+
name: fog-json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '1.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
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: nokogiri
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
40
|
+
version: '1.0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rake
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
|
-
- -
|
45
|
+
- - ~>
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
47
|
+
version: '10.4'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- -
|
52
|
+
- - ~>
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
54
|
+
version: '10.4'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: minitest
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- -
|
59
|
+
- - ~>
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
61
|
+
version: '4'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- -
|
66
|
+
- - ~>
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
68
|
+
version: '4'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: shindo
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
|
-
- -
|
73
|
+
- - ~>
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
75
|
+
version: '0.3'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- -
|
80
|
+
- - ~>
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
82
|
+
version: '0.3'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: turn
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- -
|
87
|
+
- - ~>
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
89
|
+
version: '0.9'
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- -
|
94
|
+
- - ~>
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
96
|
+
version: '0.9'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: pry
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
103
|
+
version: '0.10'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- -
|
108
|
+
- - ~>
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
110
|
+
version: '0.10'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: rubocop
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
|
-
- -
|
115
|
+
- - ~>
|
130
116
|
- !ruby/object:Gem::Version
|
131
117
|
version: '0'
|
132
118
|
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
|
-
- -
|
122
|
+
- - ~>
|
137
123
|
- !ruby/object:Gem::Version
|
138
124
|
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: coveralls
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
|
-
- -
|
129
|
+
- - ~>
|
144
130
|
- !ruby/object:Gem::Version
|
145
131
|
version: '0'
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
|
-
- -
|
136
|
+
- - ~>
|
151
137
|
- !ruby/object:Gem::Version
|
152
138
|
version: '0'
|
153
139
|
description: |-
|
@@ -176,99 +162,120 @@ files:
|
|
176
162
|
- gemfiles/Gemfile.1.9.2+
|
177
163
|
- gemfiles/Gemfile.1.9.2-
|
178
164
|
- 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
|
260
165
|
- lib/fog/profitbricks.rb
|
261
166
|
- lib/fog/profitbricks/compute.rb
|
262
|
-
- lib/fog/profitbricks/
|
167
|
+
- lib/fog/profitbricks/helpers/compute/data_helper.rb
|
168
|
+
- lib/fog/profitbricks/models/base.rb
|
169
|
+
- lib/fog/profitbricks/models/compute/datacenter.rb
|
170
|
+
- lib/fog/profitbricks/models/compute/datacenters.rb
|
171
|
+
- lib/fog/profitbricks/models/compute/firewall_rule.rb
|
172
|
+
- lib/fog/profitbricks/models/compute/firewall_rules.rb
|
173
|
+
- lib/fog/profitbricks/models/compute/flavor.rb
|
174
|
+
- lib/fog/profitbricks/models/compute/flavors.rb
|
175
|
+
- lib/fog/profitbricks/models/compute/image.rb
|
176
|
+
- lib/fog/profitbricks/models/compute/images.rb
|
177
|
+
- lib/fog/profitbricks/models/compute/ip_block.rb
|
178
|
+
- lib/fog/profitbricks/models/compute/ip_blocks.rb
|
179
|
+
- lib/fog/profitbricks/models/compute/lan.rb
|
180
|
+
- lib/fog/profitbricks/models/compute/lans.rb
|
181
|
+
- lib/fog/profitbricks/models/compute/load_balancer.rb
|
182
|
+
- lib/fog/profitbricks/models/compute/load_balancers.rb
|
183
|
+
- lib/fog/profitbricks/models/compute/location.rb
|
184
|
+
- lib/fog/profitbricks/models/compute/locations.rb
|
185
|
+
- lib/fog/profitbricks/models/compute/nic.rb
|
186
|
+
- lib/fog/profitbricks/models/compute/nics.rb
|
187
|
+
- lib/fog/profitbricks/models/compute/region.rb
|
188
|
+
- lib/fog/profitbricks/models/compute/regions.rb
|
189
|
+
- lib/fog/profitbricks/models/compute/request.rb
|
190
|
+
- lib/fog/profitbricks/models/compute/requests.rb
|
191
|
+
- lib/fog/profitbricks/models/compute/server.rb
|
192
|
+
- lib/fog/profitbricks/models/compute/servers.rb
|
193
|
+
- lib/fog/profitbricks/models/compute/snapshot.rb
|
194
|
+
- lib/fog/profitbricks/models/compute/snapshots.rb
|
195
|
+
- lib/fog/profitbricks/models/compute/volume.rb
|
196
|
+
- lib/fog/profitbricks/models/compute/volumes.rb
|
197
|
+
- lib/fog/profitbricks/requests/compute/associate_nic_to_load_balancer.rb
|
198
|
+
- lib/fog/profitbricks/requests/compute/attach_cdrom.rb
|
199
|
+
- lib/fog/profitbricks/requests/compute/attach_volume.rb
|
200
|
+
- lib/fog/profitbricks/requests/compute/create_datacenter.rb
|
201
|
+
- lib/fog/profitbricks/requests/compute/create_firewall_rule.rb
|
202
|
+
- lib/fog/profitbricks/requests/compute/create_flavor.rb
|
203
|
+
- lib/fog/profitbricks/requests/compute/create_ip_block.rb
|
204
|
+
- lib/fog/profitbricks/requests/compute/create_lan.rb
|
205
|
+
- lib/fog/profitbricks/requests/compute/create_load_balancer.rb
|
206
|
+
- lib/fog/profitbricks/requests/compute/create_nic.rb
|
207
|
+
- lib/fog/profitbricks/requests/compute/create_server.rb
|
208
|
+
- lib/fog/profitbricks/requests/compute/create_volume.rb
|
209
|
+
- lib/fog/profitbricks/requests/compute/create_volume_snapshot.rb
|
210
|
+
- lib/fog/profitbricks/requests/compute/delete_datacenter.rb
|
211
|
+
- lib/fog/profitbricks/requests/compute/delete_firewall_rule.rb
|
212
|
+
- lib/fog/profitbricks/requests/compute/delete_image.rb
|
213
|
+
- lib/fog/profitbricks/requests/compute/delete_ip_block.rb
|
214
|
+
- lib/fog/profitbricks/requests/compute/delete_lan.rb
|
215
|
+
- lib/fog/profitbricks/requests/compute/delete_load_balancer.rb
|
216
|
+
- lib/fog/profitbricks/requests/compute/delete_nic.rb
|
217
|
+
- lib/fog/profitbricks/requests/compute/delete_server.rb
|
218
|
+
- lib/fog/profitbricks/requests/compute/delete_snapshot.rb
|
219
|
+
- lib/fog/profitbricks/requests/compute/delete_volume.rb
|
220
|
+
- lib/fog/profitbricks/requests/compute/detach_cdrom.rb
|
221
|
+
- lib/fog/profitbricks/requests/compute/detach_volume.rb
|
222
|
+
- lib/fog/profitbricks/requests/compute/get_all_datacenters.rb
|
223
|
+
- lib/fog/profitbricks/requests/compute/get_all_firewall_rules.rb
|
224
|
+
- lib/fog/profitbricks/requests/compute/get_all_flavors.rb
|
225
|
+
- lib/fog/profitbricks/requests/compute/get_all_images.rb
|
226
|
+
- lib/fog/profitbricks/requests/compute/get_all_ip_blocks.rb
|
227
|
+
- lib/fog/profitbricks/requests/compute/get_all_lans.rb
|
228
|
+
- lib/fog/profitbricks/requests/compute/get_all_load_balanced_nics.rb
|
229
|
+
- lib/fog/profitbricks/requests/compute/get_all_load_balancers.rb
|
230
|
+
- lib/fog/profitbricks/requests/compute/get_all_locations.rb
|
231
|
+
- lib/fog/profitbricks/requests/compute/get_all_nic.rb
|
232
|
+
- lib/fog/profitbricks/requests/compute/get_all_requests.rb
|
233
|
+
- lib/fog/profitbricks/requests/compute/get_all_servers.rb
|
234
|
+
- lib/fog/profitbricks/requests/compute/get_all_snapshots.rb
|
235
|
+
- lib/fog/profitbricks/requests/compute/get_all_volumes.rb
|
236
|
+
- lib/fog/profitbricks/requests/compute/get_attached_cdrom.rb
|
237
|
+
- lib/fog/profitbricks/requests/compute/get_attached_volume.rb
|
238
|
+
- lib/fog/profitbricks/requests/compute/get_datacenter.rb
|
239
|
+
- lib/fog/profitbricks/requests/compute/get_firewall_rule.rb
|
240
|
+
- lib/fog/profitbricks/requests/compute/get_flavor.rb
|
241
|
+
- lib/fog/profitbricks/requests/compute/get_image.rb
|
242
|
+
- lib/fog/profitbricks/requests/compute/get_ip_block.rb
|
243
|
+
- lib/fog/profitbricks/requests/compute/get_lan.rb
|
244
|
+
- lib/fog/profitbricks/requests/compute/get_load_balanced_nic.rb
|
245
|
+
- lib/fog/profitbricks/requests/compute/get_load_balancer.rb
|
246
|
+
- lib/fog/profitbricks/requests/compute/get_location.rb
|
247
|
+
- lib/fog/profitbricks/requests/compute/get_nic.rb
|
248
|
+
- lib/fog/profitbricks/requests/compute/get_request.rb
|
249
|
+
- lib/fog/profitbricks/requests/compute/get_request_status.rb
|
250
|
+
- lib/fog/profitbricks/requests/compute/get_server.rb
|
251
|
+
- lib/fog/profitbricks/requests/compute/get_snapshot.rb
|
252
|
+
- lib/fog/profitbricks/requests/compute/get_volume.rb
|
253
|
+
- lib/fog/profitbricks/requests/compute/list_attached_cdroms.rb
|
254
|
+
- lib/fog/profitbricks/requests/compute/list_attached_volumes.rb
|
255
|
+
- lib/fog/profitbricks/requests/compute/reboot_server.rb
|
256
|
+
- lib/fog/profitbricks/requests/compute/remove_nic_association.rb
|
257
|
+
- lib/fog/profitbricks/requests/compute/restore_volume_snapshot.rb
|
258
|
+
- lib/fog/profitbricks/requests/compute/start_server.rb
|
259
|
+
- lib/fog/profitbricks/requests/compute/stop_server.rb
|
260
|
+
- lib/fog/profitbricks/requests/compute/update_datacenter.rb
|
261
|
+
- lib/fog/profitbricks/requests/compute/update_firewall_rule.rb
|
262
|
+
- lib/fog/profitbricks/requests/compute/update_image.rb
|
263
|
+
- lib/fog/profitbricks/requests/compute/update_lan.rb
|
264
|
+
- lib/fog/profitbricks/requests/compute/update_load_balancer.rb
|
265
|
+
- lib/fog/profitbricks/requests/compute/update_nic.rb
|
266
|
+
- lib/fog/profitbricks/requests/compute/update_server.rb
|
267
|
+
- lib/fog/profitbricks/requests/compute/update_snapshot.rb
|
268
|
+
- lib/fog/profitbricks/requests/compute/update_volume.rb
|
263
269
|
- lib/fog/profitbricks/version.rb
|
264
270
|
- spec/minitest_helper.rb
|
265
271
|
- tests/helper.rb
|
266
272
|
- tests/helpers/formats_helper.rb
|
267
273
|
- tests/helpers/mock_helper.rb
|
274
|
+
- tests/profitbricks/requests/compute/composite_create_tests.rb
|
268
275
|
- tests/profitbricks/requests/compute/flavor_tests.rb
|
269
|
-
- tests/profitbricks/requests/compute/image_tests.rb
|
270
|
-
- tests/profitbricks/requests/compute/interface_tests.rb
|
271
276
|
- tests/profitbricks/requests/compute/location_tests.rb
|
277
|
+
- tests/profitbricks/requests/compute/nic_tests.rb
|
278
|
+
- tests/profitbricks/requests/compute/request_tests.rb
|
272
279
|
- tests/profitbricks/requests/compute/server_tests.rb
|
273
280
|
homepage: https://github.com/fog/fog-profitbricks
|
274
281
|
licenses:
|
@@ -1,217 +0,0 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class ProfitBricks < Fog::Service
|
4
|
-
API_VERSION = '1.3'
|
5
|
-
|
6
|
-
autoload :Base, File.expand_path('../profit_bricks/models/base', __FILE__)
|
7
|
-
|
8
|
-
requires :profitbricks_username, :profitbricks_password
|
9
|
-
recognizes :profitbricks_url
|
10
|
-
|
11
|
-
# Models
|
12
|
-
model_path 'fog/compute/profit_bricks/models'
|
13
|
-
model :server
|
14
|
-
collection :servers
|
15
|
-
model :datacenter
|
16
|
-
collection :datacenters
|
17
|
-
model :region
|
18
|
-
collection :regions
|
19
|
-
model :image
|
20
|
-
collection :images
|
21
|
-
model :flavor
|
22
|
-
collection :flavors
|
23
|
-
model :volume
|
24
|
-
collection :volumes
|
25
|
-
model :interface
|
26
|
-
collection :interfaces
|
27
|
-
|
28
|
-
# Requests
|
29
|
-
request_path 'fog/compute/profit_bricks/requests'
|
30
|
-
request :create_server # createServer
|
31
|
-
request :delete_server # deleteServer
|
32
|
-
request :update_server # updateServer
|
33
|
-
request :get_all_servers # getAllServers
|
34
|
-
request :get_server # getServer
|
35
|
-
request :reset_server # resetServer
|
36
|
-
request :start_server # startServer
|
37
|
-
request :stop_server # stopServer
|
38
|
-
|
39
|
-
request :clear_data_center # clearDataCenter
|
40
|
-
request :create_data_center # createDataCenter
|
41
|
-
request :delete_data_center # deleteDataCenter
|
42
|
-
request :update_data_center # updateDataCenter
|
43
|
-
request :get_all_data_centers # getAllDataCenters
|
44
|
-
request :get_data_center # getDataCenter
|
45
|
-
request :get_data_center_state # getDataCenterState
|
46
|
-
|
47
|
-
request :get_all_locations # getAllLocations
|
48
|
-
request :get_location # getLocation
|
49
|
-
|
50
|
-
request :get_all_images # getAllImages
|
51
|
-
request :get_image # getImage
|
52
|
-
|
53
|
-
request :get_all_flavors # getAllFlavors
|
54
|
-
request :get_flavor # getFlavor
|
55
|
-
request :create_flavor # createFlavor
|
56
|
-
|
57
|
-
request :create_storage # createStorage
|
58
|
-
request :delete_storage # deleteStorage
|
59
|
-
request :update_storage # updateStorage
|
60
|
-
request :get_all_storages # getAllStorages
|
61
|
-
request :get_storage # getStorage
|
62
|
-
request :connect_storage_to_server # connectStorageToServer
|
63
|
-
request :disconnect_storage_from_server # disconnectStorageFromServer
|
64
|
-
|
65
|
-
request :create_nic # createNic
|
66
|
-
request :delete_nic # deleteNic
|
67
|
-
request :update_nic # updateNic
|
68
|
-
request :get_all_nic # getAllNic
|
69
|
-
request :get_nic # getNic
|
70
|
-
request :set_internet_access # setInternetAccess
|
71
|
-
|
72
|
-
class Real
|
73
|
-
def initialize(options={})
|
74
|
-
@profitbricks_username = options[:profitbricks_username]
|
75
|
-
@profitbricks_password = options[:profitbricks_password]
|
76
|
-
@profitbricks_url = options[:profitbricks_url] ||
|
77
|
-
"https://api.profitbricks.com/#{API_VERSION}"
|
78
|
-
|
79
|
-
@connection = Fog::XML::Connection.new(@profitbricks_url, false)
|
80
|
-
end
|
81
|
-
|
82
|
-
def request(params)
|
83
|
-
begin
|
84
|
-
response = @connection.request(params.merge({
|
85
|
-
:headers => {
|
86
|
-
'Authorization' => "Basic #{auth_header}"
|
87
|
-
}.merge!(params[:headers] || {})
|
88
|
-
}))
|
89
|
-
rescue Excon::Errors::Unauthorized => error
|
90
|
-
raise error
|
91
|
-
rescue Excon::Errors::HTTPStatusError => error
|
92
|
-
raise error
|
93
|
-
rescue Excon::Errors::InternalServerError => error
|
94
|
-
raise error
|
95
|
-
end
|
96
|
-
response
|
97
|
-
end
|
98
|
-
|
99
|
-
private
|
100
|
-
|
101
|
-
def auth_header
|
102
|
-
return Base64.encode64(
|
103
|
-
"#{@profitbricks_username}:#{@profitbricks_password}"
|
104
|
-
).delete("\r\n")
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
class Mock
|
109
|
-
def self.data
|
110
|
-
@data ||= Hash.new do |hash, key|
|
111
|
-
hash[key] = {
|
112
|
-
:servers => [],
|
113
|
-
:datacenters => [],
|
114
|
-
:regions =>
|
115
|
-
[
|
116
|
-
{
|
117
|
-
'locationId' => 'c0420cc0-90e8-4f4b-8860-df0a07d18047',
|
118
|
-
'locationName' => 'de/fkb',
|
119
|
-
'country' => 'DEU'
|
120
|
-
},
|
121
|
-
{
|
122
|
-
'locationId' => '68c4099a-d9d8-4683-bdc2-12789aacfa2a',
|
123
|
-
'locationName' => 'de/fra',
|
124
|
-
'country' => 'DEU'
|
125
|
-
},
|
126
|
-
{
|
127
|
-
'locationId' => 'e102ba74-6764-47f3-8896-246141da8ada',
|
128
|
-
'locationName' => 'us/las',
|
129
|
-
'country' => 'USA'
|
130
|
-
}
|
131
|
-
],
|
132
|
-
:images =>
|
133
|
-
[
|
134
|
-
{
|
135
|
-
'imageId' => 'ece948c0-14f8-4d49-8bdc-b966b746b6f9',
|
136
|
-
'imageName' => 'CentOS-6.5-x86_64-netinstall.iso',
|
137
|
-
'imageType' => 'CDROM',
|
138
|
-
'imageSize' => 244,
|
139
|
-
'bootable' => 'true',
|
140
|
-
'cpuHotPlug' => 'false',
|
141
|
-
'cpuHotUnPlug' => 'false',
|
142
|
-
'ramHotPlug' => 'false',
|
143
|
-
'ramHotUnPlug' => 'false',
|
144
|
-
'discVirtioHotPlug' => 'false',
|
145
|
-
'discVirtioHotUnPlug' => 'false',
|
146
|
-
'nicHotPlug' => 'false',
|
147
|
-
'nicHotUnPlug' => 'false',
|
148
|
-
'osType' => 'LINUX',
|
149
|
-
'serverIds' => nil,
|
150
|
-
'writeable' => 'true',
|
151
|
-
'location' => 'us/las',
|
152
|
-
'public' => 'true'
|
153
|
-
},
|
154
|
-
{
|
155
|
-
'imageId' => 'cc43d811-c423-402c-8bd0-6a04073a65ca',
|
156
|
-
'imageName' => 'CentOS-6-server',
|
157
|
-
'imageType' => 'HDD',
|
158
|
-
'imageSize' => 11264,
|
159
|
-
'bootable' => 'true',
|
160
|
-
'cpuHotPlug' => 'false',
|
161
|
-
'cpuHotUnPlug' => 'false',
|
162
|
-
'ramHotPlug' => 'false',
|
163
|
-
'ramHotUnPlug' => 'false',
|
164
|
-
'discVirtioHotPlug' => 'false',
|
165
|
-
'discVirtioHotUnPlug' => 'false',
|
166
|
-
'nicHotPlug' => 'false',
|
167
|
-
'nicHotUnPlug' => 'false',
|
168
|
-
'osType' => 'LINUX',
|
169
|
-
'serverIds' => nil,
|
170
|
-
'writeable' => 'true',
|
171
|
-
'location' => 'us/las',
|
172
|
-
'public' => 'true'
|
173
|
-
}
|
174
|
-
],
|
175
|
-
:flavors =>
|
176
|
-
[
|
177
|
-
{
|
178
|
-
'flavorId' => Fog::UUID.uuid,
|
179
|
-
'flavorName' => 'Micro',
|
180
|
-
'ram' => 1024,
|
181
|
-
'disk' => 50,
|
182
|
-
'cores' => 1
|
183
|
-
},
|
184
|
-
{
|
185
|
-
'flavorId' => Fog::UUID.uuid,
|
186
|
-
'flavorName' => 'Small',
|
187
|
-
'ram' => 2048,
|
188
|
-
'disk' => 50,
|
189
|
-
'cores' => 1
|
190
|
-
}
|
191
|
-
],
|
192
|
-
:volumes => [],
|
193
|
-
:interfaces => []
|
194
|
-
}
|
195
|
-
end
|
196
|
-
end
|
197
|
-
|
198
|
-
def self.reset
|
199
|
-
@data = nil
|
200
|
-
end
|
201
|
-
|
202
|
-
def initialize(options={})
|
203
|
-
@profitbricks_username = options[:profitbricks_username]
|
204
|
-
@profitbricks_password = options[:profitbricks_password]
|
205
|
-
end
|
206
|
-
|
207
|
-
def data
|
208
|
-
self.class.data[@profitbricks_username]
|
209
|
-
end
|
210
|
-
|
211
|
-
def reset_data
|
212
|
-
self.class.data.delete(@profitbricks_username)
|
213
|
-
end
|
214
|
-
end
|
215
|
-
end
|
216
|
-
end
|
217
|
-
end
|