-
Notifications
You must be signed in to change notification settings - Fork 897
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
Automate | Consolidated Quota | Fix cloud requested values. #5267
Conversation
1117292
to
2193200
Compare
end | ||
|
||
def cloud_vm_memory(vmdb_object_find_by, dialog_array) | ||
flavor = vmdb_object(:flavor, vmdb_object_find_by) |
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.
@tinaafitz
Can we get the flavor object just once for the cloud and pass it around
b89859a
to
cf070c2
Compare
@@ -8,9 +8,13 @@ def request_info | |||
$evm.log(:info, "Request: #{@miq_request.description} id: #{@miq_request.id} ") | |||
end | |||
|
|||
def cloud?(prov_type) | |||
prov_type == "amazon" || prov_type == "openstack" ? true : false |
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.
@tinaafitz This might be better
%w(amazon openstack).include?(prov_type)
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
Change made.
cf070c2
to
e235e81
Compare
👍 |
57a5df4
to
c219422
Compare
end | ||
end | ||
options_array | ||
end | ||
|
||
def service_prov_option_value(prov_option, resource, options_array = []) | ||
args_hash = {:prov_option => prov_option, | ||
:array => options_array, |
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.
@tinaafitz This should be more descriptive than just array
. Seems like it should at least be options_array
based on the other key names here.
c219422
to
4b953db
Compare
@gmcculloug |
set_requested_value(prov_option, resource.get_option(prov_option), | ||
resource.get_option(:instance_type), options_array) | ||
def request_object?(object) | ||
return false if object.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.
@tinaafitz This check is not needed since object.respond_to?('get_option')
would already return false
if object is nil.
4b953db
to
449991e
Compare
@gmcculloug |
Checked commit tinaafitz@449991e with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0 |
👍 |
Automate | Consolidated Quota | Fix cloud requested values.
Fix cloud requested values and fixed spec test to reflect changes. ManageIQ#5267 https://bugzilla.redhat.com/show_bug.cgi?id=1254882 Clean cherry-pick. Also resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1248747 https://bugzilla.redhat.com/show_bug.cgi?id=1254211 https://bugzilla.redhat.com/show_bug.cgi?id=1126934 https://bugzilla.redhat.com/show_bug.cgi?id=1273919 https://bugzilla.redhat.com/show_bug.cgi?id=1263592 See merge request !481
Fixed VM quota issue where cloud requested values were zero.
https://bugzilla.redhat.com/show_bug.cgi?id=1254882