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

[WIP] Move provisioning quota calculation methods into MiqTemplate class (pluggable) #22680

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jaywcarman
Copy link
Member

@jaywcarman jaywcarman commented Aug 22, 2023

PR set:

Fixes #22641

Move methods making quota calculations for a given request into MiqTemplate base class. They can then be overridden in the ManageIQ::Providers::CloudManager::Template subclass (for "cloud" providers), or even in provider plug-in subclasses.

Allows an override in ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager::Template to fix a bug where it reports 0 cpus for quota.

TODO:

  • Fix faililng cross-repo tests
  • Make storage calculations pluggable

@jaywcarman
Copy link
Member Author

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Aug 31, 2023
@jaywcarman jaywcarman force-pushed the pluggable_request_quota_counts branch 2 times, most recently from 36cd97a to 6a73a5b Compare September 1, 2023 13:49
@jaywcarman jaywcarman force-pushed the pluggable_request_quota_counts branch from 6a73a5b to 9d50970 Compare October 2, 2023 18:34
@jaywcarman jaywcarman force-pushed the pluggable_request_quota_counts branch from 9d50970 to 9167dd5 Compare October 18, 2023 16:25
@jaywcarman jaywcarman changed the title [WIP] Move provisioning quota calculation methods into MiqTemplate class (pluggable) Move provisioning quota calculation methods into MiqTemplate class (pluggable) Oct 18, 2023
@Fryguy Fryguy removed the wip label Oct 25, 2023
@kbrock
Copy link
Member

kbrock commented Oct 26, 2023

@jaywcarman Sorry, having trouble making out what was changed

Is it possible to change this into 2 (or more) commits?
When it makes sense, separating move operations from change operations:

  1. Move code into MiqTemplate unchanged.
  2. Move code into infra/template and cloud/template.

@jaywcarman
Copy link
Member Author

Is it possible to change this into 2 (or more) commits?

@kbrock I'm happy to do so.

To calculate the quota values, only the request itself (along with an
optional flavor_id override) is needed.
Cloud and Infra requests use different default quota calculation logic.
@jaywcarman jaywcarman force-pushed the pluggable_request_quota_counts branch from 9167dd5 to b458eaa Compare October 27, 2023 15:37
@miq-bot
Copy link
Member

miq-bot commented Oct 31, 2023

Checked commits jaywcarman/manageiq@47c1c14~...b458eaa with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
4 files checked, 0 offenses detected
Everything looks fine. ⭐

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Nov 2, 2023
@jaywcarman jaywcarman changed the title Move provisioning quota calculation methods into MiqTemplate class (pluggable) [WIP] Move provisioning quota calculation methods into MiqTemplate class (pluggable) Nov 8, 2023
@miq-bot miq-bot added the wip label Nov 8, 2023
@miq-bot miq-bot added the stale label Feb 12, 2024
@miq-bot
Copy link
Member

miq-bot commented Feb 12, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

@miq-bot
Copy link
Member

miq-bot commented Mar 7, 2024

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Jun 10, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Sep 16, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

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.

Hard to Inject Provider-specifc Logic into Quota Check on Provision Requests
4 participants