1
0
Fork 0
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:
Nick Osborn 2013-09-05 23:52:26 +01:00
parent 2eb2e983f8
commit a081fd2758
2 changed files with 31 additions and 0 deletions

View file

@ -88,6 +88,7 @@ require 'fog/bin/serverlove'
require 'fog/bin/stormondemand' require 'fog/bin/stormondemand'
require 'fog/bin/terremark' require 'fog/bin/terremark'
require 'fog/bin/vcloud' require 'fog/bin/vcloud'
require 'fog/bin/vcloud_director'
require 'fog/bin/vmfusion' require 'fog/bin/vmfusion'
require 'fog/bin/vsphere' require 'fog/bin/vsphere'
require 'fog/bin/voxel' require 'fog/bin/voxel'

View 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