madhukar93 commented on code in PR #8151:
URL: https://github.com/apache/cloudstack/pull/8151#discussion_r1377498054


##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -3082,6 +3082,10 @@ public TrafficTypeResponse 
createTrafficTypeResponse(PhysicalNetworkTrafficType
         PhysicalNetwork pnet = 
ApiDBUtils.findPhysicalNetworkById(result.getPhysicalNetworkId());
         if (pnet != null) {
             response.setPhysicalNetworkId(pnet.getUuid());
+            // using PhysicalNetworkResponse only to convert isolation methods 
to string
+            PhysicalNetworkResponse pnetResponse = new 
PhysicalNetworkResponse();
+            pnetResponse.setIsolationMethods(pnet.getIsolationMethods());
+            response.setIsolationMethods(pnetResponse.getIsolationMethods());

Review Comment:
   @DaanHoogland do you think moving this logic to `PhysicalNetwork`, by 
overloading the getIsolationMethods method. What exists right now is 
`List<String> getIsolationMethods()`, I'm talking about adding a `String 
getIsolationMethods()` as well, that returns csv.
   
   I'm not sure why `String.join` isn't used either, I don't think a separate 
utility is needed.



-- 
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]

Reply via email to