rhtyd commented on a change in pull request #2248: CLOUDSTACK-10056
URL: https://github.com/apache/cloudstack/pull/2248#discussion_r135227805
##########
File path: server/src/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -3619,8 +3619,12 @@ public UserVmVO doInTransaction(TransactionStatus
status) throws InsufficientCap
_vmDao.persist(vm);
for (String key : customParameters.keySet()) {
- //handle double byte strings.
- vm.setDetail(key,
Integer.toString(Integer.parseInt(customParameters.get(key))));
+ if(
key.equalsIgnoreCase(VmDetailConstants.ROOT_DISK_CONTROLLER) ||
key.equalsIgnoreCase(VmDetailConstants.DATA_DISK_CONTROLLER)) {
+ vm.setDetail(key, customParameters.get(key));
+ } else {
+ // handle double byte strings.
+ vm.setDetail(key,
Integer.toString(Integer.parseInt(customParameters.get(key))));
Review comment:
In what cases would we do that @bvbharat (CLOUDSTACK-9638) ? do you think,
the values set in database should be a string?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services