Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'nsx-integration' of https://github.com/apache/cloudstack …
…into nsx-refactor-update-offering
  • Loading branch information
Pearl1594 committed Oct 23, 2023
commit 386ba2f3af056feab6772e64696dc6ed6d8eb958
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ private Answer executeRequest(CreateNsxDhcpRelayConfigCommand cmd) {
return new NsxAnswer(cmd, e);
}


String segmentName = NsxControllerUtils.getNsxSegmentId(domainName, accountName, zoneName, vpcName, networkName);
String segmentName = NsxControllerUtils.getNsxSegmentId(domainId, accountId, zoneId, vpcId, networkId);
String dhcpConfigPath = String.format("%s/%s", DHCP_RELAY_CONFIGS_PATH_PREFIX, dhcpRelayConfigName);
try {
Segment segment = nsxApiClient.getSegmentById(segmentName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ public static String getNsxSegmentId(long domainId, long accountId, long zoneId,
return String.format("%s-V%s-S%s",segmentName, vpcId, networkId);
}


public static String getNsxDhcpRelayConfigId(String zoneName, String domainName, String accountName, String vpcName, String networkName) {
String suffix = "-Relay";
if (isNull(vpcName)) {
return domainName + "-" + accountName + "-" + zoneName + "-" +networkName + suffix;
public static String getNsxDhcpRelayConfigId(long zoneId, long domainId, long accountId, Long vpcId, long networkId) {
String suffix = "Relay";
if (isNull(vpcId)) {
return String.format("D%s-A%s-Z%s-S%s-%s", domainId, accountId, zoneId, networkId, suffix);
}
return String.format("D%s-A%s-Z%s-V%s-S%s-%s", domainId, accountId, zoneId, vpcId, networkId, suffix);
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.