Skip to content
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

Merged
merged 1 commit into from
Nov 16, 2015

Conversation

tinaafitz
Copy link
Member

Fixed VM quota issue where cloud requested values were zero.

https://bugzilla.redhat.com/show_bug.cgi?id=1254882

end

def cloud_vm_memory(vmdb_object_find_by, dialog_array)
flavor = vmdb_object(:flavor, vmdb_object_find_by)
Copy link
Contributor

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

@tinaafitz tinaafitz force-pushed the quota_fixes branch 3 times, most recently from b89859a to cf070c2 Compare November 10, 2015 17:15
@@ -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
Copy link
Contributor

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)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkanoor
Change made.

@mkanoor
Copy link
Contributor

mkanoor commented Nov 10, 2015

👍

@tinaafitz tinaafitz force-pushed the quota_fixes branch 3 times, most recently from 57a5df4 to c219422 Compare November 13, 2015 14:42
end
end
options_array
end

def service_prov_option_value(prov_option, resource, options_array = [])
args_hash = {:prov_option => prov_option,
:array => options_array,
Copy link
Member

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.

@tinaafitz
Copy link
Member Author

@gmcculloug
Changes made.

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?
Copy link
Member

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.

@tinaafitz
Copy link
Member Author

@gmcculloug
Changes made.

@miq-bot
Copy link
Member

miq-bot commented Nov 16, 2015

Checked commit tinaafitz@449991e with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0
2 files checked, 0 offenses detected
Everything looks good. 🍰

@gmcculloug
Copy link
Member

👍

gmcculloug added a commit that referenced this pull request Nov 16, 2015
Automate | Consolidated Quota | Fix cloud requested values.
@gmcculloug gmcculloug merged commit 0d2b4e1 into ManageIQ:master Nov 16, 2015
@gmcculloug gmcculloug added this to the Sprint 32 Ending Nov 16, 2015 milestone Nov 16, 2015
@tinaafitz tinaafitz deleted the quota_fixes branch November 17, 2015 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants