GutoVeronezi opened a new pull request, #7146:
URL: https://github.com/apache/cloudstack/pull/7146
### Description
PR #5909 was created during the release 4.17.0.0 and the parameter `since`
in APIs was written as `4.17.0.0`; however, #5909 was really introduced only in
4.18.0.0.
This PR intends to adjust the `since` in the introduced APIs and parameters
and also:
- improve the parameters documentation;
- adjust parameters length, according to the field in the database;
- rename parameter `UUID` of `quotaTariffDelete` to `ID`, to follow the
pattern we use along other APIs;
- cleanup some unused/unnecessary code in the Cmd classes;
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [X] Cleanup (Code refactoring and cleanup, that may add test cases)
### Feature/Enhancement Scale or Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [X] Minor
- [ ] Trivial
### How Has This Been Tested?
I retested the whole tariff CRUD, as follows:
<details><summary>Creating a tariff</summary>
```
(lab) > quota tariffcreate name='test-aadjusts' usagetype=12 value=0
description="a long description that will describe the tariff's purpose | a
long description that will describe the tariff's purpose | a long description
that will describe the tariff's purpose | a long description that will describe
the tariff's purpose | a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose | a long description that will describe the
tariff's purpose | a long description that will describe the tariff's purpose |
a long description that will describe the tariff's purpose | a long description
that will describe the tariff's purpose | a long description that will describe
the tariff's purpose"
{
"quotatariff": {
"currency": "$",
"description": "a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose | a long description that will describe the
tariff's purpose | a long description that will describe the tariff's purpose |
a long description that will describe the tariff's purpose | a long description
that will describe the tariff's purpose | a long description that will describe
the tariff's purpose | a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "c30cacf7-a378-4e43-8ec0-6c5ad2d0d9e9"
}
}
```
</details>
<details><summary>Listing the tariffs after creating</summary>
```
(lab) > quota tarifflist name=test-adjusts listall=true
{
"count": 1,
"quotatariff": [
{
"currency": "$",
"description": "a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose | a long description that will describe the
tariff's purpose | a long description that will describe the tariff's purpose |
a long description that will describe the tariff's purpose | a long description
that will describe the tariff's purpose | a long description that will describe
the tariff's purpose | a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "c30cacf7-a378-4e43-8ec0-6c5ad2d0d9e9"
}
]
}
```
</details>
<details><summary>Updating the tariff</summary>
```
(lab) > quota tariffupdate name=test-adjusts activationrule="a rule"
description="a simple description"
{
"quotatariff": {
"activationRule": "a rule",
"currency": "$",
"description": "a simple description",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "2d9afee9-960d-4b32-9a68-6a4939e59b6b"
}
}
```
</details>
<details><summary>Listing the tariffs after updating</summary>
```
(lab) > quota tarifflist name=test-adjusts listall=true
{
"count": 2,
"quotatariff": [
{
"currency": "$",
"description": "a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose | a long description that will describe the
tariff's purpose | a long description that will describe the tariff's purpose |
a long description that will describe the tariff's purpose | a long description
that will describe the tariff's purpose | a long description that will describe
the tariff's purpose | a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"removed": "2023-01-31T01:51:58+0000",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "c30cacf7-a378-4e43-8ec0-6c5ad2d0d9e9"
},
{
"activationRule": "a rule",
"currency": "$",
"description": "a simple description",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "2d9afee9-960d-4b32-9a68-6a4939e59b6b"
}
]
}
```
</details>
<details><summary>Removing the tariff</summary>
```
(lab) > quota tariffdelete id=2d9afee9-960d-4b32-9a68-6a4939e59b6b
{
"success": true
}
```
</details>
<details><summary>Listing the tariffs after removing</summary>
```
(lab) > quota tarifflist name=test-adjusts listall=true
{
"count": 2,
"quotatariff": [
{
"currency": "$",
"description": "a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose | a long description that will describe the
tariff's purpose | a long description that will describe the tariff's purpose |
a long description that will describe the tariff's purpose | a long description
that will describe the tariff's purpose | a long description that will describe
the tariff's purpose | a long description that will describe the tariff's
purpose | a long description that will describe the tariff's purpose | a long
description that will describe the tariff's purpose | a long description that
will describe the tariff's purpose",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"removed": "2023-01-31T01:51:58+0000",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "c30cacf7-a378-4e43-8ec0-6c5ad2d0d9e9"
},
{
"activationRule": "a rule",
"currency": "$",
"description": "a simple description",
"effectiveDate": "2023-01-31T01:50:38+0000",
"name": "test-adjusts",
"removed": "2023-01-31T01:52:34+0000",
"tariffValue": 0,
"usageDiscriminator": "None",
"usageName": "PORT_FORWARDING_RULE",
"usageType": 12,
"usageTypeDescription": "Port Forwarding Usage",
"usageUnit": "Policy*Month",
"uuid": "2d9afee9-960d-4b32-9a68-6a4939e59b6b"
}
]
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]