You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by fv...@redhat.com on 2011/08/23 18:45:42 UTC
[PATCH core] Add strip method to avoid unuseful spaces in state message
From: Francesco Vollero <fv...@redhat.com>
Signed-off-by: Francesco Vollero <fv...@redhat.com>
---
.../lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 8123c8e..d402bc8 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -266,7 +266,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
unless state.respond_to?(:upcase)
raise "State #{state.inspect} is not a string"
end
- case state.upcase
+ case state.strip.upcase
when 'WAIT_FOR_LAUNCH', 'REBOOT_IN_PROGRESS', 'SAVING_STATE',
'RESTORING_STATE', 'POWERING_DOWN', 'POWERING_UP', 'IMAGE_LOCKED', 'SAVING_STATE' then
'PENDING'
--
1.7.4.4
Re: [PATCH core] Add strip method to avoid unuseful spaces in state message
Posted by Michal Fojtik <mf...@redhat.com>.
On Aug 23, 2011, at 6:45 PM, fvollero@redhat.com wrote:
ACK.
-- Michal
> From: Francesco Vollero <fv...@redhat.com>
>
>
> Signed-off-by: Francesco Vollero <fv...@redhat.com>
> ---
> .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
> index 8123c8e..d402bc8 100644
> --- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
> +++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
> @@ -266,7 +266,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
> unless state.respond_to?(:upcase)
> raise "State #{state.inspect} is not a string"
> end
> - case state.upcase
> + case state.strip.upcase
> when 'WAIT_FOR_LAUNCH', 'REBOOT_IN_PROGRESS', 'SAVING_STATE',
> 'RESTORING_STATE', 'POWERING_DOWN', 'POWERING_UP', 'IMAGE_LOCKED', 'SAVING_STATE' then
> 'PENDING'
> --
> 1.7.4.4
>
------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org
Re: [PATCH core] Add strip method to avoid unuseful spaces in state
message
Posted by David Lutterkort <lu...@redhat.com>.
On Tue, 2011-08-23 at 18:45 +0200, fvollero@redhat.com wrote:
> From: Francesco Vollero <fv...@redhat.com>
>
>
> Signed-off-by: Francesco Vollero <fv...@redhat.com>
ACK. Pushed