bernardodemarco commented on code in PR #14378:
URL: https://github.com/apache/cloudstack/pull/14378#discussion_r4698427585
##########
server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java:
##########
@@ -1041,6 +1070,12 @@ private void
applyResolvedValuesToCommand(CloneVPCOfferingCmd cmd, VpcOfferingVO
List<Long> sourceDomainIds,
List<Long> sourceZoneIds,
Map<String, String>
sourceServiceCapabilityList) {
try {
+ Map<String, String> requestPayload = new HashMap<>();
+ if (cmd.getJob() instanceof AsyncJobVO) {
+ String asyncJobPayload = ((AsyncJobVO)
cmd.getJob()).getCmdInfo();
+ requestPayload =
GsonHelper.getGson().fromJson(asyncJobPayload, new TypeToken<HashMap<String,
String>>() {}.getType());
Review Comment:
Well, not exactly...
If `cmd.getPublicMultiqueueNumber()` or
`cmd.getPrivateGatewayMultiqueueNumber()` are `null`, it means the operator
wants to clear the multi-queue value (left it as a blank value). We only want
to retrieve the multi-queue value from the source offering when its
corresponding parameter has not been specified for the `cloneVpcOffering` API.
And, since the API is asynchronous, the only way to achieve this is by parsing
the job payload.
--
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]