deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [4/5] git commit: Tidy up - move 'address' method (singular) to base driver
Date Wed, 26 Sep 2012 09:04:52 GMT
Tidy up - move 'address' method (singular) to base driver

Signed-off-by: marios <marios@redhat.com>


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/fe356563
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/fe356563
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/fe356563

Branch: refs/heads/master
Commit: fe356563e0e43588fb206b0571cdaf3d2017138c
Parents: e58f73e
Author: marios <marios@redhat.com>
Authored: Tue Sep 18 16:33:39 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Tue Sep 25 11:14:23 2012 +0300

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/aruba/aruba_driver.rb   |    5 -----
 server/lib/deltacloud/drivers/base_driver.rb       |    5 +++++
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb    |    4 ----
 server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb  |    4 ----
 4 files changed, 5 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fe356563/server/lib/deltacloud/drivers/aruba/aruba_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/aruba/aruba_driver.rb b/server/lib/deltacloud/drivers/aruba/aruba_driver.rb
index 12698db..adfa092 100644
--- a/server/lib/deltacloud/drivers/aruba/aruba_driver.rb
+++ b/server/lib/deltacloud/drivers/aruba/aruba_driver.rb
@@ -248,11 +248,6 @@ class ArubaDriver < Deltacloud::BaseDriver
     end
   end
 
-  def address(credentials, opts={})
-    addrs = addresses(credentials, opts)
-    filter_on(addrs, :id, opts).first
-  end
-
   def create_address(credentials, opts={})
     client = new_client(credentials)
     safely do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fe356563/server/lib/deltacloud/drivers/base_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/base_driver.rb b/server/lib/deltacloud/drivers/base_driver.rb
index 3b37721..068ff59 100644
--- a/server/lib/deltacloud/drivers/base_driver.rb
+++ b/server/lib/deltacloud/drivers/base_driver.rb
@@ -255,6 +255,11 @@ module Deltacloud
       firewalls(credentials, opts).first if has_capability?(:firewalls)
     end
 
+    def address(credentials, opts={})
+      addresses(credentials, opts).first if has_capability?(:addresses)
+    end
+
+
     MEMBER_SHOW_METHODS = [ :realm, :image, :instance, :storage_volume, :bucket, :blob,
                             :key, :firewall ] unless defined?(MEMBER_SHOW_METHODS)
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fe356563/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 265e231..c7bed05 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -697,10 +697,6 @@ module Deltacloud
           end
         end
 
-        def address(credentials, opts={})
-          addresses(credentials, :id => opts[:id]).first
-        end
-
         def create_address(credentials, opts={})
           ec2 = new_client(credentials)
           safely do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fe356563/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
index 18a1e76..666de0c 100644
--- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
+++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
@@ -678,10 +678,6 @@ class FgcpDriver < Deltacloud::BaseDriver
     addresses
   end
 
-  def address(credentials, opts={})
-    addresses(credentials, opts).first
-  end
-
   def create_address(credentials, opts={})
     safely do
       client = new_client(credentials)


Mime
View raw message