[PATCH Conductor] Fix for https://bugzilla.redhat.com/show_bug.cgi?id=768113
gblomqui at redhat.com
gblomqui at redhat.com
Thu Dec 15 19:38:47 UTC 2011
From: Greg Blomquist <gblomqui at 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
--
1.7.7.4
More information about the aeolus-devel
mailing list