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.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/fog-profitbricks.gemspec +12 -11
  4. data/lib/fog/compute/profit_bricks.rb +217 -0
  5. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/datacenter.rb +0 -2
  6. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/datacenters.rb +1 -2
  7. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/flavor.rb +0 -6
  8. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/flavors.rb +1 -2
  9. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/image.rb +0 -6
  10. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/images.rb +1 -2
  11. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/interface.rb +0 -6
  12. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/interfaces.rb +1 -2
  13. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/region.rb +0 -6
  14. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/regions.rb +1 -2
  15. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/server.rb +0 -8
  16. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/servers.rb +1 -2
  17. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/volume.rb +0 -6
  18. data/lib/fog/{profitbricks/models/compute → compute/profit_bricks/models}/volumes.rb +1 -2
  19. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/clear_data_center.rb +0 -2
  20. data/lib/fog/compute/profit_bricks/requests/connect_storage_to_server.rb +83 -0
  21. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/create_data_center.rb +1 -3
  22. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/create_flavor.rb +2 -2
  23. data/lib/fog/compute/profit_bricks/requests/create_nic.rb +79 -0
  24. data/lib/fog/compute/profit_bricks/requests/create_server.rb +105 -0
  25. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/create_storage.rb +4 -6
  26. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_data_center.rb +3 -5
  27. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_nic.rb +3 -5
  28. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_server.rb +2 -4
  29. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/delete_storage.rb +2 -4
  30. data/lib/fog/compute/profit_bricks/requests/disconnect_storage_from_server.rb +76 -0
  31. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_data_centers.rb +0 -1
  32. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_flavors.rb +0 -0
  33. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_images.rb +0 -2
  34. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_locations.rb +0 -0
  35. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_nic.rb +2 -4
  36. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_servers.rb +0 -1
  37. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_all_storages.rb +2 -4
  38. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_data_center.rb +0 -2
  39. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_data_center_state.rb +2 -3
  40. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_flavor.rb +0 -0
  41. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_image.rb +0 -2
  42. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_location.rb +0 -0
  43. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_nic.rb +0 -2
  44. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_server.rb +0 -2
  45. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/get_storage.rb +0 -2
  46. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/reset_server.rb +0 -2
  47. data/lib/fog/compute/profit_bricks/requests/set_internet_access.rb +59 -0
  48. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/start_server.rb +0 -1
  49. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/stop_server.rb +0 -1
  50. data/lib/fog/{profitbricks/requests/compute → compute/profit_bricks/requests}/update_data_center.rb +3 -4
  51. data/lib/fog/compute/profit_bricks/requests/update_nic.rb +74 -0
  52. data/lib/fog/compute/profit_bricks/requests/update_server.rb +79 -0
  53. data/lib/fog/compute/profit_bricks/requests/update_storage.rb +73 -0
  54. data/lib/fog/{profitbricks/models → models/profit_bricks}/base.rb +0 -0
  55. data/lib/fog/parsers/compute.rb +37 -0
  56. data/lib/fog/parsers/compute/profit_bricks/base.rb +51 -0
  57. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/clear_data_center.rb +1 -1
  58. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/connect_storage_to_server.rb +1 -1
  59. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_data_center.rb +1 -1
  60. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_nic.rb +1 -1
  61. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_server.rb +1 -1
  62. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/create_storage.rb +1 -1
  63. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_data_center.rb +1 -1
  64. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_nic.rb +1 -1
  65. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_server.rb +1 -1
  66. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/delete_storage.rb +1 -1
  67. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/disconnect_storage_from_server.rb +1 -1
  68. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_data_centers.rb +1 -1
  69. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_images.rb +2 -2
  70. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_nic.rb +1 -1
  71. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_servers.rb +1 -1
  72. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_all_storages.rb +1 -1
  73. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_data_center.rb +1 -1
  74. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_data_center_state.rb +1 -1
  75. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_image.rb +1 -1
  76. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_nic.rb +1 -1
  77. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_server.rb +1 -1
  78. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/get_storage.rb +1 -1
  79. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/reset_server.rb +1 -1
  80. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/set_internet_access.rb +1 -1
  81. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_data_center.rb +1 -1
  82. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_nic.rb +1 -1
  83. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_server.rb +1 -1
  84. data/lib/fog/{profitbricks/parsers/compute → parsers/compute/profit_bricks}/update_storage.rb +1 -1
  85. data/lib/fog/profitbricks.rb +32 -4
  86. data/lib/fog/profitbricks/compute.rb +1 -215
  87. data/lib/fog/profitbricks/storage.rb +1 -0
  88. data/lib/fog/profitbricks/version.rb +1 -1
  89. metadata +107 -103
  90. data/lib/fog/profitbricks/core.rb +0 -18
  91. data/lib/fog/profitbricks/parsers/base.rb +0 -49
  92. data/lib/fog/profitbricks/requests/compute/connect_storage_to_server.rb +0 -85
  93. data/lib/fog/profitbricks/requests/compute/create_nic.rb +0 -81
  94. data/lib/fog/profitbricks/requests/compute/create_server.rb +0 -107
  95. data/lib/fog/profitbricks/requests/compute/disconnect_storage_from_server.rb +0 -78
  96. data/lib/fog/profitbricks/requests/compute/set_internet_access.rb +0 -61
  97. data/lib/fog/profitbricks/requests/compute/update_nic.rb +0 -76
  98. data/lib/fog/profitbricks/requests/compute/update_server.rb +0 -81
  99. data/lib/fog/profitbricks/requests/compute/update_storage.rb +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21b1328ac2069df3fdac0ee24d1377a80bec2b78
4
- data.tar.gz: b778b70a80f507feca830e0274cbc2b24c32def6
3
+ metadata.gz: 133aacebb89c2d78dbde6746e6aec13bee700397
4
+ data.tar.gz: 7af57c01baad245cf158f0073c96e4453187654f
5
5
  SHA512:
6
- metadata.gz: b053a195019e116b3694aa5215b078df4e36a5919a07a4c50b4c3341e542f82547587c0fd8c22ec553f9cffd3cd2ab46ea4ce95eafd662c5adf8b68fedb3c012
7
- data.tar.gz: 7d89a55e060c1119c5a6e3be5427c551ebb58ebae2ac7e0a60e3600e5a212a79dd0aa72f5b855908b99033404a58243098186cf16a554c9888abcd13fc7f689b
6
+ metadata.gz: 0d62fcae768885e05e86a690490642affd69a7ede178fa1097b7914d7a8eba549838053c25f3a811000311e765521f3a88b0c82486a070da882bf8b7ba47fb32
7
+ data.tar.gz: 7b5296394ed5e7adaa5d5653d6b565de483ffb7384ad9d87939ddd3db416416e2fb9b1b6a1ea6fd38c2dd8b34a3ef0ced8a1c99498930b435021bed9dfd53a56
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
 
4
- task :default => :test
4
+ task :default => :travis
5
5
  task :travis => ["test", "test:travis"]
6
6
 
7
7
  Rake::TestTask.new do |t|
@@ -9,7 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ethan Devenport"]
10
10
  spec.email = ["ethand@stackpointcloud.com"]
11
11
  spec.summary = %q{Module for the 'fog' gem to support ProfitBricks.}
12
- spec.description = %q{Module for the 'fog' gem to support ProfitBricks.}
12
+ spec.description = %q{This library can be used as a module for 'fog' or as
13
+ standalone ProfitBricks provider.}
13
14
  spec.homepage = "https://github.com/fog/fog-profitbricks"
14
15
  spec.license = "MIT"
15
16
 
@@ -18,14 +19,14 @@ Gem::Specification.new do |spec|
18
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
20
  spec.require_paths = ["lib"]
20
21
 
21
- spec.add_runtime_dependency "fog-core"
22
- spec.add_runtime_dependency "fog-xml"
23
- spec.add_runtime_dependency "nokogiri"
24
- spec.add_development_dependency "rake"
25
- spec.add_development_dependency "minitest"
26
- spec.add_development_dependency "shindo"
27
- spec.add_development_dependency "turn"
28
- spec.add_development_dependency "pry"
29
- spec.add_development_dependency "rubocop" if RUBY_VERSION >= "1.9.3"
30
- spec.add_development_dependency "coveralls" if RUBY_VERSION.to_f >= 1.9
22
+ spec.add_runtime_dependency "fog-core", "~> 0"
23
+ spec.add_runtime_dependency "fog-xml", "~> 0"
24
+ spec.add_runtime_dependency "nokogiri", "~> 0"
25
+ spec.add_development_dependency "rake", "~> 0"
26
+ spec.add_development_dependency "minitest", "~> 0"
27
+ spec.add_development_dependency "shindo", "~> 0"
28
+ spec.add_development_dependency "turn", "~> 0"
29
+ spec.add_development_dependency "pry", "~> 0"
30
+ spec.add_development_dependency "rubocop", "~> 0" if RUBY_VERSION >= "1.9.3"
31
+ spec.add_development_dependency "coveralls", "~> 0 "if RUBY_VERSION.to_f >= 1.9
31
32
  end
@@ -0,0 +1,217 @@
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
@@ -1,5 +1,3 @@
1
- require "fog/profitbricks/models/base"
2
-
3
1
  module Fog
4
2
  module Compute
5
3
  class ProfitBricks
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/datacenter"
1
+ require File.expand_path('../datacenter', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -1,5 +1,3 @@
1
- require "fog/profitbricks/models/base"
2
-
3
1
  module Fog
4
2
  module Compute
5
3
  class ProfitBricks
@@ -10,10 +8,6 @@ module Fog
10
8
  attribute :cores
11
9
  attribute :ram
12
10
 
13
- def initialize(attributes = {})
14
- super
15
- end
16
-
17
11
  def save
18
12
  requires :name, :ram, :cores
19
13
  data = service.create_flavor(name, cores, ram)
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/flavor"
1
+ require File.expand_path('../flavor', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -1,5 +1,3 @@
1
- require "fog/profitbricks/models/base"
2
-
3
1
  module Fog
4
2
  module Compute
5
3
  class ProfitBricks
@@ -23,10 +21,6 @@ module Fog
23
21
  attribute :bootable
24
22
  attribute :writeable
25
23
  attribute :public
26
-
27
- def initialize(attributes = {})
28
- super
29
- end
30
24
  end
31
25
  end
32
26
  end
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/image"
1
+ require File.expand_path('../image', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -1,5 +1,3 @@
1
- require "fog/profitbricks/models/base"
2
-
3
1
  module Fog
4
2
  module Compute
5
3
  class ProfitBricks
@@ -21,10 +19,6 @@ module Fog
21
19
 
22
20
  attr_accessor :options
23
21
 
24
- def initialize(attributes = {})
25
- super
26
- end
27
-
28
22
  def save
29
23
  requires :server_id, :lan_id
30
24
 
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/interface"
1
+ require File.expand_path('../interface', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -1,5 +1,3 @@
1
- require "fog/profitbricks/models/base"
2
-
3
1
  module Fog
4
2
  module Compute
5
3
  class ProfitBricks
@@ -8,10 +6,6 @@ module Fog
8
6
 
9
7
  attribute :name, :aliases => "locationName"
10
8
  attribute :country, :aliases => "country"
11
-
12
- def initialize(attributes = {})
13
- super
14
- end
15
9
  end
16
10
  end
17
11
  end
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/region"
1
+ require File.expand_path('../region', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -31,14 +31,6 @@ module Fog
31
31
  attr_accessor :options
32
32
  attr_accessor :flavor_id
33
33
 
34
- def initialize(attributes = {})
35
- super
36
- end
37
-
38
- def wait_for(timeout=Fog.timeout, interval=5, &block)
39
- super
40
- end
41
-
42
34
  def save
43
35
  requires :data_center_id
44
36
 
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/server"
1
+ require File.expand_path('../server', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -1,5 +1,3 @@
1
- require "fog/profitbricks/models/base"
2
-
3
1
  module Fog
4
2
  module Compute
5
3
  class ProfitBricks
@@ -19,10 +17,6 @@ module Fog
19
17
 
20
18
  attr_accessor :options
21
19
 
22
- def initialize(attributes = {})
23
- super
24
- end
25
-
26
20
  def save
27
21
  requires :data_center_id, :size
28
22
 
@@ -1,5 +1,4 @@
1
- require "fog/core/collection"
2
- require "fog/profitbricks/models/compute/volume"
1
+ require File.expand_path('../volume', __FILE__)
3
2
 
4
3
  module Fog
5
4
  module Compute
@@ -2,8 +2,6 @@ module Fog
2
2
  module Compute
3
3
  class ProfitBricks
4
4
  class Real
5
- require "fog/profitbricks/parsers/compute/clear_data_center"
6
-
7
5
  # Clear all objects within a virtual data center
8
6
  #
9
7
  # ==== Parameters