fog-profitbricks 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -3
- data/Rakefile +1 -1
- data/examples/pb_demo.rb +2 -8
- data/lib/fog/profitbricks/compute.rb +249 -105
- data/lib/fog/profitbricks/models/compute/datacenter.rb +63 -9
- data/lib/fog/profitbricks/models/compute/firewall_rule.rb +3 -1
- data/lib/fog/profitbricks/models/compute/group.rb +7 -4
- data/lib/fog/profitbricks/models/compute/image.rb +3 -0
- data/lib/fog/profitbricks/models/compute/ip_block.rb +2 -0
- data/lib/fog/profitbricks/models/compute/lan.rb +2 -1
- data/lib/fog/profitbricks/models/compute/load_balancer.rb +2 -0
- data/lib/fog/profitbricks/models/compute/location.rb +1 -0
- data/lib/fog/profitbricks/models/compute/nic.rb +2 -0
- data/lib/fog/profitbricks/models/compute/request.rb +1 -0
- data/lib/fog/profitbricks/models/compute/resource.rb +1 -0
- data/lib/fog/profitbricks/models/compute/server.rb +5 -1
- data/lib/fog/profitbricks/models/compute/share.rb +4 -2
- data/lib/fog/profitbricks/models/compute/snapshot.rb +2 -0
- data/lib/fog/profitbricks/models/compute/user.rb +4 -1
- data/lib/fog/profitbricks/requests/compute/add_share.rb +2 -2
- data/lib/fog/profitbricks/requests/compute/add_user_to_group.rb +4 -4
- data/lib/fog/profitbricks/requests/compute/associate_nic_to_load_balancer.rb +1 -3
- data/lib/fog/profitbricks/requests/compute/attach_cdrom.rb +18 -17
- data/lib/fog/profitbricks/requests/compute/attach_volume.rb +9 -2
- data/lib/fog/profitbricks/requests/compute/create_datacenter.rb +71 -25
- data/lib/fog/profitbricks/requests/compute/create_firewall_rule.rb +11 -4
- data/lib/fog/profitbricks/requests/compute/create_group.rb +22 -4
- data/lib/fog/profitbricks/requests/compute/create_ip_block.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/create_lan.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/create_load_balancer.rb +4 -43
- data/lib/fog/profitbricks/requests/compute/create_nic.rb +4 -0
- data/lib/fog/profitbricks/requests/compute/create_server.rb +6 -1
- data/lib/fog/profitbricks/requests/compute/create_user.rb +20 -1
- data/lib/fog/profitbricks/requests/compute/create_volume.rb +5 -1
- data/lib/fog/profitbricks/requests/compute/create_volume_snapshot.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/delete_group.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/delete_share.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/delete_user.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/detach_cdrom.rb +3 -3
- data/lib/fog/profitbricks/requests/compute/get_attached_cdrom.rb +3 -3
- data/lib/fog/profitbricks/requests/compute/get_datacenter.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_firewall_rule.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_group.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_image.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_ip_block.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_lan.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_load_balanced_nic.rb +7 -1
- data/lib/fog/profitbricks/requests/compute/get_load_balancer.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_location.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_nic.rb +2 -2
- data/lib/fog/profitbricks/requests/compute/get_request.rb +8 -1
- data/lib/fog/profitbricks/requests/compute/get_resource_by_type.rb +8 -1
- data/lib/fog/profitbricks/requests/compute/get_resources_by_type.rb +9 -3
- data/lib/fog/profitbricks/requests/compute/get_server.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_share.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_snapshot.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_user.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/get_volume.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/list_attached_cdroms.rb +3 -1
- data/lib/fog/profitbricks/requests/compute/list_attached_volumes.rb +3 -3
- data/lib/fog/profitbricks/requests/compute/remove_user_from_group.rb +2 -2
- data/lib/fog/profitbricks/requests/compute/update_datacenter.rb +3 -8
- data/lib/fog/profitbricks/requests/compute/update_firewall_rule.rb +1 -1
- data/lib/fog/profitbricks/requests/compute/update_group.rb +5 -5
- data/lib/fog/profitbricks/requests/compute/update_nic.rb +2 -4
- data/lib/fog/profitbricks/requests/compute/update_server.rb +3 -4
- data/lib/fog/profitbricks/requests/compute/update_share.rb +3 -3
- data/lib/fog/profitbricks/requests/compute/update_user.rb +2 -2
- data/lib/fog/profitbricks/version.rb +1 -1
- data/tests/profitbricks/models/compute/compute_tests.rb +1071 -267
- metadata +26 -33
- data/gemfiles/Gemfile.1.8.7 +0 -6
- data/tests/profitbricks/requests/compute/composite_create_tests.rb +0 -174
- data/tests/profitbricks/requests/compute/flavor_tests.rb +0 -40
- data/tests/profitbricks/requests/compute/location_tests.rb +0 -42
- data/tests/profitbricks/requests/compute/nic_tests.rb +0 -268
- data/tests/profitbricks/requests/compute/request_tests.rb +0 -50
- data/tests/profitbricks/requests/compute/server_tests.rb +0 -462
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6123ec4b71596d36e147a4df95374deaaea32d2a
|
4
|
+
data.tar.gz: c60c12fd9550e860665bbe65a548240a39adcb38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79023d8d754c7420f9a16ce8f72c05042abec768f5e0dae76888994e48e0f96d9b518046642168e9437f763e6cff060afb7ecd1891670083ffb0cfcbad821e62
|
7
|
+
data.tar.gz: 3eb2578a46b7521ca18f5c17227f0d99d90a8222f5da3a497da588c698b09ab5a75d8436c1a8d0cc30476aea57a955795a715bf695359045f149d247f36b7113
|
data/.travis.yml
CHANGED
@@ -7,8 +7,6 @@ script: bundle exec rake travis
|
|
7
7
|
|
8
8
|
matrix:
|
9
9
|
include:
|
10
|
-
- rvm: 1.8.7
|
11
|
-
gemfile: gemfiles/Gemfile.1.8.7
|
12
10
|
- rvm: 1.9.3
|
13
11
|
gemfile: gemfiles/Gemfile.1.9.2+
|
14
12
|
env: COVERAGE=true
|
@@ -24,6 +22,6 @@ matrix:
|
|
24
22
|
- rvm: 2.3.0
|
25
23
|
gemfile: Gemfile
|
26
24
|
env: COVERAGE=true
|
27
|
-
- rvm: jruby
|
25
|
+
- rvm: jruby-head
|
28
26
|
gemfile: gemfiles/Gemfile.1.9.2+
|
29
27
|
env: COVERAGE=true
|
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ end
|
|
16
16
|
namespace :test do
|
17
17
|
mock = ENV["FOG_MOCK"] || "true"
|
18
18
|
task :travis do
|
19
|
-
sh("export FOG_MOCK=#{mock} && bundle exec shindont")
|
19
|
+
sh("export PROFITBRICKS_USERNAME=username && export PROFITBRICKS_PASSWORD=abc123xyz && export FOG_MOCK=#{mock} && bundle exec shindont")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/examples/pb_demo.rb
CHANGED
@@ -2,13 +2,7 @@ require 'fog/profitbricks'
|
|
2
2
|
|
3
3
|
Excon.defaults[:connection_timeout] = 200
|
4
4
|
|
5
|
-
compute = Fog::Compute.new(:provider => 'ProfitBricks')
|
6
|
-
|
7
|
-
# Find the Ubuntu 16 image in North America.
|
8
|
-
image = compute.images.all.find do |image|
|
9
|
-
image.name =~ /Ubuntu-16/ &&
|
10
|
-
image.location == 'us/las'
|
11
|
-
end
|
5
|
+
compute = Fog::Compute.new(:provider => 'ProfitBricks', :profitbricks_username => ENV['PROFITBRICKS_USERNAME'], :profitbricks_password => ENV['PROFITBRICKS_PASSWORD'])
|
12
6
|
|
13
7
|
# Create datacenter.
|
14
8
|
datacenter = compute.datacenters.create(:name => 'fog-demo',
|
@@ -29,7 +23,7 @@ lan = compute.lans.create(:datacenter_id => datacenter.id,
|
|
29
23
|
system_volume = {
|
30
24
|
:name => 'system',
|
31
25
|
:size => 5,
|
32
|
-
:
|
26
|
+
:image_alias => "ubuntu:latest",
|
33
27
|
:image_password => 'volume2016',
|
34
28
|
:ssh_keys => ['ssh-rsa AAAAB3NzaC1yc2EAAAADA=='],
|
35
29
|
:type => 'HDD'
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
autoload :Base, File.expand_path('../models/base', __FILE__)
|
7
7
|
|
8
8
|
requires :profitbricks_username, :profitbricks_password
|
9
|
-
recognizes :profitbricks_url
|
9
|
+
recognizes :profitbricks_url, :profitbricks_user_agent
|
10
10
|
|
11
11
|
# Models
|
12
12
|
model_path 'fog/profitbricks/models/compute'
|
@@ -51,127 +51,128 @@ module Fog
|
|
51
51
|
|
52
52
|
# Requests
|
53
53
|
request_path 'fog/profitbricks/requests/compute'
|
54
|
-
request :create_server
|
55
|
-
request :delete_server
|
56
|
-
request :update_server
|
57
|
-
request :get_all_servers
|
58
|
-
request :get_server
|
59
|
-
request :list_attached_volumes
|
60
|
-
request :attach_volume
|
61
|
-
request :get_attached_volume
|
62
|
-
request :detach_volume
|
63
|
-
request :list_attached_cdroms
|
64
|
-
request :attach_cdrom
|
65
|
-
request :get_attached_cdrom
|
66
|
-
request :detach_cdrom
|
67
|
-
request :reboot_server
|
68
|
-
request :start_server
|
69
|
-
request :stop_server
|
54
|
+
request :create_server # createServer
|
55
|
+
request :delete_server # deleteServer
|
56
|
+
request :update_server # updateServer
|
57
|
+
request :get_all_servers # getAllServers
|
58
|
+
request :get_server # getServer
|
59
|
+
request :list_attached_volumes # listAttachedVolumes
|
60
|
+
request :attach_volume # attachVolume
|
61
|
+
request :get_attached_volume # getAttachedVolume
|
62
|
+
request :detach_volume # detachVolume
|
63
|
+
request :list_attached_cdroms # listAttachedCdroms
|
64
|
+
request :attach_cdrom # attachCdrom
|
65
|
+
request :get_attached_cdrom # getAttachedCdrom
|
66
|
+
request :detach_cdrom # detachCdrom
|
67
|
+
request :reboot_server # rebootServer
|
68
|
+
request :start_server # startServer
|
69
|
+
request :stop_server # stopServer
|
70
70
|
|
71
|
-
request :create_datacenter
|
72
|
-
request :delete_datacenter
|
73
|
-
request :update_datacenter
|
74
|
-
request :get_all_datacenters
|
75
|
-
request :get_datacenter
|
71
|
+
request :create_datacenter # createDataCenter
|
72
|
+
request :delete_datacenter # deleteDataCenter
|
73
|
+
request :update_datacenter # updateDataCenter
|
74
|
+
request :get_all_datacenters # getAllDataCenters
|
75
|
+
request :get_datacenter # getDataCenter
|
76
76
|
|
77
|
-
request :get_all_locations
|
78
|
-
request :get_location
|
77
|
+
request :get_all_locations # getAllLocations
|
78
|
+
request :get_location # getLocation
|
79
79
|
|
80
|
-
request :get_all_images
|
81
|
-
request :get_image
|
82
|
-
request :update_image
|
83
|
-
request :delete_image
|
80
|
+
request :get_all_images # getAllImages
|
81
|
+
request :get_image # getImage
|
82
|
+
request :update_image # updateImage
|
83
|
+
request :delete_image # deleteImage
|
84
84
|
|
85
|
-
request :get_all_flavors
|
86
|
-
request :get_flavor
|
87
|
-
request :create_flavor
|
85
|
+
request :get_all_flavors # getAllFlavors
|
86
|
+
request :get_flavor # getFlavor
|
87
|
+
request :create_flavor # createFlavor
|
88
88
|
|
89
|
-
request :create_volume
|
90
|
-
request :delete_volume
|
91
|
-
request :update_volume
|
92
|
-
request :get_all_volumes
|
93
|
-
request :get_volume
|
94
|
-
request :create_volume_snapshot
|
95
|
-
request :restore_volume_snapshot
|
89
|
+
request :create_volume # createVolume
|
90
|
+
request :delete_volume # deleteVolume
|
91
|
+
request :update_volume # updateVolume
|
92
|
+
request :get_all_volumes # getAllVolumes
|
93
|
+
request :get_volume # getVolume
|
94
|
+
request :create_volume_snapshot # createVolumeSnapshot
|
95
|
+
request :restore_volume_snapshot # restoreVolumeSnapshot
|
96
96
|
|
97
|
-
request :get_all_lans
|
98
|
-
request :get_lan
|
99
|
-
request :create_lan
|
100
|
-
request :update_lan
|
101
|
-
request :delete_lan
|
97
|
+
request :get_all_lans # getAllLans
|
98
|
+
request :get_lan # getLans
|
99
|
+
request :create_lan # createLan
|
100
|
+
request :update_lan # updateLan
|
101
|
+
request :delete_lan # deleteLan
|
102
102
|
|
103
|
-
request :create_nic
|
104
|
-
request :delete_nic
|
105
|
-
request :update_nic
|
106
|
-
request :get_all_nic
|
107
|
-
request :get_nic
|
103
|
+
request :create_nic # createNic
|
104
|
+
request :delete_nic # deleteNic
|
105
|
+
request :update_nic # updateNic
|
106
|
+
request :get_all_nic # getAllNic
|
107
|
+
request :get_nic # getNic
|
108
108
|
|
109
|
-
request :delete_snapshot
|
110
|
-
request :update_snapshot
|
111
|
-
request :get_all_snapshots
|
112
|
-
request :get_snapshot
|
109
|
+
request :delete_snapshot # deleteSnapshot
|
110
|
+
request :update_snapshot # updateSnapshot
|
111
|
+
request :get_all_snapshots # getAllSnapshots
|
112
|
+
request :get_snapshot # getSnapshot
|
113
113
|
|
114
|
-
request :get_all_requests
|
115
|
-
request :get_request
|
116
|
-
request :get_request_status
|
114
|
+
request :get_all_requests # getAllRequests
|
115
|
+
request :get_request # getRequest
|
116
|
+
request :get_request_status # getRequestStatus
|
117
117
|
|
118
|
-
request :get_all_ip_blocks
|
119
|
-
request :get_ip_block
|
120
|
-
request :create_ip_block
|
121
|
-
request :delete_ip_block
|
118
|
+
request :get_all_ip_blocks # getAllIpBlocks
|
119
|
+
request :get_ip_block # getIpBlock
|
120
|
+
request :create_ip_block # createIpBlock
|
121
|
+
request :delete_ip_block # deleteIpBlock
|
122
122
|
|
123
|
-
request :get_all_firewall_rules
|
124
|
-
request :get_firewall_rule
|
125
|
-
request :create_firewall_rule
|
126
|
-
request :update_firewall_rule
|
127
|
-
request :delete_firewall_rule
|
123
|
+
request :get_all_firewall_rules # getAllFireWallRules
|
124
|
+
request :get_firewall_rule # getFirewallRule
|
125
|
+
request :create_firewall_rule # createFirewallRule
|
126
|
+
request :update_firewall_rule # updateFirewallRule
|
127
|
+
request :delete_firewall_rule # deleteFirewallRule
|
128
128
|
|
129
|
-
request :get_all_load_balancers
|
130
|
-
request :get_load_balancer
|
131
|
-
request :create_load_balancer
|
132
|
-
request :delete_load_balancer
|
133
|
-
request :update_load_balancer
|
134
|
-
request :get_all_load_balanced_nics
|
135
|
-
request :get_load_balanced_nic
|
136
|
-
request :associate_nic_to_load_balancer
|
137
|
-
request :remove_nic_association
|
129
|
+
request :get_all_load_balancers # getAllLoadBalancers
|
130
|
+
request :get_load_balancer # getLoadBalancer
|
131
|
+
request :create_load_balancer # createLoadBalancer
|
132
|
+
request :delete_load_balancer # deleteLoadBalancer
|
133
|
+
request :update_load_balancer # deleteLoadBalancer
|
134
|
+
request :get_all_load_balanced_nics # getAllLoadBalancedNics
|
135
|
+
request :get_load_balanced_nic # getLoadBalancedNic
|
136
|
+
request :associate_nic_to_load_balancer # associateNicToLoadBalancer
|
137
|
+
request :remove_nic_association # removeNicAssociation
|
138
138
|
|
139
|
-
request :get_all_contract_resources
|
139
|
+
request :get_all_contract_resources # getAllContractResources
|
140
140
|
|
141
|
-
request :get_all_groups
|
142
|
-
request :get_group
|
143
|
-
request :create_group
|
144
|
-
request :update_group
|
145
|
-
request :delete_group
|
141
|
+
request :get_all_groups # getAllGroups
|
142
|
+
request :get_group # getGroup
|
143
|
+
request :create_group # createGroup
|
144
|
+
request :update_group # updateGroup
|
145
|
+
request :delete_group # deleteGroup
|
146
146
|
|
147
|
-
request :get_all_shares
|
148
|
-
request :get_share
|
149
|
-
request :add_share
|
150
|
-
request :update_share
|
151
|
-
request :delete_share
|
147
|
+
request :get_all_shares # getAllShares
|
148
|
+
request :get_share # getShare
|
149
|
+
request :add_share # addShare
|
150
|
+
request :update_share # updateShare
|
151
|
+
request :delete_share # deleteShare
|
152
152
|
|
153
|
-
request :get_all_users
|
154
|
-
request :get_user
|
155
|
-
request :create_user
|
156
|
-
request :update_user
|
157
|
-
request :delete_user
|
158
|
-
request :get_group_users
|
159
|
-
request :add_user_to_group
|
160
|
-
request :remove_user_from_group
|
153
|
+
request :get_all_users # getAllUsers
|
154
|
+
request :get_user # getUser
|
155
|
+
request :create_user # createUser
|
156
|
+
request :update_user # updateUser
|
157
|
+
request :delete_user # deleteUser
|
158
|
+
request :get_group_users # getGroupUsers
|
159
|
+
request :add_user_to_group # addUserToGroup
|
160
|
+
request :remove_user_from_group # removeUserFromGroup
|
161
161
|
|
162
|
-
request :get_all_resources
|
163
|
-
request :get_resources_by_type
|
164
|
-
request :get_resource_by_type
|
162
|
+
request :get_all_resources # getAllResources
|
163
|
+
request :get_resources_by_type # getResourcesByType
|
164
|
+
request :get_resource_by_type # getResourcesByType
|
165
165
|
|
166
166
|
class Real
|
167
167
|
def initialize(options = {})
|
168
168
|
@profitbricks_username = options[:profitbricks_username]
|
169
169
|
@profitbricks_password = options[:profitbricks_password]
|
170
170
|
@profitbricks_url = options[:profitbricks_url] || "https://api.profitbricks.com"
|
171
|
+
@user_agent = options[:profitbricks_user_agent] || ""
|
171
172
|
|
172
173
|
connection_options = options[:connection_options] || {}
|
173
174
|
connection_options[:headers] ||= {}
|
174
|
-
connection_options[:headers]["User-Agent"] = Fog::Core::Connection.user_agents.to_s
|
175
|
+
connection_options[:headers]["User-Agent"] = @user_agent != "" ? @user_agent + " " + Fog::Core::Connection.user_agents.to_s : Fog::Core::Connection.user_agents.to_s
|
175
176
|
connection_options[:omit_default_port] = true
|
176
177
|
connection_options[:path_prefix] = "/cloudapi/#{API_VERSION}"
|
177
178
|
|
@@ -185,6 +186,7 @@ module Fog
|
|
185
186
|
|
186
187
|
begin
|
187
188
|
response = @connection.request(params)
|
189
|
+
|
188
190
|
rescue Excon::Errors::Unauthorized => error
|
189
191
|
Logger.warning('Unauthorized error')
|
190
192
|
raise error, Fog::JSON.decode(error.response.body)['messages']
|
@@ -263,7 +265,7 @@ module Fog
|
|
263
265
|
'description' => 'testing fog rest implementation',
|
264
266
|
'location' => 'us/las',
|
265
267
|
'version' => 1,
|
266
|
-
'features' => %w
|
268
|
+
'features' => %w(SSD MULTIPLE_CPU)
|
267
269
|
}
|
268
270
|
},
|
269
271
|
{
|
@@ -283,7 +285,7 @@ module Fog
|
|
283
285
|
'description' => 'testing fog rest implementation',
|
284
286
|
'location' => 'de/fkb',
|
285
287
|
'version' => 1,
|
286
|
-
'features' => %w
|
288
|
+
'features' => %w(SSD MULTIPLE_CPU)
|
287
289
|
}
|
288
290
|
}
|
289
291
|
]
|
@@ -477,7 +479,7 @@ module Fog
|
|
477
479
|
'href' => 'https://api.profitbricks.com/rest/v2/locations/de/fkb',
|
478
480
|
'properties' => {
|
479
481
|
'name' => 'karlsruhe',
|
480
|
-
'features' => %w
|
482
|
+
'features' => %w(SSD MULTIPLE_CPU)
|
481
483
|
}
|
482
484
|
},
|
483
485
|
{
|
@@ -486,7 +488,7 @@ module Fog
|
|
486
488
|
'href' => 'https://api.profitbricks.com/rest/v2/locations/de/fra',
|
487
489
|
'properties' => {
|
488
490
|
'name' => 'frankfurt',
|
489
|
-
'features' => %w
|
491
|
+
'features' => %w(SSD MULTIPLE_CPU)
|
490
492
|
}
|
491
493
|
},
|
492
494
|
{
|
@@ -495,7 +497,7 @@ module Fog
|
|
495
497
|
'href' => 'https://api.profitbricks.com/rest/v2/locations/us/las',
|
496
498
|
'properties' => {
|
497
499
|
'name' => 'lasvegas',
|
498
|
-
'features' => %w
|
500
|
+
'features' => %w(SSD MULTIPLE_CPU)
|
499
501
|
}
|
500
502
|
}
|
501
503
|
]
|
@@ -539,6 +541,38 @@ module Fog
|
|
539
541
|
'public' => 'true'
|
540
542
|
}
|
541
543
|
},
|
544
|
+
{
|
545
|
+
'id' => 'dfcb40db-28b5-11e6-9336-52540005ab80',
|
546
|
+
'type' => 'image',
|
547
|
+
'href' => 'https=>//api.profitbricks.com/rest/v2/images/dfcb40db-28b5-11e6-9336-52540005ab80',
|
548
|
+
'metadata' => {
|
549
|
+
'createdDate' => '2016-06-02T11:33:49Z',
|
550
|
+
'createdBy' => 'System',
|
551
|
+
'etag' => '9909709d99655c6f31aca789998d7d89',
|
552
|
+
'lastModifiedDate' => '2016-06-02T11:33:49Z',
|
553
|
+
'lastModifiedBy' => 'System',
|
554
|
+
'state' => 'AVAILABLE'
|
555
|
+
},
|
556
|
+
'properties' => {
|
557
|
+
'name' => 'CentOS-6.8-x86_64-netinstall.iso',
|
558
|
+
'description' => '',
|
559
|
+
'location' => 'us/las',
|
560
|
+
'size' => 0.23,
|
561
|
+
'cpuHotPlug' => 'true',
|
562
|
+
'cpuHotUnplug' => 'false',
|
563
|
+
'ramHotPlug' => 'true',
|
564
|
+
'ramHotUnplug' => 'false',
|
565
|
+
'nicHotPlug' => 'true',
|
566
|
+
'nicHotUnplug' => 'true',
|
567
|
+
'discVirtioHotPlug' => 'true',
|
568
|
+
'discVirtioHotUnplug' => 'true',
|
569
|
+
'discScsiHotPlug' => 'false',
|
570
|
+
'discScsiHotUnplug' => 'false',
|
571
|
+
'licenceType' => 'LINUX',
|
572
|
+
'imageType' => 'HDD',
|
573
|
+
'public' => 'true'
|
574
|
+
}
|
575
|
+
},
|
542
576
|
{
|
543
577
|
'id' => '05cadf29-6c12-11e4-beeb-52540066fee9',
|
544
578
|
'type' => 'image',
|
@@ -1098,9 +1132,10 @@ module Fog
|
|
1098
1132
|
]
|
1099
1133
|
},
|
1100
1134
|
:contracts => {
|
1101
|
-
'
|
1102
|
-
'
|
1103
|
-
'
|
1135
|
+
'type' => 'contract',
|
1136
|
+
'contractNumber' => '12345678',
|
1137
|
+
'owner' => 'test@domain.com',
|
1138
|
+
'status' => 'BILLABLE',
|
1104
1139
|
'resourceLimits' => {
|
1105
1140
|
'coresPerServer' => '20',
|
1106
1141
|
'coresPerContract' => '30',
|
@@ -1116,8 +1151,117 @@ module Fog
|
|
1116
1151
|
'ssdVolumeProvisioned' => '0',
|
1117
1152
|
'reservableIps' => '3',
|
1118
1153
|
'reservedIpsOnContract' => '0',
|
1119
|
-
'reservedIpsInUse' => '0'
|
1154
|
+
'reservedIpsInUse' => '0',
|
1120
1155
|
}
|
1156
|
+
},
|
1157
|
+
:groups => {
|
1158
|
+
'id' => "groups",
|
1159
|
+
'type' => 'collection',
|
1160
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/groups",
|
1161
|
+
'items' => []
|
1162
|
+
},
|
1163
|
+
:shares => {
|
1164
|
+
'id' => "059c4d71-f97a-4bfd-b3a5-XXXXXXXXXXXX/shares",
|
1165
|
+
'type' => 'collection',
|
1166
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/groups/059c4d71-f97a-4bfd-b3a5-XXXXXXXXXXXX/shares",
|
1167
|
+
'items' => []
|
1168
|
+
},
|
1169
|
+
:users => {
|
1170
|
+
'id' => "users",
|
1171
|
+
'type' => 'collection',
|
1172
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/users",
|
1173
|
+
'items' => []
|
1174
|
+
},
|
1175
|
+
:resources => {
|
1176
|
+
'id' => "resources",
|
1177
|
+
'type' => 'collection',
|
1178
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/resources",
|
1179
|
+
'items' => [
|
1180
|
+
{
|
1181
|
+
'id' => dc1_id,
|
1182
|
+
'type' => 'datacenter',
|
1183
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/resources/datacenter/#{dc1_id}",
|
1184
|
+
'metadata' => {
|
1185
|
+
'createdDate' => '2016-07-31T15:41:27Z',
|
1186
|
+
'createdBy' => 'test@stackpointcloud.com',
|
1187
|
+
'etag' => '5b91832ee85a758568d4523a86bd8702',
|
1188
|
+
'lastModifiedDate' => '2016-07-31T15:41:27Z',
|
1189
|
+
'lastModifiedBy' => 'test@stackpointcloud.com',
|
1190
|
+
'state' => 'AVAILABLE'
|
1191
|
+
},
|
1192
|
+
'entities' => {
|
1193
|
+
'groups' => {
|
1194
|
+
'id' => "#{dc1_id}/groups",
|
1195
|
+
'type' => 'collection',
|
1196
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/groups",
|
1197
|
+
'items' => []
|
1198
|
+
}
|
1199
|
+
}
|
1200
|
+
},
|
1201
|
+
{
|
1202
|
+
'id' => 'dfcb40db-28b5-11e6-9336-52540005ab80',
|
1203
|
+
'type' => 'image',
|
1204
|
+
'href' => 'https://api.profitbricks.com/cloudapi/v4/um/resources/image/dfcb40db-28b5-11e6-9336-52540005ab80',
|
1205
|
+
'metadata' => {
|
1206
|
+
'createdDate' => '2016-06-02T11:33:49Z',
|
1207
|
+
'createdBy' => 'System',
|
1208
|
+
'etag' => '9909709d99655c6f31aca789998d7d89',
|
1209
|
+
'lastModifiedDate' => '2016-06-02T11:33:49Z',
|
1210
|
+
'lastModifiedBy' => 'System',
|
1211
|
+
'state' => 'AVAILABLE'
|
1212
|
+
},
|
1213
|
+
'entities' => {
|
1214
|
+
'groups' => {
|
1215
|
+
'id' => "dfcb40db-28b5-11e6-9336-52540005ab80/groups",
|
1216
|
+
'type' => 'collection',
|
1217
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/groups",
|
1218
|
+
'items' => []
|
1219
|
+
}
|
1220
|
+
}
|
1221
|
+
},
|
1222
|
+
{
|
1223
|
+
'id' => '3d52b13d-bec4-49de-ad05-fd2f8c687be6',
|
1224
|
+
'type' => 'snapshot',
|
1225
|
+
'href' => 'https://api.profitbricks.com/cloudapi/v4/um/resources/snapshot/3d52b13d-bec4-49de-ad05-fd2f8c687be6',
|
1226
|
+
'metadata' => {
|
1227
|
+
'createdDate' => '2016-08-07T22:28:38Z',
|
1228
|
+
'createdBy' => 'test@stackpointcloud.com',
|
1229
|
+
'etag' => '83ad78a4757ab0d9bdeaebc3a6485dcf',
|
1230
|
+
'lastModifiedDate' => '2016-08-07T22:28:38Z',
|
1231
|
+
'lastModifiedBy' => 'test@stackpointcloud.com',
|
1232
|
+
'state' => 'AVAILABLE'
|
1233
|
+
},
|
1234
|
+
'entities' => {
|
1235
|
+
'groups' => {
|
1236
|
+
'id' => "3d52b13d-bec4-49de-ad05-fd2f8c687be6/groups",
|
1237
|
+
'type' => 'collection',
|
1238
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/groups",
|
1239
|
+
'items' => []
|
1240
|
+
}
|
1241
|
+
}
|
1242
|
+
},
|
1243
|
+
{
|
1244
|
+
'id' => ipb1_id,
|
1245
|
+
'type' => 'ipblock',
|
1246
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/resources/ipblock/#{ipb1_id}",
|
1247
|
+
'metadata' => {
|
1248
|
+
'createdDate' => '2016-07-31T15:41:27Z',
|
1249
|
+
'createdBy' => 'test@stackpointcloud.com',
|
1250
|
+
'etag' => '5b91832ee85a758568d4523a86bd8702',
|
1251
|
+
'lastModifiedDate' => '2016-07-31T15:41:27Z',
|
1252
|
+
'lastModifiedBy' => 'test@stackpointcloud.com',
|
1253
|
+
'state' => 'AVAILABLE'
|
1254
|
+
},
|
1255
|
+
'entities' => {
|
1256
|
+
'groups' => {
|
1257
|
+
'id' => "#{ipb1_id}/groups",
|
1258
|
+
'type' => 'collection',
|
1259
|
+
'href' => "https://api.profitbricks.com/cloudapi/v4/um/groups",
|
1260
|
+
'items' => []
|
1261
|
+
}
|
1262
|
+
}
|
1263
|
+
}
|
1264
|
+
]
|
1121
1265
|
}
|
1122
1266
|
}
|
1123
1267
|
end
|