Skip to content

Fix min balance for API quotaCredits to be optional#6691

Merged
yadvr merged 1 commit intoapache:mainfrom
scclouds:change-minbalance-of-quotasumary-to-optional
Sep 14, 2022
Merged

Fix min balance for API quotaCredits to be optional#6691
yadvr merged 1 commit intoapache:mainfrom
scclouds:change-minbalance-of-quotasumary-to-optional

Conversation

@BryanMLima
Copy link
Copy Markdown
Contributor

@BryanMLima BryanMLima commented Aug 30, 2022

Description

This PR aims to fix the current behavior of the min_balance parameter of the quotaCredits API. This parameter is considered optional in the API documentation; however, when using the API, it is not possible to add credits without specifying the minimum balance for the account. Therefore, this behavior was fixed. If the minimum balance is not specified it is considered as 0.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

This was tested in a local lab using the API quotaCredits without specifying the min_balance field. The API was executed with no errors.

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 30, 2022

Codecov Report

Merging #6691 (7838870) into main (201f066) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #6691   +/-   ##
=========================================
  Coverage      5.87%    5.87%           
- Complexity     3934     3936    +2     
=========================================
  Files          2454     2454           
  Lines        242683   242682    -1     
  Branches      37978    37978           
=========================================
+ Hits          14261    14265    +4     
+ Misses       226843   226838    -5     
  Partials       1579     1579           
Impacted Files Coverage Δ
...apache/cloudstack/api/command/QuotaCreditsCmd.java 67.56% <ø> (+1.77%) ⬆️
...apache/cloudstack/syslog/AlertsSyslogAppender.java 58.75% <0.00%> (+2.25%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

code lgtm.

Copy link
Copy Markdown
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

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

CLGTM

Copy link
Copy Markdown
Contributor

@GutoVeronezi GutoVeronezi left a comment

Choose a reason for hiding this comment

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

CLGTM

@GutoVeronezi
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@GutoVeronezi a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4158

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-4869)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44155 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6691-t4869-kvm-centos7.zip
Smoke tests completed. 101 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr added this to the 4.18.0.0 milestone Sep 14, 2022
@yadvr yadvr merged commit 1465673 into apache:main Sep 14, 2022
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