Skip to content

Commit

Permalink
Merge pull request ManageIQ#16626 from tinaafitz/add_provision_quota_…
Browse files Browse the repository at this point in the history
…mixin

Add quota mixin for vm_reconfigure_request and vm_migrate_request.
  • Loading branch information
gmcculloug authored Dec 14, 2017
2 parents 0214d22 + 107f2ef commit 9faa390
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/vm_cloud_reconfigure_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class VmCloudReconfigureRequest < MiqRequest
validates :request_state, :inclusion => { :in => %w(pending finished) + ACTIVE_STATES,
:message => "should be pending, #{ACTIVE_STATES.join(", ")} or finished"}
validate :must_have_user
include MiqProvisionQuotaMixin

def vms
Vm.find(options[:src_ids])
Expand Down
1 change: 1 addition & 0 deletions app/models/vm_migrate_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class VmMigrateRequest < MiqRequest

validates_inclusion_of :request_state, :in => %w( pending finished ) + ACTIVE_STATES, :message => "should be pending, #{ACTIVE_STATES.join(", ")} or finished"
validate :must_have_user
include MiqProvisionQuotaMixin

def my_zone
vm = Vm.find_by(:id => options[:src_ids])
Expand Down
1 change: 1 addition & 0 deletions app/models/vm_reconfigure_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class VmReconfigureRequest < MiqRequest

validates_inclusion_of :request_state, :in => %w( pending finished ) + ACTIVE_STATES, :message => "should be pending, #{ACTIVE_STATES.join(", ")} or finished"
validate :must_have_user
include MiqProvisionQuotaMixin

def self.request_limits(options)
# Memory values are in megabytes
Expand Down

0 comments on commit 9faa390

Please sign in to comment.