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


##########
plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxApiClient.java:
##########
@@ -414,6 +433,30 @@ public void deleteSegment(long zoneId, long domainId, long 
accountId, Long vpcId
         }
     }
 
+    protected void removeSegment(String segmentName) {
+        LOGGER.debug(String.format("Removing the segment with ID %s", 
segmentName));
+        Segments segmentService = (Segments) nsxService.apply(Segments.class);
+        Segment segment = segmentService.get(segmentName);
+        if (segment == null) {
+            LOGGER.error(String.format("The segment with ID %s is not found, 
skipping removal", segmentName));
+            return;
+        }
+        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);

Review Comment:
   Its page size



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