You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2011/11/17 10:01:23 UTC

[PATCH] Fix filtering of realms for sbc driver

From: marios <ma...@redhat.com>

https://issues.apache.org/jira/browse/DTACLOUD-106

Signed-off-by: marios <ma...@redhat.com>
---
 server/lib/deltacloud/drivers/sbc/sbc_driver.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/drivers/sbc/sbc_driver.rb b/server/lib/deltacloud/drivers/sbc/sbc_driver.rb
index 90f566d..c7b109e 100644
--- a/server/lib/deltacloud/drivers/sbc/sbc_driver.rb
+++ b/server/lib/deltacloud/drivers/sbc/sbc_driver.rb
@@ -51,7 +51,8 @@ class SBCDriver < Deltacloud::BaseDriver
   def realms(credentials, opts={})
     sbc_client = new_client(credentials)
     doc = sbc_client.list_locations
-    doc.xpath('ns2:DescribeLocationsResponse/Location').map { |loc| convert_location(loc) }
+    realms = doc.xpath('ns2:DescribeLocationsResponse/Location').map { |loc| convert_location(loc) }
+    realms = filter_on(realms, :id, opts)
   end
 
   #
-- 
1.7.6.4


Re: [PATCH] Fix filtering of realms for sbc driver

Posted by "marios@redhat.com" <ma...@redhat.com>.
pushed - verified by original reporter Andrea Decorte
https://issues.apache.org/jira/browse/DTACLOUD-106

On 17/11/11 11:01, marios@redhat.com wrote:
> From: marios <ma...@redhat.com>
> 
> https://issues.apache.org/jira/browse/DTACLOUD-106
> 
> Signed-off-by: marios <ma...@redhat.com>
> ---
>  server/lib/deltacloud/drivers/sbc/sbc_driver.rb |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/server/lib/deltacloud/drivers/sbc/sbc_driver.rb b/server/lib/deltacloud/drivers/sbc/sbc_driver.rb
> index 90f566d..c7b109e 100644
> --- a/server/lib/deltacloud/drivers/sbc/sbc_driver.rb
> +++ b/server/lib/deltacloud/drivers/sbc/sbc_driver.rb
> @@ -51,7 +51,8 @@ class SBCDriver < Deltacloud::BaseDriver
>    def realms(credentials, opts={})
>      sbc_client = new_client(credentials)
>      doc = sbc_client.list_locations
> -    doc.xpath('ns2:DescribeLocationsResponse/Location').map { |loc| convert_location(loc) }
> +    realms = doc.xpath('ns2:DescribeLocationsResponse/Location').map { |loc| convert_location(loc) }
> +    realms = filter_on(realms, :id, opts)
>    end
>  
>    #