bbrowning-deltacloud-core 0.0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/COPYING +502 -0
  2. data/Rakefile +85 -0
  3. data/bin/deltacloudd +88 -0
  4. data/config.ru +5 -0
  5. data/deltacloud.rb +14 -0
  6. data/lib/deltacloud/base_driver.rb +19 -0
  7. data/lib/deltacloud/base_driver/base_driver.rb +189 -0
  8. data/lib/deltacloud/base_driver/features.rb +159 -0
  9. data/lib/deltacloud/base_driver/mock_driver.rb +37 -0
  10. data/lib/deltacloud/drivers/ec2/ec2_driver.rb +340 -0
  11. data/lib/deltacloud/drivers/ec2/ec2_mock_driver.rb +170 -0
  12. data/lib/deltacloud/drivers/gogrid/gogrid_client.rb +45 -0
  13. data/lib/deltacloud/drivers/gogrid/gogrid_driver.rb +322 -0
  14. data/lib/deltacloud/drivers/mock/mock_driver.rb +275 -0
  15. data/lib/deltacloud/drivers/opennebula/cloud_client.rb +116 -0
  16. data/lib/deltacloud/drivers/opennebula/occi_client.rb +204 -0
  17. data/lib/deltacloud/drivers/opennebula/opennebula_driver.rb +241 -0
  18. data/lib/deltacloud/drivers/rackspace/rackspace_client.rb +129 -0
  19. data/lib/deltacloud/drivers/rackspace/rackspace_driver.rb +150 -0
  20. data/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +254 -0
  21. data/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb +84 -0
  22. data/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb +144 -0
  23. data/lib/deltacloud/drivers/terremark/terremark_driver.rb +261 -0
  24. data/lib/deltacloud/hardware_profile.rb +153 -0
  25. data/lib/deltacloud/helpers.rb +5 -0
  26. data/lib/deltacloud/helpers/application_helper.rb +56 -0
  27. data/lib/deltacloud/helpers/conversion_helper.rb +38 -0
  28. data/lib/deltacloud/helpers/hardware_profiles_helper.rb +35 -0
  29. data/lib/deltacloud/method_serializer.rb +84 -0
  30. data/lib/deltacloud/models/base_model.rb +58 -0
  31. data/lib/deltacloud/models/image.rb +26 -0
  32. data/lib/deltacloud/models/instance.rb +37 -0
  33. data/lib/deltacloud/models/instance_profile.rb +47 -0
  34. data/lib/deltacloud/models/realm.rb +25 -0
  35. data/lib/deltacloud/models/storage_snapshot.rb +26 -0
  36. data/lib/deltacloud/models/storage_volume.rb +27 -0
  37. data/lib/deltacloud/state_machine.rb +84 -0
  38. data/lib/deltacloud/validation.rb +70 -0
  39. data/lib/drivers.rb +38 -0
  40. data/lib/sinatra/accept_media_types.rb +128 -0
  41. data/lib/sinatra/lazy_auth.rb +56 -0
  42. data/lib/sinatra/rabbit.rb +272 -0
  43. data/lib/sinatra/respond_to.rb +269 -0
  44. data/lib/sinatra/static_assets.rb +83 -0
  45. data/lib/sinatra/url_for.rb +51 -0
  46. data/public/favicon.ico +0 -0
  47. data/public/images/grid.png +0 -0
  48. data/public/images/logo-wide.png +0 -0
  49. data/public/images/rails.png +0 -0
  50. data/public/images/topbar-bg.png +0 -0
  51. data/public/javascripts/application.js +32 -0
  52. data/public/javascripts/jquery-1.4.2.min.js +154 -0
  53. data/public/stylesheets/compiled/application.css +613 -0
  54. data/public/stylesheets/compiled/ie.css +31 -0
  55. data/public/stylesheets/compiled/print.css +27 -0
  56. data/public/stylesheets/compiled/screen.css +456 -0
  57. data/server.rb +342 -0
  58. data/support/fedora/deltacloudd +68 -0
  59. data/support/fedora/rubygem-deltacloud-core.spec +91 -0
  60. data/tests/deltacloud_test.rb +60 -0
  61. data/tests/images_test.rb +94 -0
  62. data/tests/instances_test.rb +136 -0
  63. data/tests/realms_test.rb +56 -0
  64. data/tests/storage_snapshots_test.rb +48 -0
  65. data/tests/storage_volumes_test.rb +48 -0
  66. data/torquebox-ec2-config.ru +8 -0
  67. data/views/accounts/index.html.haml +11 -0
  68. data/views/accounts/show.html.haml +30 -0
  69. data/views/api/show.html.haml +15 -0
  70. data/views/api/show.xml.haml +5 -0
  71. data/views/docs/collection.html.haml +37 -0
  72. data/views/docs/collection.xml.haml +14 -0
  73. data/views/docs/index.html.haml +15 -0
  74. data/views/docs/index.xml.haml +5 -0
  75. data/views/docs/operation.html.haml +31 -0
  76. data/views/docs/operation.xml.haml +10 -0
  77. data/views/errors/auth_exception.html.haml +8 -0
  78. data/views/errors/auth_exception.xml.haml +2 -0
  79. data/views/errors/backend_error.html.haml +17 -0
  80. data/views/errors/backend_error.xml.haml +8 -0
  81. data/views/errors/validation_failure.html.haml +11 -0
  82. data/views/errors/validation_failure.xml.haml +7 -0
  83. data/views/hardware_profiles/index.html.haml +25 -0
  84. data/views/hardware_profiles/index.xml.haml +4 -0
  85. data/views/hardware_profiles/show.html.haml +19 -0
  86. data/views/hardware_profiles/show.xml.haml +17 -0
  87. data/views/images/index.html.haml +30 -0
  88. data/views/images/index.xml.haml +7 -0
  89. data/views/images/show.html.haml +21 -0
  90. data/views/images/show.xml.haml +5 -0
  91. data/views/instance_states/show.gv.erb +45 -0
  92. data/views/instance_states/show.html.haml +31 -0
  93. data/views/instance_states/show.xml.haml +8 -0
  94. data/views/instances/index.html.haml +30 -0
  95. data/views/instances/index.xml.haml +23 -0
  96. data/views/instances/new.html.haml +55 -0
  97. data/views/instances/show.html.haml +43 -0
  98. data/views/instances/show.xml.haml +41 -0
  99. data/views/layout.html.haml +26 -0
  100. data/views/realms/index.html.haml +29 -0
  101. data/views/realms/index.xml.haml +12 -0
  102. data/views/realms/show.html.haml +15 -0
  103. data/views/realms/show.xml.haml +10 -0
  104. data/views/root/index.html.haml +4 -0
  105. data/views/storage_snapshots/index.html.haml +20 -0
  106. data/views/storage_snapshots/index.xml.haml +11 -0
  107. data/views/storage_snapshots/show.html.haml +14 -0
  108. data/views/storage_snapshots/show.xml.haml +9 -0
  109. data/views/storage_volumes/index.html.haml +21 -0
  110. data/views/storage_volumes/index.xml.haml +13 -0
  111. data/views/storage_volumes/show.html.haml +20 -0
  112. data/views/storage_volumes/show.xml.haml +13 -0
  113. metadata +361 -0
@@ -0,0 +1,20 @@
1
+ %h1
2
+ = @storage_volume.id
3
+
4
+ %dl
5
+ %di
6
+ %dt Created
7
+ %dd
8
+ = @storage_volume.created
9
+ %di
10
+ %dt Capacity
11
+ %dd
12
+ = "#{@storage_volume.capacity} GB"
13
+ %di
14
+ %dt State
15
+ %dd
16
+ = @storage_volume.state
17
+ %di
18
+ %dt Attached
19
+ %dd
20
+ = link_to(@storage_volume.instance_id, instance_url( @storage_volume.instance_id)) + ' - ' + @storage_volume.device.to_s if @storage_volume.instance_id
@@ -0,0 +1,13 @@
1
+ !!!XML
2
+ %storage-volume{ :href => storage_volume_url(@storage_volume.id)}
3
+ %id<
4
+ =@storage_volume.id
5
+ %created<
6
+ =@storage_volume.created
7
+ %capacity<
8
+ =@storage_volume.capacity
9
+ %device<
10
+ =@storage_volume.device
11
+ %state<
12
+ =@storage_volume.state
13
+ %instance{:href => @storage_volume.instance_id}
metadata ADDED
@@ -0,0 +1,361 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bbrowning-deltacloud-core
3
+ version: !ruby/object:Gem::Version
4
+ hash: 73
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ - 1
11
+ version: 0.0.1.1
12
+ platform: ruby
13
+ authors:
14
+ - Red Hat, Inc.
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2010-07-24 00:00:00 -04:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: rake
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 49
31
+ segments:
32
+ - 0
33
+ - 8
34
+ - 7
35
+ version: 0.8.7
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: haml
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 37
47
+ segments:
48
+ - 2
49
+ - 2
50
+ - 17
51
+ version: 2.2.17
52
+ type: :runtime
53
+ version_requirements: *id002
54
+ - !ruby/object:Gem::Dependency
55
+ name: sinatra
56
+ prerelease: false
57
+ requirement: &id003 !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ hash: 51
63
+ segments:
64
+ - 0
65
+ - 9
66
+ - 4
67
+ version: 0.9.4
68
+ type: :runtime
69
+ version_requirements: *id003
70
+ - !ruby/object:Gem::Dependency
71
+ name: rack
72
+ prerelease: false
73
+ requirement: &id004 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 23
79
+ segments:
80
+ - 1
81
+ - 0
82
+ - 0
83
+ version: 1.0.0
84
+ type: :runtime
85
+ version_requirements: *id004
86
+ - !ruby/object:Gem::Dependency
87
+ name: builder
88
+ prerelease: false
89
+ requirement: &id005 !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ hash: 15
95
+ segments:
96
+ - 2
97
+ - 1
98
+ - 2
99
+ version: 2.1.2
100
+ type: :runtime
101
+ version_requirements: *id005
102
+ - !ruby/object:Gem::Dependency
103
+ name: json_pure
104
+ prerelease: false
105
+ requirement: &id006 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ hash: 25
111
+ segments:
112
+ - 1
113
+ - 2
114
+ - 3
115
+ version: 1.2.3
116
+ type: :runtime
117
+ version_requirements: *id006
118
+ - !ruby/object:Gem::Dependency
119
+ name: compass
120
+ prerelease: false
121
+ requirement: &id007 !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ hash: 29
127
+ segments:
128
+ - 0
129
+ - 8
130
+ - 17
131
+ version: 0.8.17
132
+ type: :development
133
+ version_requirements: *id007
134
+ - !ruby/object:Gem::Dependency
135
+ name: nokogiri
136
+ prerelease: false
137
+ requirement: &id008 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ hash: 5
143
+ segments:
144
+ - 1
145
+ - 4
146
+ - 1
147
+ version: 1.4.1
148
+ type: :development
149
+ version_requirements: *id008
150
+ - !ruby/object:Gem::Dependency
151
+ name: rack-test
152
+ prerelease: false
153
+ requirement: &id009 !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ hash: 13
159
+ segments:
160
+ - 0
161
+ - 5
162
+ - 3
163
+ version: 0.5.3
164
+ type: :development
165
+ version_requirements: *id009
166
+ - !ruby/object:Gem::Dependency
167
+ name: cucumber
168
+ prerelease: false
169
+ requirement: &id010 !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ hash: 1
175
+ segments:
176
+ - 0
177
+ - 6
178
+ - 3
179
+ version: 0.6.3
180
+ type: :development
181
+ version_requirements: *id010
182
+ - !ruby/object:Gem::Dependency
183
+ name: rcov
184
+ prerelease: false
185
+ requirement: &id011 !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ hash: 43
191
+ segments:
192
+ - 0
193
+ - 9
194
+ - 8
195
+ version: 0.9.8
196
+ type: :development
197
+ version_requirements: *id011
198
+ description: " The Deltacloud API is built as a service-based REST API.\n You do not directly link a Deltacloud library into your program to use it.\n Instead, a client speaks the Deltacloud API over HTTP to a server\n which implements the REST interface.\n"
199
+ email: deltacloud-users@lists.fedorahosted.org
200
+ executables:
201
+ - deltacloudd
202
+ extensions: []
203
+
204
+ extra_rdoc_files:
205
+ - COPYING
206
+ files:
207
+ - Rakefile
208
+ - config.ru
209
+ - torquebox-ec2-config.ru
210
+ - server.rb
211
+ - deltacloud.rb
212
+ - support/fedora/rubygem-deltacloud-core.spec
213
+ - support/fedora/deltacloudd
214
+ - lib/sinatra/rabbit.rb
215
+ - lib/sinatra/respond_to.rb
216
+ - lib/sinatra/lazy_auth.rb
217
+ - lib/sinatra/accept_media_types.rb
218
+ - lib/sinatra/url_for.rb
219
+ - lib/sinatra/static_assets.rb
220
+ - lib/deltacloud/validation.rb
221
+ - lib/deltacloud/method_serializer.rb
222
+ - lib/deltacloud/state_machine.rb
223
+ - lib/deltacloud/hardware_profile.rb
224
+ - lib/deltacloud/helpers.rb
225
+ - lib/deltacloud/base_driver.rb
226
+ - lib/deltacloud/helpers/conversion_helper.rb
227
+ - lib/deltacloud/helpers/hardware_profiles_helper.rb
228
+ - lib/deltacloud/helpers/application_helper.rb
229
+ - lib/deltacloud/base_driver/features.rb
230
+ - lib/deltacloud/base_driver/base_driver.rb
231
+ - lib/deltacloud/base_driver/mock_driver.rb
232
+ - lib/deltacloud/drivers/opennebula/occi_client.rb
233
+ - lib/deltacloud/drivers/opennebula/cloud_client.rb
234
+ - lib/deltacloud/drivers/opennebula/opennebula_driver.rb
235
+ - lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
236
+ - lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
237
+ - lib/deltacloud/drivers/rhevm/rhevm_driver.rb
238
+ - lib/deltacloud/drivers/terremark/terremark_driver.rb
239
+ - lib/deltacloud/drivers/rackspace/rackspace_driver.rb
240
+ - lib/deltacloud/drivers/rackspace/rackspace_client.rb
241
+ - lib/deltacloud/drivers/ec2/ec2_driver.rb
242
+ - lib/deltacloud/drivers/ec2/ec2_mock_driver.rb
243
+ - lib/deltacloud/drivers/gogrid/gogrid_driver.rb
244
+ - lib/deltacloud/drivers/gogrid/gogrid_client.rb
245
+ - lib/deltacloud/drivers/mock/mock_driver.rb
246
+ - lib/deltacloud/models/realm.rb
247
+ - lib/deltacloud/models/image.rb
248
+ - lib/deltacloud/models/storage_snapshot.rb
249
+ - lib/deltacloud/models/storage_volume.rb
250
+ - lib/deltacloud/models/base_model.rb
251
+ - lib/deltacloud/models/instance_profile.rb
252
+ - lib/deltacloud/models/instance.rb
253
+ - lib/drivers.rb
254
+ - views/instances/new.html.haml
255
+ - views/instances/show.html.haml
256
+ - views/instances/index.html.haml
257
+ - views/instances/show.xml.haml
258
+ - views/instances/index.xml.haml
259
+ - views/hardware_profiles/show.html.haml
260
+ - views/hardware_profiles/index.html.haml
261
+ - views/hardware_profiles/show.xml.haml
262
+ - views/hardware_profiles/index.xml.haml
263
+ - views/root/index.html.haml
264
+ - views/api/show.html.haml
265
+ - views/api/show.xml.haml
266
+ - views/errors/auth_exception.html.haml
267
+ - views/errors/auth_exception.xml.haml
268
+ - views/errors/backend_error.xml.haml
269
+ - views/errors/validation_failure.xml.haml
270
+ - views/errors/validation_failure.html.haml
271
+ - views/errors/backend_error.html.haml
272
+ - views/docs/collection.xml.haml
273
+ - views/docs/collection.html.haml
274
+ - views/docs/operation.html.haml
275
+ - views/docs/index.html.haml
276
+ - views/docs/operation.xml.haml
277
+ - views/docs/index.xml.haml
278
+ - views/realms/show.html.haml
279
+ - views/realms/index.html.haml
280
+ - views/realms/show.xml.haml
281
+ - views/realms/index.xml.haml
282
+ - views/layout.html.haml
283
+ - views/instance_states/show.html.haml
284
+ - views/instance_states/show.xml.haml
285
+ - views/storage_volumes/show.html.haml
286
+ - views/storage_volumes/index.html.haml
287
+ - views/storage_volumes/show.xml.haml
288
+ - views/storage_volumes/index.xml.haml
289
+ - views/accounts/show.html.haml
290
+ - views/accounts/index.html.haml
291
+ - views/storage_snapshots/show.html.haml
292
+ - views/storage_snapshots/index.html.haml
293
+ - views/storage_snapshots/show.xml.haml
294
+ - views/storage_snapshots/index.xml.haml
295
+ - views/images/show.html.haml
296
+ - views/images/index.html.haml
297
+ - views/images/show.xml.haml
298
+ - views/images/index.xml.haml
299
+ - views/instance_states/show.gv.erb
300
+ - public/favicon.ico
301
+ - public/images/logo-wide.png
302
+ - public/images/topbar-bg.png
303
+ - public/images/rails.png
304
+ - public/images/grid.png
305
+ - public/javascripts/application.js
306
+ - public/javascripts/jquery-1.4.2.min.js
307
+ - public/stylesheets/compiled/ie.css
308
+ - public/stylesheets/compiled/print.css
309
+ - public/stylesheets/compiled/screen.css
310
+ - public/stylesheets/compiled/application.css
311
+ - bin/deltacloudd
312
+ - COPYING
313
+ - tests/storage_volumes_test.rb
314
+ - tests/storage_snapshots_test.rb
315
+ - tests/realms_test.rb
316
+ - tests/instances_test.rb
317
+ - tests/deltacloud_test.rb
318
+ - tests/images_test.rb
319
+ has_rdoc: true
320
+ homepage: http://www.deltacloud.org
321
+ licenses: []
322
+
323
+ post_install_message:
324
+ rdoc_options: []
325
+
326
+ require_paths:
327
+ - lib
328
+ required_ruby_version: !ruby/object:Gem::Requirement
329
+ none: false
330
+ requirements:
331
+ - - ">="
332
+ - !ruby/object:Gem::Version
333
+ hash: 53
334
+ segments:
335
+ - 1
336
+ - 8
337
+ - 1
338
+ version: 1.8.1
339
+ required_rubygems_version: !ruby/object:Gem::Requirement
340
+ none: false
341
+ requirements:
342
+ - - ">="
343
+ - !ruby/object:Gem::Version
344
+ hash: 3
345
+ segments:
346
+ - 0
347
+ version: "0"
348
+ requirements: []
349
+
350
+ rubyforge_project:
351
+ rubygems_version: 1.3.7
352
+ signing_key:
353
+ specification_version: 3
354
+ summary: Deltacloud REST API
355
+ test_files:
356
+ - tests/storage_volumes_test.rb
357
+ - tests/storage_snapshots_test.rb
358
+ - tests/realms_test.rb
359
+ - tests/instances_test.rb
360
+ - tests/deltacloud_test.rb
361
+ - tests/images_test.rb