From 8f8b7066e166c54957b264458d5f77443ff557d9 Mon Sep 17 00:00:00 2001 From: d-m-u Date: Fri, 2 Feb 2018 13:05:51 -0500 Subject: [PATCH] Add to do_retire method --- app/models/vm_retire_request.rb | 4 ++-- app/models/vm_retire_task.rb | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/models/vm_retire_request.rb b/app/models/vm_retire_request.rb index 381191b925f4..180523623877 100644 --- a/app/models/vm_retire_request.rb +++ b/app/models/vm_retire_request.rb @@ -3,8 +3,8 @@ class VmRetireRequest < MiqRequest SOURCE_CLASS_NAME = 'Vm'.freeze ACTIVE_STATES = %w(retired) + base_class::ACTIVE_STATES - validates :request_state, :inclusion => { :in => %w(pending finished) + ACTIVE_STATES }, :message => "should be pending, #{ACTIVE_STATES.join(", ")} or finished" - validate :must_have_user + validates :request_state, :inclusion => { :in => %w(pending finished) + ACTIVE_STATES, :message => "should be pending, #{ACTIVE_STATES.join(", ")} or finished" } + validate :must_have_user def my_zone vm = Vm.find_by(:id => options[:src_ids]) diff --git a/app/models/vm_retire_task.rb b/app/models/vm_retire_task.rb index 662d3dedacad..5745033217bf 100644 --- a/app/models/vm_retire_task.rb +++ b/app/models/vm_retire_task.rb @@ -30,7 +30,4 @@ def self.get_description(req_obj) def after_request_task_create update_attribute(:description, get_description) end - - def do_request - end end