You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/06/17 16:22:06 UTC
[GitHub] [cloudstack] mlsorensen opened a new pull request, #6474: Allow for arbitrary disk offering details to be saved/displayed
mlsorensen opened a new pull request, #6474:
URL: https://github.com/apache/cloudstack/pull/6474
Similar to service offering details, allow details to be provided and
displayed. Can be used for classification of offerings, etc.
Signed-off-by: Marcus Sorensen <ml...@apple.com>
### Description
This PR relaxes the disk offering details to match the way the service offering details work. With Service offering details, any arbitrary values provided can be saved and displayed, which can be used as metadata to tag, classify, or organize offerings by higher level consumers. With disk offerings, any detail that isn't recognized is ignored, so this PR relaxes that and persists arbitrary details as well.
Note that with both disk offerings and service offerings, there are a few 'special' detail keys that are marked `display=false` when they are persisted, and this functionality remains intact.
### 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)
- [x] 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
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [x] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Tested locally, properly displays arbitrary details and hides the special details that are marked `display=false` when queried as non-admin user.
```
(localhost) 🐱 > create diskoffering name=test displaytext=test disksize=1 details[0].foo=bar details[0].iopsLimit=200
{
"diskoffering": {
"created": "2022-06-15T16:29:17+0000",
"details": {
"foo": "bar",
"iopsLimit": "200"
},
"disksize": 1,
"displayoffering": true,
"displaytext": "test",
"hasannotations": false,
"id": "a9787073-4704-4bdc-a03f-69e514b79926",
"iscustomized": false,
"name": "test",
"provisioningtype": "thin",
"storagetype": "shared"
}
}
(localhost) 🐱 > set profile localhost-user
Loaded in-built API cache. Failed to read API cache, please run 'sync'.
Loaded server profile: localhost-user
Url: http://localhost:8080/client/api
Username: user
Domain: /
API Key:
Total APIs: 590
(localhost-user) 🐱 > list diskofferings id=a9787073-4704-4bdc-a03f-69e514b79926
{
"count": 1,
"diskoffering": [
{
"created": "2022-06-15T16:29:17+0000",
"details": {
"foo": "bar"
},
"disksize": 1,
"displayoffering": true,
"displaytext": "test",
"hasannotations": false,
"id": "a9787073-4704-4bdc-a03f-69e514b79926",
"iscustomized": false,
"name": "test",
"provisioningtype": "thin",
"storagetype": "shared"
}
]
}
```
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1160232014
@blueorangutan test
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland merged pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
DaanHoogland merged PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1159080528
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6474)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6474&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6474&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6474&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1160123487
@sureshanaparti 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.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1160232391
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] GutoVeronezi commented on a diff in pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on code in PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#discussion_r902664654
##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -3535,14 +3535,11 @@ protected DiskOfferingVO createDiskOffering(final Long userId, final List<Long>
detailsVO.add(new DiskOfferingDetailVO(offering.getId(), ApiConstants.ZONE_ID, String.valueOf(zoneId), false));
}
}
- if (details != null && !details.isEmpty()) {
- // Support disk offering details for below parameters
- if (details.containsKey(Volume.BANDWIDTH_LIMIT_IN_MBPS)) {
- detailsVO.add(new DiskOfferingDetailVO(offering.getId(), Volume.BANDWIDTH_LIMIT_IN_MBPS, details.get(Volume.BANDWIDTH_LIMIT_IN_MBPS), false));
- }
- if (details.containsKey(Volume.IOPS_LIMIT)) {
- detailsVO.add(new DiskOfferingDetailVO(offering.getId(), Volume.IOPS_LIMIT, details.get(Volume.IOPS_LIMIT), false));
- }
+ if (MapUtils.isNotEmpty(details)) {
+ details.forEach((key, value) -> {
+ boolean displayDetail = !key.equals(Volume.BANDWIDTH_LIMIT_IN_MBPS) && !key.equals(Volume.IOPS_LIMIT);
Review Comment:
We could use `StringUtils#equalsAny` here:
```suggestion
boolean displayDetail = !StringUtils.equalsAny(key, Volume.BANDWIDTH_LIMIT_IN_MBPS, Volume.IOPS_LIMIT);
```
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1161892297
UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6474 (SL-JID-1797)
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1161936112
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6474)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6474&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6474&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6474&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6474&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6474&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1161856916
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] acs-robot commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1161856075
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1161856907
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1160823207
<b>Trillian test result (tid-4339)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36579 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6474-t4339-kvm-centos7.zip
Smoke tests completed. 98 look OK, 0 have errors
Only failed tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] sureshanaparti commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1160123039
@blueorangutan package
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1160224740
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3595
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6474: Allow for arbitrary disk offering details to be saved/displayed
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6474:
URL: https://github.com/apache/cloudstack/pull/6474#issuecomment-1161883026
UI build: :heavy_multiplication_x:
(SL-JID-1)
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org