-
Notifications
You must be signed in to change notification settings - Fork 118
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
Added Quota calculations for reconfigure resize disks #436
Added Quota calculations for reconfigure resize disks #436
Conversation
d3ba760
to
876dd4f
Compare
@tinaafitz Please Review |
876dd4f
to
23b9a5f
Compare
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 Looks good.
@mkanoor Please review.
@@ -146,6 +146,11 @@ def vmdb_object(model, id) | |||
$evm.vmdb(model, id.to_i) if model && id | |||
end | |||
|
|||
def get_disk_size(disk_name) | |||
mydisk = $evm.vmdb('disk').find_by(:filename => disk_name) |
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
Should we log disk_names that are not found and raise an error?
Also add a test case where the disk_name doesn't exist.
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 changes as requested.
23b9a5f
to
7513329
Compare
7513329
to
d202764
Compare
@tinaafitz please review |
d202764
to
ab8585d
Compare
@@ -146,6 +146,12 @@ def vmdb_object(model, id) | |||
$evm.vmdb(model, id.to_i) if model && id | |||
end | |||
|
|||
def get_disk_size(disk_name) | |||
mydisk = $evm.vmdb('disk').find_by(:filename => disk_name) | |||
raise "ERROR - Disk_name not found for Reconfiguration" if mydisk.nil? |
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 Should we include the disk name when we raise the exception
raise "ERROR - #{disk_name} not found for reconfiguration" if mydisk.nil?
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 Included the disk name when we raise the exception, Please review
ab8585d
to
2369791
Compare
Added test for disk_resize Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1533263 Made 2 changes as requested Added log_and_raise for disk_names that are not found. Added a test case where the disk_name doesn't exist Modified error text to be generic Removed embedded method Included the disk name when we raise the exception
2369791
to
0031d91
Compare
Checked commit billfitzgerald0120@0031d91 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Added test for disk_resize
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1533263
@miq-bot add_reviewer @tinaafitz
@miq-bot add_label enhancement