weizhouapache commented on code in PR #7386:
URL: https://github.com/apache/cloudstack/pull/7386#discussion_r1197692843


##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -2515,6 +2515,10 @@ public NetworkResponse 
createNetworkResponse(ResponseView view, Network network)
                 Domain domain = 
ApiDBUtils.findDomainById(domainNetworkDetails.first());
                 if (domain != null) {
                     response.setDomainId(domain.getUuid());
+
+                    StringBuilder domainPath = new StringBuilder("ROOT");
+                    
(domainPath.append(domain.getPath())).deleteCharAt(domainPath.length() - 1);
+                    response.setDomainPath(domainPath.toString());

Review Comment:
   @pierrelefevre 
   just double-checked, this PR uses same code in 
server/src/main/java/com/cloud/api/query/dao/DomainJoinDaoImpl.java
   so it is good.
   
   it would be good to extract to a method to avoid duplicated code.
   



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