These turned up when I was trying to write a new test, but they surely would cause issues once we were using these classes anyway. STATE_FIXME is just a temporary value until actual is determined.
Signed-off-by: Jason Guiditta jason.guiditta@gmail.com --- src/app/models/cloud_account.rb | 4 ++-- src/app/models/instance.rb | 1 + src/app/models/instance_task.rb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/models/cloud_account.rb b/src/app/models/cloud_account.rb index 29b9ccf..c69c863 100644 --- a/src/app/models/cloud_account.rb +++ b/src/app/models/cloud_account.rb @@ -8,9 +8,9 @@ class CloudAccount < ActiveRecord::Base # has_many :portal_users
- validates_presence of :provider_id + validates_presence_of :provider_id
validates_presence_of :username - validates_uniqueness_of :username, :scope => provider_id + validates_uniqueness_of :username, :scope => :provider_id validates_presence_of :password end diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb index 7d2cb9b..bc2acb7 100644 --- a/src/app/models/instance.rb +++ b/src/app/models/instance.rb @@ -22,5 +22,6 @@ class Instance < ActiveRecord::Base STATE_PENDING = "pending" STATE_RUNNING = "running" STATE_TERMINATED = "terminated" + STATE_FIXME = "tbd" # what about newly created instances? end diff --git a/src/app/models/instance_task.rb b/src/app/models/instance_task.rb index 66e671c..99b164b 100644 --- a/src/app/models/instance_task.rb +++ b/src/app/models/instance_task.rb @@ -68,7 +68,7 @@ class InstanceTask < Task :running => Instance::STATE_FIXME, :success => Instance::STATE_FIXME, :failure => Instance::STATE_TERMINATED, - :privilege => [Privilege::VM_MODIFY]} } + :privilege => [Privilege::MODIFY]} }
def task_obj if self.instance
deltacloud-devel@lists.fedorahosted.org