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

Added active provisions to quota count. #196

Merged

Conversation

billfitzgerald0120
Copy link
Contributor

@billfitzgerald0120 billfitzgerald0120 commented Oct 10, 2017

Updated method and test.
https://bugzilla.redhat.com/show_bug.cgi?id=1456819

Added log messages for counts and quota type.
Sample log messages below:

Quota Used: {:cpu=>373, :memory=>922780434432, :vms=>141, :storage=>9111136632832, :provisioned_storage=>10033917067264}

Quota active_provisions_by_tenant: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>44023414784, :provisioned_storage=>0}
Quota Totals: {:cpu=>374, :memory=>923854176256, :vms=>142, :storage=>9155160047616, :provisioned_storage=>10033917067264}

Quota Used: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>8589934592, :provisioned_storage=>9663676416}
Quota active_provisions_by_group: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>44023414784, :provisioned_storage=>0}
Quota Totals: {:cpu=>2, :memory=>2147483648, :vms=>2, :storage=>52613349376, :provisioned_storage=>9663676416}

Quota Used: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>8589934592, :provisioned_storage=>9663676416}
Quota active_provisions_by_owner: {:cpu=>0, :memory=>0, :vms=>0, :storage=>0, :provisioned_storage=>0}
Quota Totals: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>8589934592, :provisioned_storage=>9663676416}

@miq-bot add_label bug, fine/yes

@billfitzgerald0120
Copy link
Contributor Author

@miq-bot assign @gmcculloug

@gmcculloug
Copy link
Member

@billfitzgerald0120 Please review failing spec.

@billfitzgerald0120
Copy link
Contributor Author

Removed old spec which was causing travis to fail.

@billfitzgerald0120
Copy link
Contributor Author

@tinaafitz Please Review

Modified used method to count active provisions for quota.
Added log messages to method.

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

Log messages display counts and type of quota.
Sample log messages below:

<AEMethod used> Quota Used: {:cpu=>373, :memory=>922780434432, :vms=>141, :storage=>9111136632832, :provisioned_storage=>10033917067264}

<AEMethod used> Quota active_provisions_by_tenant: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>44023414784, :provisioned_storage=>0}
<AEMethod used> Quota Totals: {:cpu=>374, :memory=>923854176256, :vms=>142, :storage=>9155160047616, :provisioned_storage=>10033917067264}

<AEMethod used> Quota Used: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>8589934592, :provisioned_storage=>9663676416}
<AEMethod used> Quota active_provisions_by_group: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>44023414784, :provisioned_storage=>0}
<AEMethod used> Quota Totals: {:cpu=>2, :memory=>2147483648, :vms=>2, :storage=>52613349376, :provisioned_storage=>9663676416}

<AEMethod used> Quota Used: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>8589934592, :provisioned_storage=>9663676416}
<AEMethod used> Quota active_provisions_by_owner: {:cpu=>0, :memory=>0, :vms=>0, :storage=>0, :provisioned_storage=>0}
<AEMethod used> Quota Totals: {:cpu=>1, :memory=>1073741824, :vms=>1, :storage=>8589934592, :provisioned_storage=>9663676416}
@miq-bot
Copy link
Member

miq-bot commented Oct 11, 2017

Checked commit billfitzgerald0120@5d4c745 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@tinaafitz tinaafitz left a 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.

@mkanoor mkanoor merged commit a38ebc9 into ManageIQ:master Oct 13, 2017
@mkanoor mkanoor added this to the Sprint 71 Ending Oct 16, 2017 milestone Oct 13, 2017
@simaishi
Copy link
Contributor

@billfitzgerald0120 This was refactored in #191, which is not in Fine branch. Should PR 191 be backported to Fine? If not, please create a separate PR for Fine branch.

@billfitzgerald0120
Copy link
Contributor Author

@simaishi I don't think we need to backport #191. This PR needs to be backported.

@simaishi
Copy link
Contributor

@billfitzgerald0120 Then, please create a PR for Fine branch. This PR can't be backported as is due to the refactoring.

@billfitzgerald0120
Copy link
Contributor Author

@simaishi We do need both of these back ported.

More detail here:
https://bugzilla.redhat.com/show_bug.cgi?id=1489507

Thanks
Billy

@simaishi
Copy link
Contributor

@billfitzgerald0120 please make sure all needed PRs are marked as fine/yes. Thanks!

simaishi pushed a commit that referenced this pull request Nov 20, 2017
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit 0db92735f28c731ff45652ec8ddc1164cb243165
Author: Madhu Kanoor <[email protected]>
Date:   Fri Oct 13 10:05:54 2017 -0400

    Merge pull request #196 from billfitzgerald0120/used_new_active_provisions
    
    Added active provisions to quota count.
    (cherry picked from commit a38ebc9efffa62117cf717ca89ce168501736c53)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1489507

@simaishi
Copy link
Contributor

@billfitzgerald0120 Can you take a look at Travis failure?
https://travis-ci.org/ManageIQ/manageiq-content/builds/304801822

There was a conflict backporting to Fine branch in https://github.com/ManageIQ/manageiq-content/pull/196/files#diff-9c5e8f4a07d3caa797737be3a823473eL22, so probably spec needs to be updated somewhere else?

@billfitzgerald0120
Copy link
Contributor Author

@simaishi We need this one back ported too. #132 I added the fine/yes label to it.

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.

6 participants