mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[vcloud_director] make available to Fog::Bin
This commit is contained in:
parent
2eb2e983f8
commit
a081fd2758
2 changed files with 31 additions and 0 deletions
|
@ -88,6 +88,7 @@ require 'fog/bin/serverlove'
|
|||
require 'fog/bin/stormondemand'
|
||||
require 'fog/bin/terremark'
|
||||
require 'fog/bin/vcloud'
|
||||
require 'fog/bin/vcloud_director'
|
||||
require 'fog/bin/vmfusion'
|
||||
require 'fog/bin/vsphere'
|
||||
require 'fog/bin/voxel'
|
||||
|
|
30
lib/fog/bin/vcloud_director.rb
Normal file
30
lib/fog/bin/vcloud_director.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
class VcloudDirector < Fog::Bin
|
||||
class << self
|
||||
|
||||
def class_for(key)
|
||||
case key
|
||||
when :compute
|
||||
Fog::Compute::VcloudDirector
|
||||
else
|
||||
raise ArgumentError, "Unrecognized service: #{key}"
|
||||
end
|
||||
end
|
||||
|
||||
def [](service)
|
||||
@@connections ||= Hash.new do |hash, key|
|
||||
hash[key] = case key
|
||||
when :compute
|
||||
Fog::Compute.new(:provider => 'VcloudDirector')
|
||||
else
|
||||
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
||||
end
|
||||
end
|
||||
@@connections[service]
|
||||
end
|
||||
|
||||
def services
|
||||
Fog::VcloudDirector.services
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue