You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by di...@fast.au.fujitsu.com on 2013/04/23 23:53:51 UTC

[PATCH] FGCP: change 2nd param to start/stop_system from opts to id

From: Dies Koper <di...@fast.au.fujitsu.com>

---
 .../lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb  | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
index 0d21acb..e57bb2d 100644
--- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
+++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
@@ -99,12 +99,10 @@ module Deltacloud::Drivers::Fgcp
       delete_firewall(credentials, :id => "#{id}-S-0001")
     end
 
-    def start_system(credentials, opts={})
+    def start_system(credentials, id)
       safely do
         client = new_client(credentials)
-        context = opts[:env]
-        vsys_id = opts[:id]
-        xml = client.list_vservers(vsys_id)['vservers']
+        xml = client.list_vservers(id)['vservers']
         return unless xml and xml[0]['vserver']
 
         # FIXME: maybe this should be done in a separate thread (in case of gigantic number of servers)
@@ -119,12 +117,10 @@ module Deltacloud::Drivers::Fgcp
       end
     end
 
-    def stop_system(credentials, opts={})
+    def stop_system(credentials, id)
       safely do
         client = new_client(credentials)
-        context = opts[:env]
-        vsys_id = opts[:id]
-        xml = client.list_vservers(vsys_id)['vservers']
+        xml = client.list_vservers(id)['vservers']
         return unless xml and xml[0]['vserver']
 
         # FIXME: maybe this should be done in a separate thread (in case of gigantic number of servers)
-- 
1.8.0.msysgit.0



Re: [PATCH] FGCP: change 2nd param to start/stop_system from opts to id

Posted by "marios@redhat.com" <ma...@redhat.com>.
ACK

On 24/04/13 00:53, diesk@fast.au.fujitsu.com wrote:
> From: Dies Koper <di...@fast.au.fujitsu.com>
> 
> ---
>  .../lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb  | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
> index 0d21acb..e57bb2d 100644
> --- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
> +++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
> @@ -99,12 +99,10 @@ module Deltacloud::Drivers::Fgcp
>        delete_firewall(credentials, :id => "#{id}-S-0001")
>      end
>  
> -    def start_system(credentials, opts={})
> +    def start_system(credentials, id)
>        safely do
>          client = new_client(credentials)
> -        context = opts[:env]
> -        vsys_id = opts[:id]
> -        xml = client.list_vservers(vsys_id)['vservers']
> +        xml = client.list_vservers(id)['vservers']
>          return unless xml and xml[0]['vserver']
>  
>          # FIXME: maybe this should be done in a separate thread (in case of gigantic number of servers)
> @@ -119,12 +117,10 @@ module Deltacloud::Drivers::Fgcp
>        end
>      end
>  
> -    def stop_system(credentials, opts={})
> +    def stop_system(credentials, id)
>        safely do
>          client = new_client(credentials)
> -        context = opts[:env]
> -        vsys_id = opts[:id]
> -        xml = client.list_vservers(vsys_id)['vservers']
> +        xml = client.list_vservers(id)['vservers']
>          return unless xml and xml[0]['vserver']
>  
>          # FIXME: maybe this should be done in a separate thread (in case of gigantic number of servers)
>