Skip to content

Commit 70468a6

Browse files
Merge branch '4.20'
2 parents f73cb56 + 7e04143 commit 70468a6

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,16 @@ public void execute() {
132132
Collections.sort(capacityResponses, new Comparator<CapacityResponse>() {
133133
public int compare(CapacityResponse resp1, CapacityResponse resp2) {
134134
int res = resp1.getZoneName().compareTo(resp2.getZoneName());
135+
// Group by zone
135136
if (res != 0) {
136137
return res;
137-
} else {
138-
return resp1.getCapacityType().compareTo(resp2.getCapacityType());
139138
}
139+
// Sort by capacity type only if not already sorted by usage
140+
return (getSortBy() != null) ? 0 : resp1.getCapacityType().compareTo(resp2.getCapacityType());
140141
}
141142
});
142143

144+
143145
response.setResponses(capacityResponses);
144146
response.setResponseName(getCommandName());
145147
this.setResponseObject(response);

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ public String toString() {
249249
guestDef.append("<boot dev='" + bo + "'/>\n");
250250
}
251251
}
252-
if (_arch == null || ! (_arch.equals("aarch64") || _arch.equals("s390x"))) { // simplification of (as ref.) (!(_arch != null && _arch.equals("s390x")) || (_arch == null || !_arch.equals("aarch64")))
253-
guestDef.append("<smbios mode='sysinfo'/>\n");
254-
}
252+
guestDef.append("<smbios mode='sysinfo'/>\n");
255253
guestDef.append("</os>\n");
256254
if (iothreads) {
257255
guestDef.append(String.format("<iothreads>%s</iothreads>", NUMBER_OF_IOTHREADS));

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5703,7 +5703,6 @@ private PhysicalNetworkServiceProvider addNSXProviderToPhysicalNetwork(long phys
57035703
}
57045704

57055705
addProviderToPhysicalNetwork(physicalNetworkId, Provider.Nsx.getName(), null, null);
5706-
enableProvider(Provider.Nsx.getName());
57075706
}
57085707
return null;
57095708
}

ui/src/views/infra/zone/ZoneWizardLaunchZone.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,7 @@ export default {
10981098
providerParams.transportzone = this.prefillContent?.transportZone || ''
10991099
11001100
await this.addNsxController(providerParams)
1101+
await this.updateNsxServiceProviderStatus()
11011102
this.stepData.stepMove.push('addNsxController')
11021103
}
11031104
this.stepData.stepMove.push('nsx')
@@ -1108,6 +1109,18 @@ export default {
11081109
this.setStepStatus(STATUS_FAILED)
11091110
}
11101111
},
1112+
async updateNsxServiceProviderStatus () {
1113+
const listParams = {}
1114+
listParams.name = 'Nsx'
1115+
const nsxPhysicalNetwork = this.stepData.physicalNetworksReturned.find(net => net.isolationmethods.trim().toUpperCase() === 'NSX')
1116+
const nsxPhysicalNetworkId = nsxPhysicalNetwork?.id || null
1117+
listParams.physicalNetworkId = nsxPhysicalNetworkId
1118+
const nsxProviderId = await this.listNetworkServiceProviders(listParams, 'nsxProvider')
1119+
console.log(nsxProviderId)
1120+
if (nsxProviderId !== null) {
1121+
await this.updateNetworkServiceProvider(nsxProviderId)
1122+
}
1123+
},
11111124
async stepAddNetrisProvider () {
11121125
this.setStepStatus(STATUS_FINISH)
11131126
this.currentStep++

0 commit comments

Comments
 (0)