mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Merge remote-tracking branch 'origin/4.15'
This commit is contained in:
commit
a0788f5816
@ -3486,17 +3486,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||||||
return DiskDef.DiskBus.IDE;
|
return DiskDef.DiskBus.IDE;
|
||||||
} else if (platformEmulator.startsWith("Other PV Virtio-SCSI")) {
|
} else if (platformEmulator.startsWith("Other PV Virtio-SCSI")) {
|
||||||
return DiskDef.DiskBus.SCSI;
|
return DiskDef.DiskBus.SCSI;
|
||||||
} else if (isUefiEnabled && platformEmulator.startsWith("Windows")) {
|
|
||||||
return DiskDef.DiskBus.SATA;
|
|
||||||
} else if (platformEmulator.contains("Ubuntu") ||
|
} else if (platformEmulator.contains("Ubuntu") ||
|
||||||
platformEmulator.startsWith("Fedora") ||
|
org.apache.commons.lang3.StringUtils.startsWithAny(platformEmulator,
|
||||||
platformEmulator.startsWith("CentOS") ||
|
"Fedora", "CentOS", "Red Hat Enterprise Linux", "Debian GNU/Linux", "FreeBSD", "Oracle", "Other PV")) {
|
||||||
platformEmulator.startsWith("Red Hat Enterprise Linux") ||
|
|
||||||
platformEmulator.startsWith("Debian GNU/Linux") ||
|
|
||||||
platformEmulator.startsWith("FreeBSD") ||
|
|
||||||
platformEmulator.startsWith("Oracle") ||
|
|
||||||
platformEmulator.startsWith("Other PV")) {
|
|
||||||
return DiskDef.DiskBus.VIRTIO;
|
return DiskDef.DiskBus.VIRTIO;
|
||||||
|
} else if (isUefiEnabled && org.apache.commons.lang3.StringUtils.startsWithAny(platformEmulator, "Windows", "Other")) {
|
||||||
|
return DiskDef.DiskBus.SATA;
|
||||||
} else {
|
} else {
|
||||||
return DiskDef.DiskBus.IDE;
|
return DiskDef.DiskBus.IDE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,6 +45,13 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo
|
|||||||
|
|
||||||
private SearchBuilder<ServiceOfferingJoinVO> sofIdSearch;
|
private SearchBuilder<ServiceOfferingJoinVO> sofIdSearch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constant used to convert GB into Bytes (or the other way around).
|
||||||
|
* GB * MB * KB = Bytes //
|
||||||
|
* 1024 * 1024 * 1024 = 1073741824
|
||||||
|
*/
|
||||||
|
private static final long GB_TO_BYTES = 1073741824;
|
||||||
|
|
||||||
protected ServiceOfferingJoinDaoImpl() {
|
protected ServiceOfferingJoinDaoImpl() {
|
||||||
|
|
||||||
sofIdSearch = createSearchBuilder();
|
sofIdSearch = createSearchBuilder();
|
||||||
@ -124,7 +131,8 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
offeringResponse.setRootDiskSize(offering.getRootDiskSize());
|
long rootDiskSizeInGb = (long) offering.getRootDiskSize() / GB_TO_BYTES;
|
||||||
|
offeringResponse.setRootDiskSize(rootDiskSizeInGb);
|
||||||
|
|
||||||
return offeringResponse;
|
return offeringResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1302,10 +1302,10 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
|
|||||||
|
|
||||||
Command cmd = null;
|
Command cmd = null;
|
||||||
if (attach) {
|
if (attach) {
|
||||||
cmd = new AttachCommand(disk, vmName);
|
cmd = new AttachCommand(disk, vmName, vmTO.getDetails());
|
||||||
((AttachCommand)cmd).setForced(forced);
|
((AttachCommand)cmd).setForced(forced);
|
||||||
} else {
|
} else {
|
||||||
cmd = new DettachCommand(disk, vmName);
|
cmd = new DettachCommand(disk, vmName, vmTO.getDetails());
|
||||||
((DettachCommand)cmd).setForced(forced);
|
((DettachCommand)cmd).setForced(forced);
|
||||||
}
|
}
|
||||||
Answer a = _agentMgr.easySend(vm.getHostId(), cmd);
|
Answer a = _agentMgr.easySend(vm.getHostId(), cmd);
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else-if="$route.meta.name === 'computeoffering' && item === 'rootdisksize'">
|
<div v-else-if="$route.meta.name === 'computeoffering' && item === 'rootdisksize'">
|
||||||
<div>
|
<div>
|
||||||
{{ parseFloat( resource.rootdisksize / (1024.0 * 1024.0 * 1024.0)).toFixed(1) }} GB
|
{{ resource.rootdisksize }} GB
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="['name', 'type'].includes(item)">
|
<div v-else-if="['name', 'type'].includes(item)">
|
||||||
|
|||||||
@ -21,8 +21,7 @@
|
|||||||
style="width: 25vw;float: right;margin-bottom: 10px; z-index: 8"
|
style="width: 25vw;float: right;margin-bottom: 10px; z-index: 8"
|
||||||
:placeholder="$t('label.search')"
|
:placeholder="$t('label.search')"
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
@search="handleSearch"
|
@search="handleSearch" />
|
||||||
autoFocus />
|
|
||||||
<a-table
|
<a-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="tableSource"
|
:dataSource="tableSource"
|
||||||
|
|||||||
@ -33,7 +33,6 @@
|
|||||||
<template slot="ipAddress" slot-scope="text, record, index">
|
<template slot="ipAddress" slot-scope="text, record, index">
|
||||||
<a-form-item v-if="record.type!=='L2' && index === 0">
|
<a-form-item v-if="record.type!=='L2' && index === 0">
|
||||||
<a-input
|
<a-input
|
||||||
:autoFocus="record.type!=='L2'"
|
|
||||||
style="width: 150px;"
|
style="width: 150px;"
|
||||||
v-decorator="['ipAddress' + record.id, {
|
v-decorator="['ipAddress' + record.id, {
|
||||||
rules: [{
|
rules: [{
|
||||||
@ -50,10 +49,9 @@
|
|||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template slot="macAddress" slot-scope="text, record, index">
|
<template slot="macAddress" slot-scope="text, record">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-input
|
<a-input
|
||||||
:autoFocus="record.type==='L2' && index === 0"
|
|
||||||
style="width: 150px;"
|
style="width: 150px;"
|
||||||
:placeholder="$t('label.macaddress')"
|
:placeholder="$t('label.macaddress')"
|
||||||
v-decorator="[`macAddress` + record.id, {
|
v-decorator="[`macAddress` + record.id, {
|
||||||
|
|||||||
@ -29,6 +29,7 @@ public enum DiskControllerType {
|
|||||||
if (diskController == null || diskController.equalsIgnoreCase("osdefault")) {
|
if (diskController == null || diskController.equalsIgnoreCase("osdefault")) {
|
||||||
return DiskControllerType.osdefault;
|
return DiskControllerType.osdefault;
|
||||||
} else if (diskController.equalsIgnoreCase("vim.vm.device.VirtualLsiLogicSASController") || diskController.equalsIgnoreCase("VirtualLsiLogicSASController")
|
} else if (diskController.equalsIgnoreCase("vim.vm.device.VirtualLsiLogicSASController") || diskController.equalsIgnoreCase("VirtualLsiLogicSASController")
|
||||||
|
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.LSILOGIC_SAS_1068)
|
||||||
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.LSILOGIC_SAS)) {
|
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.LSILOGIC_SAS)) {
|
||||||
return DiskControllerType.lsisas1068;
|
return DiskControllerType.lsisas1068;
|
||||||
} else if (diskController.equalsIgnoreCase("vim.vm.device.VirtualLsiLogicController") || diskController.equalsIgnoreCase("VirtualLsiLogicController")
|
} else if (diskController.equalsIgnoreCase("vim.vm.device.VirtualLsiLogicController") || diskController.equalsIgnoreCase("VirtualLsiLogicController")
|
||||||
@ -38,7 +39,8 @@ public enum DiskControllerType {
|
|||||||
|| diskController.equalsIgnoreCase("ide")) {
|
|| diskController.equalsIgnoreCase("ide")) {
|
||||||
return DiskControllerType.ide;
|
return DiskControllerType.ide;
|
||||||
} else if (diskController.equalsIgnoreCase("vim.vm.device.ParaVirtualSCSIController") || diskController.equalsIgnoreCase("ParaVirtualSCSIController")
|
} else if (diskController.equalsIgnoreCase("vim.vm.device.ParaVirtualSCSIController") || diskController.equalsIgnoreCase("ParaVirtualSCSIController")
|
||||||
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.VMWARE_PARAVIRTUAL)) {
|
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.VMWARE_PARAVIRTUAL)
|
||||||
|
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.VIRTUAL_SCSI)) {
|
||||||
return DiskControllerType.pvscsi;
|
return DiskControllerType.pvscsi;
|
||||||
} else if (diskController.equalsIgnoreCase("vim.vm.device.VirtualBusLogicController") || diskController.equalsIgnoreCase("VirtualBusLogicController")
|
} else if (diskController.equalsIgnoreCase("vim.vm.device.VirtualBusLogicController") || diskController.equalsIgnoreCase("VirtualBusLogicController")
|
||||||
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.BUSLOGIC)) {
|
|| diskController.equalsIgnoreCase(ScsiDiskControllerType.BUSLOGIC)) {
|
||||||
|
|||||||
@ -17,8 +17,10 @@
|
|||||||
package com.cloud.hypervisor.vmware.mo;
|
package com.cloud.hypervisor.vmware.mo;
|
||||||
|
|
||||||
public interface ScsiDiskControllerType {
|
public interface ScsiDiskControllerType {
|
||||||
public final static String LSILOGIC_PARALLEL = "lsilogic";
|
String LSILOGIC_PARALLEL = "lsilogic";
|
||||||
public final static String LSILOGIC_SAS = "lsisas1068";
|
String LSILOGIC_SAS = "lsilogicsas";
|
||||||
public final static String BUSLOGIC = "buslogic";
|
String LSILOGIC_SAS_1068 = "lsisas1068";
|
||||||
public final static String VMWARE_PARAVIRTUAL = "pvscsi";
|
String BUSLOGIC = "buslogic";
|
||||||
|
String VMWARE_PARAVIRTUAL = "pvscsi";
|
||||||
|
String VIRTUAL_SCSI = "VirtualSCSI";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user