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

[hp|dns,lb] Add DNS and LB provider registration.

This commit is contained in:
Rupak Ganguly 2013-08-30 16:00:11 -04:00
parent deccc126ff
commit 9a4046ff21
2 changed files with 11 additions and 6 deletions

View file

@ -3,8 +3,6 @@ class HP < Fog::Bin
def class_for(key)
case key
when :lb
Fog::HP::LB
when :block_storage
Fog::HP::BlockStorage
when :block_storage_v2
@ -13,6 +11,10 @@ class HP < Fog::Bin
Fog::CDN::HP
when :compute
Fog::Compute::HP
when :dns
Fog::HP::DNS
when :lb
Fog::HP::LB
when :network
Fog::HP::Network
when :storage
@ -25,10 +27,8 @@ class HP < Fog::Bin
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :lb
Fog::HP::LB.new
when :block_storage
Fog::Logger.deprecation "First Gen HP Cloud Block Storage service will be soon deprecated. Please use `Fog::HP::BlockStorageV2` provider to use Next Gen HP Cloud Block Storage service."
Fog::Logger.deprecation "HP Cloud Block Storage V1 service will be soon deprecated. Please use `Fog::HP::BlockStorageV2` provider to use latest HP Cloud Block Storage service."
Fog::HP::BlockStorage.new
when :block_storage_v2
Fog::HP::BlockStorageV2.new
@ -38,6 +38,10 @@ class HP < Fog::Bin
when :compute
Fog::Logger.warning("HP[:compute] is deprecated, use Compute[:hp] instead")
Fog::Compute.new(:provider => 'HP')
when :dns
Fog::HP::DNS.new
when :lb
Fog::HP::LB.new
when :network
Fog::HP::Network.new
when :storage

View file

@ -60,9 +60,10 @@ module Fog
service(:block_storage_v2, 'hp/block_storage_v2', 'BlockStorageV2')
service(:cdn, 'hp/cdn', 'CDN')
service(:compute, 'hp/compute', 'Compute')
service(:dns, 'hp/lb', 'DNS')
service(:lb, 'hp/lb', 'LB')
service(:network, 'hp/network', 'Network')
service(:storage, 'hp/storage', 'Storage')
service(:lb, 'hp/lb', 'LB')
# legacy swauth 1.0/1.1 style authentication
def self.authenticate_v1(options, connection_options = {})