deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 4/4] rhevm driver: remove provider_uri
Date Wed, 08 Jun 2011 15:32:50 GMT
From: David Lutterkort <lutter@redhat.com>

We don't want people to edit drivers.yaml

Signed-off-by: David Lutterkort <lutter@redhat.com>
---
 server/config/drivers.yaml                         |    3 ---
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |   19 +------------------
 2 files changed, 1 insertions(+), 21 deletions(-)

diff --git a/server/config/drivers.yaml b/server/config/drivers.yaml
index 20b2857..544771a 100644
--- a/server/config/drivers.yaml
+++ b/server/config/drivers.yaml
@@ -5,9 +5,6 @@
   :name: Mock
 :rhevm:
   :name: RHEVM
-  :entrypoints:
-    default:
-      default: "https://rhev-m.localhost:8443/rhevm-api-powershell"
 :rimuhosting:
   :name: RimuHosting
 :opennebula:
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index d160240..d1a0f8f 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -60,23 +60,6 @@ class RHEVMDriver < Deltacloud::BaseDriver
     architecture 'x86_64'
   end
 
-  # Instead of setting a URL for RHEV provider
-  # do it here in driver, so it can be altered by HTTP headers
-  #
-  def provider_uri=(uri)
-    @RHEVM_URI = uri
-  end
-
-  # Default Provider URI.
-  #
-  # IMPORTANT:
-  # This URI can be overridden using shell variable API_PROVIDER
-  # or setting provider using HTTP header X-Deltacloud-Provider to URL.
-  #
-  def provider_uri
-    Deltacloud::Drivers::driver_config[:rhevm][:entrypoints]['default']['default']
-  end
-
   define_instance_states do
     start.to( :pending )          .automatically
     pending.to( :running )        .automatically
@@ -202,7 +185,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
   private
 
   def new_client(credentials)
-    url = api_provider || provider_uri
+    url = api_provider
     safely do
       ::RHEVM::Client.new(credentials.user, credentials.password, url)
     end
-- 
1.7.4.4


Mime
View raw message