bbrowning-deltacloud-core 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -310,6 +310,15 @@ class EC2Driver < Deltacloud::BaseDriver
310
310
  end
311
311
  end
312
312
 
313
+ def valid_credentials?(credentials)
314
+ client = new_client(credentials)
315
+ # FIXME: We need to do this call to determine if
316
+ # EC2 is working with given credentials. There is no
317
+ # other way to check, if given credentials are valid or not.
318
+ realms = client.describe_availability_zones rescue false
319
+ return realms ? true : false
320
+ end
321
+
313
322
  private
314
323
 
315
324
  def new_client(credentials)
@@ -192,6 +192,15 @@ class GogridDriver < Deltacloud::BaseDriver
192
192
  return creds
193
193
  end
194
194
 
195
+ def valid_credentials?(credentials)
196
+ client = new_client(credentials)
197
+ # FIXME: We need to do this call to determine if
198
+ # GoGrid is working with given credentials. There is no
199
+ # other way to check, if given credentials are valid or not.
200
+ return false unless new_client(credentials).request('common/lookup/list', { 'lookup' => 'ip.datacenter' })
201
+ true
202
+ end
203
+
195
204
  define_instance_states do
196
205
  start.to( :pending ) .automatically
197
206
  pending.to( :running ) .automatically
@@ -257,6 +257,15 @@ class MockDriver < Deltacloud::BaseDriver
257
257
  snapshots
258
258
  end
259
259
 
260
+ def valid_credentials?(credentials)
261
+ begin
262
+ check_credentials(credentials)
263
+ return true
264
+ rescue Deltacloud::AuthException
265
+ end
266
+ return false
267
+ end
268
+
260
269
  private
261
270
 
262
271
  def check_credentials(credentials)
@@ -131,6 +131,15 @@ class RackspaceDriver < Deltacloud::BaseDriver
131
131
  instances
132
132
  end
133
133
 
134
+ def valid_credentials?(credentials)
135
+ begin
136
+ new_client(credentials)
137
+ rescue
138
+ return false
139
+ end
140
+ true
141
+ end
142
+
134
143
 
135
144
  def convert_srv_to_instance(srv)
136
145
  inst = Instance.new(:id => srv["id"].to_s,
@@ -191,6 +191,15 @@ def destroy_instance(credentials, id)
191
191
  end
192
192
  end
193
193
 
194
+ def valid_credentials?(credentials)
195
+ begin
196
+ new_client(credentials)
197
+ rescue Deltacloud::AuthException
198
+ return false
199
+ end
200
+ true
201
+ end
202
+
194
203
  #--
195
204
  # PRIVATE METHODS:
196
205
  #--
@@ -0,0 +1,253 @@
1
+ #
2
+ # Copyright (C) 2009 Red Hat, Inc.
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership. The
7
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance with the
9
+ # License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
18
+
19
+ # INSTALLATION:
20
+ # 1. You need VirtualBox and VBoxManage tool installed
21
+ # 2. You need to setup some images manually inside VirtualBox
22
+ # 3. You need to install 'Guest Additions' to this images for metrics
23
+ # 4. You need a lot of hard drive space ;-)
24
+
25
+ # NETWORKING:
26
+ # For now, the VM is always started with bridged networking. The NIC
27
+ # it uses defaults to eth0, but may be overriden with the VIRTUALBOX_NIC
28
+ # environment variable. This should be the NIC name as expected by Virtualbox.
29
+ # For example, on my Macbook Pro this is 'en1: AirPort'
30
+
31
+ require 'deltacloud/base_driver'
32
+ require 'virtualbox'
33
+
34
+ module Deltacloud
35
+ module Drivers
36
+ module Virtualbox
37
+ class VirtualboxDriver < Deltacloud::BaseDriver
38
+
39
+ ( REALMS = [
40
+ Realm.new({
41
+ :id => 'local',
42
+ :name => 'localhost',
43
+ :limit => 100,
44
+ :state => 'AVAILABLE'
45
+ })
46
+ ] ) unless defined?( REALMS )
47
+
48
+ define_hardware_profile 'small' do
49
+ cpu 1
50
+ memory 0.5
51
+ storage 1
52
+ architecture `uname -m`.strip
53
+ end
54
+
55
+ define_hardware_profile 'medium' do
56
+ cpu 1
57
+ memory 1
58
+ storage 1
59
+ architecture `uname -m`.strip
60
+ end
61
+
62
+ define_hardware_profile 'large' do
63
+ cpu 2
64
+ memory 2
65
+ storage 1
66
+ architecture `uname -m`.strip
67
+ end
68
+
69
+ define_instance_states do
70
+ start.to( :pending ) .on( :create )
71
+ pending.to( :running ) .automatically
72
+ running.to( :stopped ) .on( :stop )
73
+ stopped.to( :running ) .on( :start )
74
+ stopped.to( :finish ) .on( :destroy )
75
+ end
76
+
77
+ def realms(credentials, opts = nil)
78
+ return REALMS if ( opts.nil? )
79
+ results = REALMS
80
+ results = filter_on( results, :id, opts )
81
+ results
82
+ end
83
+
84
+ def images(credentials, opts = nil)
85
+ images = convert_images(VirtualBox::VM.all)
86
+ images = filter_on( images, :id, opts )
87
+ images = filter_on( images, :architecture, opts )
88
+ images.sort_by{|e| [e.owner_id, e.description]}
89
+ end
90
+
91
+ def instances(credentials, opts = nil)
92
+ instances = convert_instances(VirtualBox::VM.all)
93
+ instances = filter_on( instances, :id, opts )
94
+ instances = filter_on( instances, :state, opts )
95
+ instances = filter_on( instances, :image_id, opts )
96
+ instances
97
+ end
98
+
99
+ def create_instance(credentials, image_id, opts)
100
+ image = images(credentials, { :id => image_id }).first
101
+
102
+ # Choose a name for the new vm unless one was given
103
+ name = opts[:name]
104
+ if name.nil? or name.empty?
105
+ # random uniqueish name w/o having to pull in UUID gem
106
+ name = "#{image.name} - #{(Time.now.to_f * 1000).to_i}#{rand(1000)}"
107
+ end
108
+
109
+ hwp = find_hardware_profile(credentials, opts[:hwp_id], image_id)
110
+ parent_vm = VirtualBox::VM.find(image.id)
111
+
112
+ # Create new virtual machine
113
+ vm = VirtualBox::VM.create(name, parent_vm.os_type_id)
114
+ new_uid = vm.uuid
115
+
116
+ # Add Hardware profile to this machine
117
+ vm.memory_size = ((hwp.memory.value*1.024)*1000).to_i
118
+ vm.cpu_count = hwp.cpu.value.to_i
119
+ vm.vram_size = 16
120
+
121
+ # Copy the network adapter settings from the parent vm
122
+ vm.network_adapters[0].enabled = true
123
+ vm.network_adapters[0].attachment_type = parent_vm.network_adapters[0].attachment_type
124
+ vm.network_adapters[0].host_interface = parent_vm.network_adapters[0].host_interface
125
+
126
+ # Store some metadata using extra data fields
127
+ vm.extra_data['deltacloud_hwp_id'] = hwp.name
128
+ vm.extra_data['deltacloud_image_id'] = image_id
129
+
130
+ vm.save
131
+
132
+ # Clone the disk image in a separate thread because it can take a long time
133
+ Thread.new do
134
+ # Reload the vm objects because they probably aren't safe to
135
+ # reuse across threads
136
+ parent_vm = VirtualBox::VM.find(image.id)
137
+ vm = VirtualBox::VM.find(new_uid)
138
+
139
+ # Add storage
140
+ # This will 'reuse' existing image
141
+ parent_hdd = hard_disk(parent_vm)
142
+ new_location = File.join(File.dirname(parent_hdd.location), "#{name}.vdi")
143
+
144
+ new_hd = parent_hdd.clone(new_location, "VDI")
145
+ vm.add_storage_controller('IDE Controller', :ide, :piix4)
146
+ vm.attach_storage('IDE Controller', 0, 0, :hard_disk, new_hd.uuid)
147
+ vm.start
148
+ if opts[:user_data]
149
+ user_data = opts[:user_data].gsub("\n", '') # remove newlines from base64 encoded text
150
+ vm.guest_property["/Deltacloud/UserData"] = user_data
151
+ end
152
+ end
153
+ instances(credentials, :id => new_uid).first
154
+ end
155
+
156
+ def reboot_instance(credentials, id)
157
+ vm = VirtualBox::VM.find(id)
158
+ vm.control(:reset)
159
+ end
160
+
161
+ def stop_instance(credentials, id)
162
+ vm = VirtualBox::VM.find(id)
163
+ unless vm.shutdown
164
+ vm.stop
165
+ end
166
+ end
167
+
168
+ def start_instance(credentials, id)
169
+ vm = VirtualBox::VM.find(id)
170
+ vm.start
171
+ end
172
+
173
+ def destroy_instance(credentials, id)
174
+ vm = VirtualBox::VM.find(id)
175
+ vm.destroy(:destroy_medium => :delete)
176
+ end
177
+
178
+ private
179
+
180
+ def convert_instances(instances)
181
+ vms = []
182
+ instances.each do |instance|
183
+ volume = convert_volume(instance)
184
+ state = convert_state(instance.state, volume)
185
+ ip = vbox_get_ip(instance)
186
+ hwp_name = instance.extra_data['deltacloud_hwp_id'] || 'small'
187
+ image_id = instance.extra_data['deltacloud_image_id'] || ''
188
+ vms << Instance.new(:id => instance.uuid,
189
+ :image_id => image_id,
190
+ :name => instance.name,
191
+ :state => state,
192
+ :owner_id => ENV['USER'] || ENV['USERNAME'] || 'nobody',
193
+ :realm_id => 'local',
194
+ :public_addresses => ip,
195
+ :private_addresses => ip,
196
+ :actions => instance_actions_for(state),
197
+ :instance_profile => InstanceProfile.new(hwp_name))
198
+ end
199
+ vms
200
+ end
201
+
202
+ # Warning: You need VirtualHost guest additions for this
203
+ def vbox_get_ip(instance)
204
+ ip = instance.guest_property["/VirtualBox/GuestInfo/Net/0/V4/IP"]
205
+ ip.nil? ? [] : [ip]
206
+ end
207
+
208
+ def convert_state(state, volume)
209
+ return 'PENDING' if volume.nil?
210
+ state = state.to_s.strip.upcase
211
+ case state
212
+ when 'POWEROFF' then 'STOPPED'
213
+ when 'POWERED_OFF' then 'STOPPED'
214
+ else
215
+ state
216
+ end
217
+ end
218
+
219
+ def convert_volume(vm)
220
+ hdd = hard_disk(vm)
221
+ return nil if hdd.nil?
222
+ StorageVolume.new(:id => hdd.uuid,
223
+ :created => Time.now,
224
+ :state => 'AVAILABLE',
225
+ :capacity => hdd.logical_size,
226
+ :instance_id => vm.uuid,
227
+ :device => hdd.type)
228
+ end
229
+
230
+ def hard_disk(vm)
231
+ attachment = vm.medium_attachments.select { |ma| ma.type == :hard_disk }.first
232
+ attachment.nil? ? nil : attachment.medium
233
+ end
234
+
235
+ def convert_images(images)
236
+ vms = []
237
+ images.each do |image|
238
+ hdd = hard_disk(image)
239
+ next unless hdd
240
+ capacity = ", #{hdd.logical_size} MBytes HDD"
241
+ vms << Image.new(:id => image.uuid,
242
+ :name => image.name,
243
+ :description => "#{image.memory_size} MB RAM, #{image.cpu_count} CPU#{capacity}",
244
+ :owner_id => ENV['USER'] || ENV['USERNAME'] || 'nobody',
245
+ :architecture => `uname -m`.strip)
246
+ end
247
+ vms
248
+ end
249
+
250
+ end
251
+ end
252
+ end
253
+ end
data/lib/drivers.rb CHANGED
@@ -6,6 +6,7 @@ DRIVERS = {
6
6
  :rimuhosting => { :name => "RimuHosting"},
7
7
  :opennebula => { :name => "Opennebula", :class => "OpennebulaDriver" },
8
8
  :terremark => { :name => "Terremark"},
9
+ :virtualbox => { :name => "Virtualbox" },
9
10
  :mock => { :name => "Mock" }
10
11
  }
11
12
 
data/server.rb CHANGED
@@ -42,6 +42,9 @@ get '/' do redirect url_for('/api'); end
42
42
 
43
43
  get '/api\/?' do
44
44
  @version = 0.1
45
+ if params[:force_auth]
46
+ return [401, 'Authentication failed'] unless driver.valid_credentials?(credentials)
47
+ end
45
48
  respond_to do |format|
46
49
  format.xml { haml :"api/show" }
47
50
  format.json do
metadata CHANGED
@@ -1,339 +1,374 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbrowning-deltacloud-core
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease: false
5
6
  segments:
6
- - 0
7
- - 0
8
- - 4
9
- version: 0.0.4
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
10
11
  platform: ruby
11
12
  authors:
12
- - Red Hat, Inc.
13
+ - Red Hat, Inc.
13
14
  autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-01 00:00:00 -04:00
18
+ date: 2010-09-19 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 8
30
- - 7
31
- version: 0.8.7
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: eventmachine
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- - 12
44
- - 10
45
- version: 0.12.10
46
- type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: haml
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 2
57
- - 2
58
- - 17
59
- version: 2.2.17
60
- type: :runtime
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: sinatra
64
- prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- - 9
72
- - 4
73
- version: 0.9.4
74
- type: :runtime
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: rack
78
- prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- segments:
84
- - 1
85
- - 0
86
- - 0
87
- version: 1.0.0
88
- type: :runtime
89
- version_requirements: *id005
90
- - !ruby/object:Gem::Dependency
91
- name: thin
92
- prerelease: false
93
- requirement: &id006 !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- segments:
98
- - 1
99
- - 2
100
- - 5
101
- version: 1.2.5
102
- type: :runtime
103
- version_requirements: *id006
104
- - !ruby/object:Gem::Dependency
105
- name: rerun
106
- prerelease: false
107
- requirement: &id007 !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- segments:
112
- - 0
113
- - 5
114
- - 2
115
- version: 0.5.2
116
- type: :runtime
117
- version_requirements: *id007
118
- - !ruby/object:Gem::Dependency
119
- name: json
120
- prerelease: false
121
- requirement: &id008 !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- segments:
126
- - 1
127
- - 4
128
- - 3
129
- version: 1.4.3
130
- type: :runtime
131
- version_requirements: *id008
132
- - !ruby/object:Gem::Dependency
133
- name: compass
134
- prerelease: false
135
- requirement: &id009 !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- segments:
140
- - 0
141
- - 8
142
- - 17
143
- version: 0.8.17
144
- type: :development
145
- version_requirements: *id009
146
- - !ruby/object:Gem::Dependency
147
- name: nokogiri
148
- prerelease: false
149
- requirement: &id010 !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- segments:
154
- - 1
155
- - 4
156
- - 1
157
- version: 1.4.1
158
- type: :development
159
- version_requirements: *id010
160
- - !ruby/object:Gem::Dependency
161
- name: rack-test
162
- prerelease: false
163
- requirement: &id011 !ruby/object:Gem::Requirement
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- segments:
168
- - 0
169
- - 5
170
- - 3
171
- version: 0.5.3
172
- type: :development
173
- version_requirements: *id011
174
- - !ruby/object:Gem::Dependency
175
- name: cucumber
176
- prerelease: false
177
- requirement: &id012 !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- segments:
182
- - 0
183
- - 6
184
- - 3
185
- version: 0.6.3
186
- type: :development
187
- version_requirements: *id012
188
- - !ruby/object:Gem::Dependency
189
- name: rcov
190
- prerelease: false
191
- requirement: &id013 !ruby/object:Gem::Requirement
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- segments:
196
- - 0
197
- - 9
198
- - 8
199
- version: 0.9.8
200
- type: :development
201
- version_requirements: *id013
21
+ - !ruby/object:Gem::Dependency
22
+ name: rake
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 49
30
+ segments:
31
+ - 0
32
+ - 8
33
+ - 7
34
+ version: 0.8.7
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: eventmachine
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 59
46
+ segments:
47
+ - 0
48
+ - 12
49
+ - 10
50
+ version: 0.12.10
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: haml
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 37
62
+ segments:
63
+ - 2
64
+ - 2
65
+ - 17
66
+ version: 2.2.17
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: sinatra
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 51
78
+ segments:
79
+ - 0
80
+ - 9
81
+ - 4
82
+ version: 0.9.4
83
+ type: :runtime
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
86
+ name: rack
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ hash: 23
94
+ segments:
95
+ - 1
96
+ - 0
97
+ - 0
98
+ version: 1.0.0
99
+ type: :runtime
100
+ version_requirements: *id005
101
+ - !ruby/object:Gem::Dependency
102
+ name: thin
103
+ prerelease: false
104
+ requirement: &id006 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ hash: 21
110
+ segments:
111
+ - 1
112
+ - 2
113
+ - 5
114
+ version: 1.2.5
115
+ type: :runtime
116
+ version_requirements: *id006
117
+ - !ruby/object:Gem::Dependency
118
+ name: rerun
119
+ prerelease: false
120
+ requirement: &id007 !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ hash: 15
126
+ segments:
127
+ - 0
128
+ - 5
129
+ - 2
130
+ version: 0.5.2
131
+ type: :runtime
132
+ version_requirements: *id007
133
+ - !ruby/object:Gem::Dependency
134
+ name: json
135
+ prerelease: false
136
+ requirement: &id008 !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ hash: 1
142
+ segments:
143
+ - 1
144
+ - 4
145
+ - 3
146
+ version: 1.4.3
147
+ type: :runtime
148
+ version_requirements: *id008
149
+ - !ruby/object:Gem::Dependency
150
+ name: compass
151
+ prerelease: false
152
+ requirement: &id009 !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ hash: 29
158
+ segments:
159
+ - 0
160
+ - 8
161
+ - 17
162
+ version: 0.8.17
163
+ type: :development
164
+ version_requirements: *id009
165
+ - !ruby/object:Gem::Dependency
166
+ name: nokogiri
167
+ prerelease: false
168
+ requirement: &id010 !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ hash: 5
174
+ segments:
175
+ - 1
176
+ - 4
177
+ - 1
178
+ version: 1.4.1
179
+ type: :development
180
+ version_requirements: *id010
181
+ - !ruby/object:Gem::Dependency
182
+ name: rack-test
183
+ prerelease: false
184
+ requirement: &id011 !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ hash: 13
190
+ segments:
191
+ - 0
192
+ - 5
193
+ - 3
194
+ version: 0.5.3
195
+ type: :development
196
+ version_requirements: *id011
197
+ - !ruby/object:Gem::Dependency
198
+ name: cucumber
199
+ prerelease: false
200
+ requirement: &id012 !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ hash: 1
206
+ segments:
207
+ - 0
208
+ - 6
209
+ - 3
210
+ version: 0.6.3
211
+ type: :development
212
+ version_requirements: *id012
213
+ - !ruby/object:Gem::Dependency
214
+ name: rcov
215
+ prerelease: false
216
+ requirement: &id013 !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ hash: 43
222
+ segments:
223
+ - 0
224
+ - 9
225
+ - 8
226
+ version: 0.9.8
227
+ type: :development
228
+ version_requirements: *id013
202
229
  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"
203
230
  email: deltacloud-users@lists.fedorahosted.org
204
231
  executables:
205
- - deltacloudd
232
+ - deltacloudd
206
233
  extensions: []
207
234
 
208
235
  extra_rdoc_files:
209
- - COPYING
236
+ - COPYING
210
237
  files:
211
- - Rakefile
212
- - config.ru
213
- - deltacloud.rb
214
- - server.rb
215
- - support/fedora/deltacloudd
216
- - support/fedora/rubygem-deltacloud-core.spec
217
- - lib/drivers.rb
218
- - lib/deltacloud/base_driver.rb
219
- - lib/deltacloud/hardware_profile.rb
220
- - lib/deltacloud/helpers.rb
221
- - lib/deltacloud/method_serializer.rb
222
- - lib/deltacloud/state_machine.rb
223
- - lib/deltacloud/validation.rb
224
- - lib/deltacloud/base_driver/base_driver.rb
225
- - lib/deltacloud/base_driver/features.rb
226
- - lib/deltacloud/base_driver/mock_driver.rb
227
- - lib/deltacloud/drivers/ec2/ec2_driver.rb
228
- - lib/deltacloud/drivers/ec2/ec2_mock_driver.rb
229
- - lib/deltacloud/drivers/gogrid/gogrid_client.rb
230
- - lib/deltacloud/drivers/gogrid/gogrid_driver.rb
231
- - lib/deltacloud/drivers/gogrid/test.rb
232
- - lib/deltacloud/drivers/mock/mock_driver.rb
233
- - lib/deltacloud/drivers/opennebula/cloud_client.rb
234
- - lib/deltacloud/drivers/opennebula/occi_client.rb
235
- - lib/deltacloud/drivers/opennebula/opennebula_driver.rb
236
- - lib/deltacloud/drivers/rackspace/rackspace_client.rb
237
- - lib/deltacloud/drivers/rackspace/rackspace_driver.rb
238
- - lib/deltacloud/drivers/rhevm/rhevm_driver.rb
239
- - lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
240
- - lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
241
- - lib/deltacloud/drivers/terremark/terremark_driver.rb
242
- - lib/deltacloud/helpers/application_helper.rb
243
- - lib/deltacloud/helpers/conversion_helper.rb
244
- - lib/deltacloud/helpers/hardware_profiles_helper.rb
245
- - lib/deltacloud/models/base_model.rb
246
- - lib/deltacloud/models/image.rb
247
- - lib/deltacloud/models/instance.rb
248
- - lib/deltacloud/models/instance_profile.rb
249
- - lib/deltacloud/models/key.rb
250
- - lib/deltacloud/models/realm.rb
251
- - lib/deltacloud/models/storage_snapshot.rb
252
- - lib/deltacloud/models/storage_volume.rb
253
- - lib/sinatra/accept_media_types.rb
254
- - lib/sinatra/lazy_auth.rb
255
- - lib/sinatra/rabbit.rb
256
- - lib/sinatra/respond_to.rb
257
- - lib/sinatra/static_assets.rb
258
- - lib/sinatra/url_for.rb
259
- - lib/deltacloud/drivers/mock/data/images/img1.yml
260
- - lib/deltacloud/drivers/mock/data/images/img2.yml
261
- - lib/deltacloud/drivers/mock/data/images/img3.yml
262
- - lib/deltacloud/drivers/mock/data/instances/inst0.yml
263
- - lib/deltacloud/drivers/mock/data/instances/inst1.yml
264
- - lib/deltacloud/drivers/mock/data/instances/inst2.yml
265
- - lib/deltacloud/drivers/mock/data/storage_snapshots/snap1.yml
266
- - lib/deltacloud/drivers/mock/data/storage_snapshots/snap2.yml
267
- - lib/deltacloud/drivers/mock/data/storage_snapshots/snap3.yml
268
- - lib/deltacloud/drivers/mock/data/storage_volumes/vol1.yml
269
- - lib/deltacloud/drivers/mock/data/storage_volumes/vol2.yml
270
- - lib/deltacloud/drivers/mock/data/storage_volumes/vol3.yml
271
- - views/layout.html.haml
272
- - views/accounts/index.html.haml
273
- - views/accounts/show.html.haml
274
- - views/api/show.html.haml
275
- - views/api/show.xml.haml
276
- - views/docs/collection.html.haml
277
- - views/docs/collection.xml.haml
278
- - views/docs/index.html.haml
279
- - views/docs/index.xml.haml
280
- - views/docs/operation.html.haml
281
- - views/docs/operation.xml.haml
282
- - views/errors/auth_exception.html.haml
283
- - views/errors/auth_exception.xml.haml
284
- - views/errors/backend_error.html.haml
285
- - views/errors/backend_error.xml.haml
286
- - views/errors/not_found.html.haml
287
- - views/errors/not_found.xml.haml
288
- - views/errors/validation_failure.html.haml
289
- - views/errors/validation_failure.xml.haml
290
- - views/hardware_profiles/index.html.haml
291
- - views/hardware_profiles/index.xml.haml
292
- - views/hardware_profiles/show.html.haml
293
- - views/hardware_profiles/show.xml.haml
294
- - views/images/index.html.haml
295
- - views/images/index.xml.haml
296
- - views/images/show.html.haml
297
- - views/images/show.xml.haml
298
- - views/instance_states/show.html.haml
299
- - views/instance_states/show.xml.haml
300
- - views/instances/index.html.haml
301
- - views/instances/index.xml.haml
302
- - views/instances/new.html.haml
303
- - views/instances/show.html.haml
304
- - views/instances/show.xml.haml
305
- - views/keys/index.html.haml
306
- - views/keys/index.xml.haml
307
- - views/keys/new.html.haml
308
- - views/keys/show.html.haml
309
- - views/keys/show.xml.haml
310
- - views/realms/index.html.haml
311
- - views/realms/index.xml.haml
312
- - views/realms/show.html.haml
313
- - views/realms/show.xml.haml
314
- - views/root/index.html.haml
315
- - views/storage_snapshots/index.html.haml
316
- - views/storage_snapshots/index.xml.haml
317
- - views/storage_snapshots/show.html.haml
318
- - views/storage_snapshots/show.xml.haml
319
- - views/storage_volumes/index.html.haml
320
- - views/storage_volumes/index.xml.haml
321
- - views/storage_volumes/show.html.haml
322
- - views/storage_volumes/show.xml.haml
323
- - views/instance_states/show.gv.erb
324
- - public/favicon.ico
325
- - public/images/grid.png
326
- - public/images/logo-wide.png
327
- - public/images/rails.png
328
- - public/images/topbar-bg.png
329
- - public/javascripts/application.js
330
- - public/javascripts/jquery-1.4.2.min.js
331
- - public/stylesheets/compiled/application.css
332
- - public/stylesheets/compiled/ie.css
333
- - public/stylesheets/compiled/print.css
334
- - public/stylesheets/compiled/screen.css
335
- - bin/deltacloudd
336
- - COPYING
238
+ - Rakefile
239
+ - config.ru
240
+ - deltacloud.rb
241
+ - server.rb
242
+ - support/fedora/deltacloudd
243
+ - support/fedora/rubygem-deltacloud-core.spec
244
+ - lib/deltacloud/base_driver/base_driver.rb
245
+ - lib/deltacloud/base_driver/features.rb
246
+ - lib/deltacloud/base_driver/mock_driver.rb
247
+ - lib/deltacloud/base_driver.rb
248
+ - lib/deltacloud/drivers/ec2/ec2_driver.rb
249
+ - lib/deltacloud/drivers/ec2/ec2_mock_driver.rb
250
+ - lib/deltacloud/drivers/gogrid/gogrid_client.rb
251
+ - lib/deltacloud/drivers/gogrid/gogrid_driver.rb
252
+ - lib/deltacloud/drivers/gogrid/test.rb
253
+ - lib/deltacloud/drivers/mock/mock_driver.rb
254
+ - lib/deltacloud/drivers/opennebula/cloud_client.rb
255
+ - lib/deltacloud/drivers/opennebula/occi_client.rb
256
+ - lib/deltacloud/drivers/opennebula/opennebula_driver.rb
257
+ - lib/deltacloud/drivers/rackspace/rackspace_client.rb
258
+ - lib/deltacloud/drivers/rackspace/rackspace_driver.rb
259
+ - lib/deltacloud/drivers/rhevm/rhevm_driver.rb
260
+ - lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
261
+ - lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
262
+ - lib/deltacloud/drivers/terremark/terremark_driver.rb
263
+ - lib/deltacloud/drivers/virtualbox/virtualbox_driver.rb
264
+ - lib/deltacloud/hardware_profile.rb
265
+ - lib/deltacloud/helpers/application_helper.rb
266
+ - lib/deltacloud/helpers/conversion_helper.rb
267
+ - lib/deltacloud/helpers/hardware_profiles_helper.rb
268
+ - lib/deltacloud/helpers.rb
269
+ - lib/deltacloud/method_serializer.rb
270
+ - lib/deltacloud/models/base_model.rb
271
+ - lib/deltacloud/models/image.rb
272
+ - lib/deltacloud/models/instance.rb
273
+ - lib/deltacloud/models/instance_profile.rb
274
+ - lib/deltacloud/models/key.rb
275
+ - lib/deltacloud/models/realm.rb
276
+ - lib/deltacloud/models/storage_snapshot.rb
277
+ - lib/deltacloud/models/storage_volume.rb
278
+ - lib/deltacloud/state_machine.rb
279
+ - lib/deltacloud/validation.rb
280
+ - lib/drivers.rb
281
+ - lib/sinatra/accept_media_types.rb
282
+ - lib/sinatra/lazy_auth.rb
283
+ - lib/sinatra/rabbit.rb
284
+ - lib/sinatra/respond_to.rb
285
+ - lib/sinatra/static_assets.rb
286
+ - lib/sinatra/url_for.rb
287
+ - lib/deltacloud/drivers/mock/data/images/img1.yml
288
+ - lib/deltacloud/drivers/mock/data/images/img2.yml
289
+ - lib/deltacloud/drivers/mock/data/images/img3.yml
290
+ - lib/deltacloud/drivers/mock/data/instances/inst0.yml
291
+ - lib/deltacloud/drivers/mock/data/instances/inst1.yml
292
+ - lib/deltacloud/drivers/mock/data/instances/inst2.yml
293
+ - lib/deltacloud/drivers/mock/data/storage_snapshots/snap1.yml
294
+ - lib/deltacloud/drivers/mock/data/storage_snapshots/snap2.yml
295
+ - lib/deltacloud/drivers/mock/data/storage_snapshots/snap3.yml
296
+ - lib/deltacloud/drivers/mock/data/storage_volumes/vol1.yml
297
+ - lib/deltacloud/drivers/mock/data/storage_volumes/vol2.yml
298
+ - lib/deltacloud/drivers/mock/data/storage_volumes/vol3.yml
299
+ - views/accounts/index.html.haml
300
+ - views/accounts/show.html.haml
301
+ - views/api/show.html.haml
302
+ - views/api/show.xml.haml
303
+ - views/docs/collection.html.haml
304
+ - views/docs/collection.xml.haml
305
+ - views/docs/index.html.haml
306
+ - views/docs/index.xml.haml
307
+ - views/docs/operation.html.haml
308
+ - views/docs/operation.xml.haml
309
+ - views/errors/auth_exception.html.haml
310
+ - views/errors/auth_exception.xml.haml
311
+ - views/errors/backend_error.html.haml
312
+ - views/errors/backend_error.xml.haml
313
+ - views/errors/not_found.html.haml
314
+ - views/errors/not_found.xml.haml
315
+ - views/errors/validation_failure.html.haml
316
+ - views/errors/validation_failure.xml.haml
317
+ - views/hardware_profiles/index.html.haml
318
+ - views/hardware_profiles/index.xml.haml
319
+ - views/hardware_profiles/show.html.haml
320
+ - views/hardware_profiles/show.xml.haml
321
+ - views/images/index.html.haml
322
+ - views/images/index.xml.haml
323
+ - views/images/show.html.haml
324
+ - views/images/show.xml.haml
325
+ - views/instance_states/show.html.haml
326
+ - views/instance_states/show.xml.haml
327
+ - views/instances/index.html.haml
328
+ - views/instances/index.xml.haml
329
+ - views/instances/new.html.haml
330
+ - views/instances/show.html.haml
331
+ - views/instances/show.xml.haml
332
+ - views/keys/index.html.haml
333
+ - views/keys/index.xml.haml
334
+ - views/keys/new.html.haml
335
+ - views/keys/show.html.haml
336
+ - views/keys/show.xml.haml
337
+ - views/layout.html.haml
338
+ - views/realms/index.html.haml
339
+ - views/realms/index.xml.haml
340
+ - views/realms/show.html.haml
341
+ - views/realms/show.xml.haml
342
+ - views/root/index.html.haml
343
+ - views/storage_snapshots/index.html.haml
344
+ - views/storage_snapshots/index.xml.haml
345
+ - views/storage_snapshots/show.html.haml
346
+ - views/storage_snapshots/show.xml.haml
347
+ - views/storage_volumes/index.html.haml
348
+ - views/storage_volumes/index.xml.haml
349
+ - views/storage_volumes/show.html.haml
350
+ - views/storage_volumes/show.xml.haml
351
+ - views/instance_states/show.gv.erb
352
+ - public/favicon.ico
353
+ - public/images/grid.png
354
+ - public/images/logo-wide.png
355
+ - public/images/rails.png
356
+ - public/images/topbar-bg.png
357
+ - public/javascripts/application.js
358
+ - public/javascripts/jquery-1.4.2.min.js
359
+ - public/stylesheets/compiled/application.css
360
+ - public/stylesheets/compiled/ie.css
361
+ - public/stylesheets/compiled/print.css
362
+ - public/stylesheets/compiled/screen.css
363
+ - bin/deltacloudd
364
+ - COPYING
365
+ - tests/api_test.rb
366
+ - tests/hardware_profiles_test.rb
367
+ - tests/images_test.rb
368
+ - tests/instance_states_test.rb
369
+ - tests/instances_test.rb
370
+ - tests/realms_test.rb
371
+ - tests/url_for_test.rb
337
372
  has_rdoc: true
338
373
  homepage: http://www.deltacloud.org
339
374
  licenses: []
@@ -342,35 +377,39 @@ post_install_message:
342
377
  rdoc_options: []
343
378
 
344
379
  require_paths:
345
- - lib
380
+ - lib
346
381
  required_ruby_version: !ruby/object:Gem::Requirement
382
+ none: false
347
383
  requirements:
348
- - - ">="
349
- - !ruby/object:Gem::Version
350
- segments:
351
- - 1
352
- - 8
353
- - 1
354
- version: 1.8.1
384
+ - - ">="
385
+ - !ruby/object:Gem::Version
386
+ hash: 53
387
+ segments:
388
+ - 1
389
+ - 8
390
+ - 1
391
+ version: 1.8.1
355
392
  required_rubygems_version: !ruby/object:Gem::Requirement
393
+ none: false
356
394
  requirements:
357
- - - ">="
358
- - !ruby/object:Gem::Version
359
- segments:
360
- - 0
361
- version: "0"
395
+ - - ">="
396
+ - !ruby/object:Gem::Version
397
+ hash: 3
398
+ segments:
399
+ - 0
400
+ version: "0"
362
401
  requirements: []
363
402
 
364
403
  rubyforge_project:
365
- rubygems_version: 1.3.6
404
+ rubygems_version: 1.3.7
366
405
  signing_key:
367
406
  specification_version: 3
368
407
  summary: Deltacloud REST API
369
408
  test_files:
370
- - tests/api_test.rb
371
- - tests/hardware_profiles_test.rb
372
- - tests/images_test.rb
373
- - tests/instance_states_test.rb
374
- - tests/instances_test.rb
375
- - tests/realms_test.rb
376
- - tests/url_for_test.rb
409
+ - tests/api_test.rb
410
+ - tests/hardware_profiles_test.rb
411
+ - tests/images_test.rb
412
+ - tests/instance_states_test.rb
413
+ - tests/instances_test.rb
414
+ - tests/realms_test.rb
415
+ - tests/url_for_test.rb