[PATCH conductor] BZ 788558 - allow terminate inaccessible instances on 'stop' action

Jim Meyering jim at meyering.net
Fri Feb 24 21:46:00 UTC 2012


jprovazn at redhat.com wrote:
> From: Jan Provaznik <jprovazn at redhat.com>
>
> Theis patch allows locally stopping of instances or deployments if
> the instance's/deployment's provider is not accessible.
>
> It fixes a bug in passing user param to queue_action method, also simplifies
> used error messages - only (stop|reboot)_invalid_action can be raised.
>
> This patch doesn't cover deletion of deployments which are not accessible - this is difficult
> because there is a before_destroy hook on deployment which tries to destroy instances
> on provider side.
...

Hi Jan,

I noticed that these regexps can be simplified:

> diff --git a/src/features/step_definitions/deployment_steps.rb b/src/features/step_definitions/deployment_steps.rb
...
> +Given /^"([^"]*)" deployment's provider is not accessible$/ do |arg1|

Using non-greedy matching like this is equivalent, and more readable:

   Given /^"(.*?)" deployment's provider is not accessible$/ do |arg1|

...
> diff --git a/src/features/step_definitions/instance_steps.rb b/src/features/step_definitions/instance_steps.rb
...
> +Given /^"([^"]*)" instance's provider is not accessible$/ do |arg1|

   Given /^"(.*?)" instance's provider is not accessible$/ do |arg1|



More information about the aeolus-devel mailing list