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


##########
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:
   this seems to me to indicate that the functionality should be extracted from 
`PhysicalNetworkResponse` and be put in a utility.



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