-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add quota checking for VMReconfigure tests. #56
Conversation
Add 3 tests to calculated_requested_spec.
@tinaafitz |
Changed bypass_quota to check_quota. Added a vendor method.
6e8bc51
to
0bf9bae
Compare
@miq-bot add_label bug, fine/yes |
@tinaafitz |
modified delete disk to handle 0 bytes |
@billfitzgerald0120 Looks good. |
end | ||
if args_hash[:resource].options[:disk_remove] | ||
args_hash[:resource].options[:disk_remove].each do |disk| | ||
$evm.log(:info, "Removing disk: #{disk.inspect}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@billfitzgerald0120
Can we move this line to line 163 and change the message to "Reconfigure Disk Removal #{disk.inspect}"
next unless disk_num | ||
disk_n_number = "disk_#{disk_num[1].succ}_size" | ||
disk_n_size = @vm.send(disk_n_number.to_s) | ||
$evm.log(:info, "Removing disk size: #{disk_n_size.to_s(:human_size)}") if disk_n_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@billfitzgerald0120
can use use next unless disk_n_size and change the log message to
$evm.log(:info, "Disk size: #{disk_n_size.to_s(:human_size)}")
if @reconfigure_request | ||
@check_quota = false # default, unless additional quota is requested | ||
vm_id = @miq_request.options[:src_ids] | ||
@vm = $evm.vmdb(:vm).find_by(:id => vm_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@billfitzgerald0120
Can we raise an error if the vm is not found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkanoor
Made requested changes.
Checked commits billfitzgerald0120/manageiq-content@259450b~...4ff65f9 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Add quota checking for VMReconfigure tests. (cherry picked from commit 321e043) https://bugzilla.redhat.com/show_bug.cgi?id=1459261
Fine backport details:
|
@billfitzgerald0120 This is causing Travis failure in Fine branch (https://travis-ci.org/ManageIQ/manageiq-content/builds/240035211) Can you please take a look?
|
Looks like we also need to back port ManageIQ/manageiq#14756. |
Yes, This is required. |
Thanks - backported ManageIQ/manageiq#14756, will re-run Travis. |
Updated tests to include quota checking for VMReconfigure.
https://bugzilla.redhat.com/show_bug.cgi?id=1393552