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

Jan Provaznik jprovazn at redhat.com
Mon Feb 27 09:34:38 UTC 2012


On 02/24/2012 10:46 PM, Jim Meyering wrote:
> 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|

Hi Jim, this is nice tip.

Cucumber pregenerates current version (Given /^([^"]*)"" ...$/ do 
|arg1|) and prints it on stderr when it finds a test with missing step 
definition - so a user can just copy&paste this into step definition 
file. So this improvement could be ideally done on upper (cucumber) level.

Jan




More information about the aeolus-devel mailing list