On 12/15/2011 08:38 PM, gblomqui@redhat.com wrote:
From: Greg Blomquistgblomqui@redhat.com
Conductor should compare use the provider type and not the name of the provider account when determining the provider type. This allows a user to name the provider account whatever they want, and still filter on provider type when deleting a deployment.
https://bugzilla.redhat.com/show_bug.cgi?id=768113
src/app/models/instance.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb index fec47d1..5bba24e 100644 --- a/src/app/models/instance.rb +++ b/src/app/models/instance.rb @@ -483,7 +483,7 @@ class Instance< ActiveRecord::Base ]
def destroy_on_provider
- if (provider_account.label != "ec2" or provider_account.label != "mock") and state != STATE_CREATE_FAILED
- if (not ["ec2", "mock"].include? provider_account.provider.provider_type.deltacloud_driver) and state != STATE_CREATE_FAILED begin @task = self.queue_action(self.owner, 'destroy') unless @task
Good catch!
ACK