From 9a4046ff2171704bcca75111dec364535ed403ec Mon Sep 17 00:00:00 2001 From: Rupak Ganguly Date: Fri, 30 Aug 2013 16:00:11 -0400 Subject: [PATCH] [hp|dns,lb] Add DNS and LB provider registration. --- lib/fog/bin/hp.rb | 14 +++++++++----- lib/fog/hp.rb | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/fog/bin/hp.rb b/lib/fog/bin/hp.rb index 7ded301cd..0250fe5b6 100644 --- a/lib/fog/bin/hp.rb +++ b/lib/fog/bin/hp.rb @@ -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 diff --git a/lib/fog/hp.rb b/lib/fog/hp.rb index e47ad2754..29e3a279e 100644 --- a/lib/fog/hp.rb +++ b/lib/fog/hp.rb @@ -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 = {})