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/26 00:07:18 UTC
[PATCH] FGCP: advertise delete action when cimi system has no machines
From: Dies Koper <di...@fast.au.fujitsu.com>
---
server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 9ff83e3..20c9223 100644
--- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
+++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
@@ -77,7 +77,7 @@ module Deltacloud::Drivers::Fgcp
# check for special case: in destroy_system the FW is stopped before the system is deleted
system[:state] = 'DELETING' if ((vservers.nil? and system[:state] != 'CREATING') or system[:state] == 'STOPPED') and
['STOPPED', 'STOPPING'].include? client.get_efm_status("#{vsys_id}-S-0001")['efmStatus'][0]
- system[:operations] << { :href => context.system_url(vsys_id), :rel => "delete" } if system[:state] == 'STOPPED'
+ system[:operations] << { :href => context.system_url(vsys_id), :rel => "delete" } if system[:state] == 'STOPPED' or (vservers.nil? and system[:state] == 'MIXED')
end
systems
end
--
1.8.0.msysgit.0
Re: [PATCH] FGCP: advertise delete action when cimi system has no
machines
Posted by David Lutterkort <dl...@redhat.com>.
ACK
----- Original Message -----
> From: Dies Koper <di...@fast.au.fujitsu.com>
>
> ---
> server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 9ff83e3..20c9223 100644
> --- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
> +++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver_cimi_methods.rb
> @@ -77,7 +77,7 @@ module Deltacloud::Drivers::Fgcp
> # check for special case: in destroy_system the FW is stopped
> before the system is deleted
> system[:state] = 'DELETING' if ((vservers.nil? and system[:state]
> != 'CREATING') or system[:state] == 'STOPPED') and
> ['STOPPED', 'STOPPING'].include?
> client.get_efm_status("#{vsys_id}-S-0001")['efmStatus'][0]
> - system[:operations] << { :href => context.system_url(vsys_id),
> :rel => "delete" } if system[:state] == 'STOPPED'
> + system[:operations] << { :href => context.system_url(vsys_id),
> :rel => "delete" } if system[:state] == 'STOPPED' or (vservers.nil? and
> system[:state] == 'MIXED')
> end
> systems
> end
> --
> 1.8.0.msysgit.0
>
>
>