deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 05/16] Core: Added 'provider_name' method to retrieve current API provider value
Date Thu, 19 Jul 2012 13:02:38 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/helpers/driver_helper.rb |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/lib/deltacloud/helpers/driver_helper.rb b/server/lib/deltacloud/helpers/driver_helper.rb
index 8ae61c0..5c5e7c6 100644
--- a/server/lib/deltacloud/helpers/driver_helper.rb
+++ b/server/lib/deltacloud/helpers/driver_helper.rb
@@ -25,6 +25,10 @@ module Deltacloud::Helpers
       Thread.current[:driver] ||= ENV['API_DRIVER']
     end
 
+    def provider_name
+      Thread.current[:provider] || ENV['API_PROVIDER']
+    end
+
     def driver_class_name
       driver_name.camelize
     end
-- 
1.7.10.2


Mime
View raw message