[
https://issues.apache.org/jira/browse/CLOUDSTACK-9251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124112#comment-15124112
]
ASF GitHub Bot commented on CLOUDSTACK-9251:
--------------------------------------------
Github user ustcweizhou commented on the pull request:
https://github.com/apache/cloudstack/pull/1363#issuecomment-176945786
@alexandrelimassantana I agree with you about the code changes.
However, this commit only reverts the commit 9c4162a and 16baa12 to fix the
issue.
The issue you mentioned does exist in our codebase, not only in these two
commands, but more than 10 other commands (some are implemented in different
way), you can change them in a single PR if you want.
```
[root@cloudstack(4.6)]# grep -r details.values api/src/
api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java:
Collection paramsCollection = this.details.values();
api/src/org/apache/cloudstack/api/command/admin/storage/UpdateCloudToUseObjectStoreCmd.java:
Collection<?> props = details.values();
api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java:
for (Map<String, String> detail : details.values()) {
api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java:
Collection<?> props = details.values();
api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java:
Collection<?> props = details.values();
api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java:
Collection paramsCollection = details.values();
api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java:
Collection paramsCollection = details.values();
api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java:
Collection<String> paramsCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java:
Collection paramsCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java:
Collection paramsCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java:
Collection paramsCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/volume/AddResourceDetailCmd.java:
Collection<?> servicesCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java: //it
is because details.values() cannot be cast to a map.
api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java:
Collection parameterCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java:
Collection<String> paramsCollection = this.details.values();
api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java:
Collection parameterCollection = details.values();
api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java:
Collection parameterCollection = details.values();
```
> error while change instance offering to custom offering
> -------------------------------------------------------
>
> Key: CLOUDSTACK-9251
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9251
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: API
> Affects Versions: 4.7.0, 4.7.1
> Environment: ACS 4.7.1 -
> https://dist.apache.org/repos/dist/dev/cloudstack/4.7.1/
> Reporter: Tomasz Zieba
>
> Changing compute offering to custom offering end with:
> Step to reproduce:
> 1. Create and run new instance with offering eg. 1 core / 1GB
> 2. Create Custom Offering eg 2 core / 2 GB
> 3. Stop the instance
> 4. Try to change offering of the instance
> 5. Error: Invalid cpu cores value, specify a value between 1 and 2147483647
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)