1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Openstack: fix bin/openstack.rb errors.

Updates Fog::Bin for OpenStack to support :image.

This patch also fixes a bunch of copy/paste errors in the
deprecated [] method.
This commit is contained in:
Dan Prince 2013-02-18 12:12:50 -05:00
parent 1029031e77
commit 9ee2c6ea7b

View file

@ -7,6 +7,8 @@ class OpenStack < Fog::Bin
Fog::Compute::OpenStack Fog::Compute::OpenStack
when :identity when :identity
Fog::Identity::OpenStack Fog::Identity::OpenStack
when :image
Fog::Image::OpenStack
when :network when :network
Fog::Network::OpenStack Fog::Network::OpenStack
when :storage when :storage
@ -23,14 +25,17 @@ class OpenStack < Fog::Bin
Fog::Logger.warning("OpenStack[:compute] is not recommended, use Compute[:openstack] for portability") Fog::Logger.warning("OpenStack[:compute] is not recommended, use Compute[:openstack] for portability")
Fog::Compute.new(:provider => 'OpenStack') Fog::Compute.new(:provider => 'OpenStack')
when :identity when :identity
Fog::Logger.warning("OpenStack[:identity] is not recommended, use Compute[:openstack] for portability") Fog::Logger.warning("OpenStack[:identity] is not recommended, use Identity[:openstack] for portability")
Fog::Compute.new(:provider => 'OpenStack') Fog::Identity.new(:provider => 'OpenStack')
when :image
Fog::Logger.warning("OpenStack[:image] is not recommended, use Image[:openstack] for portability")
Fog::Image.new(:provider => 'OpenStack')
when :network when :network
Fog::Logger.warning("OpenStack[:network] is not recommended, use Network[:openstack] for portability") Fog::Logger.warning("OpenStack[:network] is not recommended, use Network[:openstack] for portability")
Fog::Network.new(:provider => 'OpenStack') Fog::Network.new(:provider => 'OpenStack')
when :storage when :storage
Fog::Logger.warning("OpenStack[:storage] is not recommended, use Storage[:openstack] for portability") Fog::Logger.warning("OpenStack[:storage] is not recommended, use Storage[:openstack] for portability")
Fog::Network.new(:provider => 'OpenStack') Fog::Storage.new(:provider => 'OpenStack')
else else
raise ArgumentError, "Unrecognized service: #{key.inspect}" raise ArgumentError, "Unrecognized service: #{key.inspect}"
end end