nvazquez commented on code in PR #8554:
URL: https://github.com/apache/cloudstack/pull/8554#discussion_r1463319679


##########
plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxApiClient.java:
##########
@@ -453,8 +453,9 @@ protected void removeSegment(String segmentName) {
         String siteId = getDefaultSiteId();
         String enforcementPointPath = getDefaultEnforcementPointPath(siteId);
         SegmentPorts segmentPortsService = (SegmentPorts) 
nsxService.apply(SegmentPorts.class);
-        PolicyGroupMembersListResult segmentPortsList = 
segmentPortsService.list(DEFAULT_DOMAIN, segmentName, null, 
enforcementPointPath,
-                false, null, 50L, false, null);
+        PolicyGroupMembersListResult segmentPortsList = 
getSegmentPortList(segmentPortsService, segmentName, enforcementPointPath);
+        Long portCount = segmentPortsList.getResultCount();
+        portCount = retrySegmentDeletion(segmentPortsService, portCount, 
segmentName, enforcementPointPath);

Review Comment:
   I think you can just leave this line defining Long portCount and remove the 
previous 2 lines



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to