Merge branch '4.20'

This commit is contained in:
Suresh Kumar Anaparti 2025-07-30 18:30:07 +05:30
commit 70468a6258
No known key found for this signature in database
GPG Key ID: D7CEAE3A9E71D0AA
4 changed files with 18 additions and 6 deletions

View File

@ -132,14 +132,16 @@ public class ListCapacityCmd extends BaseListCmd {
Collections.sort(capacityResponses, new Comparator<CapacityResponse>() {
public int compare(CapacityResponse resp1, CapacityResponse resp2) {
int res = resp1.getZoneName().compareTo(resp2.getZoneName());
// Group by zone
if (res != 0) {
return res;
} else {
return resp1.getCapacityType().compareTo(resp2.getCapacityType());
}
// Sort by capacity type only if not already sorted by usage
return (getSortBy() != null) ? 0 : resp1.getCapacityType().compareTo(resp2.getCapacityType());
}
});
response.setResponses(capacityResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);

View File

@ -249,9 +249,7 @@ public class LibvirtVMDef {
guestDef.append("<boot dev='" + bo + "'/>\n");
}
}
if (_arch == null || ! (_arch.equals("aarch64") || _arch.equals("s390x"))) { // simplification of (as ref.) (!(_arch != null && _arch.equals("s390x")) || (_arch == null || !_arch.equals("aarch64")))
guestDef.append("<smbios mode='sysinfo'/>\n");
}
guestDef.append("<smbios mode='sysinfo'/>\n");
guestDef.append("</os>\n");
if (iothreads) {
guestDef.append(String.format("<iothreads>%s</iothreads>", NUMBER_OF_IOTHREADS));

View File

@ -5703,7 +5703,6 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
}
addProviderToPhysicalNetwork(physicalNetworkId, Provider.Nsx.getName(), null, null);
enableProvider(Provider.Nsx.getName());
}
return null;
}

View File

@ -1098,6 +1098,7 @@ export default {
providerParams.transportzone = this.prefillContent?.transportZone || ''
await this.addNsxController(providerParams)
await this.updateNsxServiceProviderStatus()
this.stepData.stepMove.push('addNsxController')
}
this.stepData.stepMove.push('nsx')
@ -1108,6 +1109,18 @@ export default {
this.setStepStatus(STATUS_FAILED)
}
},
async updateNsxServiceProviderStatus () {
const listParams = {}
listParams.name = 'Nsx'
const nsxPhysicalNetwork = this.stepData.physicalNetworksReturned.find(net => net.isolationmethods.trim().toUpperCase() === 'NSX')
const nsxPhysicalNetworkId = nsxPhysicalNetwork?.id || null
listParams.physicalNetworkId = nsxPhysicalNetworkId
const nsxProviderId = await this.listNetworkServiceProviders(listParams, 'nsxProvider')
console.log(nsxProviderId)
if (nsxProviderId !== null) {
await this.updateNetworkServiceProvider(nsxProviderId)
}
},
async stepAddNetrisProvider () {
this.setStepStatus(STATUS_FINISH)
this.currentStep++