Skip to content

Commit 0e42c76

Browse files
author
Daan Hoogland
committed
remove some extra stuff
1 parent 135eb80 commit 0e42c76

File tree

51 files changed

+654
-963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+654
-963
lines changed

.github/boring-cyborg.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ labelPRBasedOnFilePath:
4646
"component:dpdk":
4747
- server/src/main/java/com/cloud/hypervisor/kvm/dpdk/*
4848
- plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/dpdk/*
49-
"component:hyperv":
50-
- plugins/hypervisors/hyperv/*
5149
"component:integration-test":
5250
- test/integration/*
5351
"component:ipv6":

api/src/main/java/com/cloud/hypervisor/Hypervisor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public enum Functionality {
4747
public static final HypervisorType XenServer = new HypervisorType("XenServer", ImageFormat.VHD, EnumSet.of(RootDiskSizeOverride, VmStorageMigration));
4848
public static final HypervisorType KVM = new HypervisorType("KVM", ImageFormat.QCOW2, EnumSet.of(DirectDownloadTemplate, RootDiskSizeOverride, VmStorageMigration));
4949
public static final HypervisorType VMware = new HypervisorType("VMware", ImageFormat.OVA, EnumSet.of(RootDiskSizeOverride, VmStorageMigration, VmStorageMigrationWithSnapshots));
50-
public static final HypervisorType Hyperv = new HypervisorType("Hyperv");
5150
public static final HypervisorType VirtualBox = new HypervisorType("VirtualBox");
5251
public static final HypervisorType Parralels = new HypervisorType("Parralels");
5352
public static final HypervisorType BareMetal = new HypervisorType("BareMetal");

api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class AddClusterCmd extends BaseCmd {
6565
@Parameter(name = ApiConstants.HYPERVISOR,
6666
type = CommandType.STRING,
6767
required = true,
68-
description = "Hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3,External")
68+
description = "Hypervisor type of the cluster: XenServer,KVM,VMware,BareMetal,Simulator,External")
6969
private String hypervisor;
7070

7171
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,

api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class ListHostsCmd extends BaseListCmd {
104104
@Parameter(name = ApiConstants.HA_HOST, type = CommandType.BOOLEAN, description = "If true, list only hosts dedicated to HA")
105105
private Boolean haHost;
106106

107-
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of host: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator")
107+
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of host: XenServer,KVM,VMware,BareMetal,Simulator")
108108
private String hypervisor;
109109

110110
@Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server", since="4.21.0")

api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd {
6767
description = "The network name label of the physical device dedicated to this traffic on a VMware host")
6868
private String vmwareLabel;
6969

70+
@Deprecated
7071
@Parameter(name = ApiConstants.HYPERV_NETWORK_LABEL,
7172
type = CommandType.STRING,
7273
description = "The network name label of the physical device dedicated to this traffic on a Hyperv host")
7374
private String hypervLabel;
7475

76+
@Deprecated
7577
@Parameter(name = ApiConstants.OVM3_NETWORK_LABEL,
7678
type = CommandType.STRING,
7779
description = "The network name of the physical device dedicated to this traffic on an OVM3 host")
@@ -108,19 +110,11 @@ public String getVmwareLabel() {
108110
return vmwareLabel;
109111
}
110112

111-
public String getHypervLabel() {
112-
return hypervLabel;
113-
}
114-
115113
public String getSimulatorLabel() {
116114
//simulators will have no labels
117115
return null;
118116
}
119117

120-
public String getOvm3Label() {
121-
return ovm3Label;
122-
}
123-
124118
public void setVlan(String vlan) {
125119
this.vlan = vlan;
126120
}
@@ -163,7 +157,7 @@ public void execute() {
163157
public void create() throws ResourceAllocationException {
164158
PhysicalNetworkTrafficType result =
165159
_networkService.addTrafficTypeToPhysicalNetwork(getPhysicalNetworkId(), getTrafficType(), getIsolationMethod(), getXenLabel(), getKvmLabel(), getVmwareLabel(),
166-
getSimulatorLabel(), getVlan(), getHypervLabel(), getOvm3Label());
160+
getSimulatorLabel(), getVlan(), null, null);
167161
if (result != null) {
168162
setEntityId(result.getId());
169163
setEntityUuid(result.getUuid());

api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ public class UpdateTrafficTypeCmd extends BaseAsyncCmd {
5757
description = "The network name label of the physical device dedicated to this traffic on a VMware host")
5858
private String vmwareLabel;
5959

60+
@Deprecated
6061
@Parameter(name = ApiConstants.HYPERV_NETWORK_LABEL,
6162
type = CommandType.STRING,
6263
description = "The network name label of the physical device dedicated to this traffic on a Hyperv host")
6364
private String hypervLabel;
6465

66+
@Deprecated
6567
@Parameter(name = ApiConstants.OVM3_NETWORK_LABEL,
6668
type = CommandType.STRING,
6769
description = "The network name of the physical device dedicated to this traffic on an OVM3 host")
@@ -87,14 +89,6 @@ public String getVmwareLabel() {
8789
return vmwareLabel;
8890
}
8991

90-
public String getHypervLabel() {
91-
return hypervLabel;
92-
}
93-
94-
public String getOvm3Label() {
95-
return ovm3Label;
96-
}
97-
9892
/////////////////////////////////////////////////////
9993
/////////////// API Implementation///////////////////
10094
/////////////////////////////////////////////////////
@@ -106,7 +100,7 @@ public long getEntityOwnerId() {
106100

107101
@Override
108102
public void execute() {
109-
PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType(getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), getHypervLabel(), getOvm3Label());
103+
PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType(getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), null, null);
110104
if (result != null) {
111105
TrafficTypeResponse response = _responseGenerator.createTrafficTypeResponse(result);
112106
response.setResponseName(getCommandName());

api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ public class TrafficTypeResponse extends BaseResponse {
5252
@Param(description = "The Network name label of the physical device dedicated to this traffic on a VMware host")
5353
private String vmwareNetworkLabel;
5454

55-
@SerializedName(ApiConstants.HYPERV_NETWORK_LABEL)
56-
@Param(description = "The Network name label of the physical device dedicated to this traffic on a HyperV host")
57-
private String hypervNetworkLabel;
58-
5955
@SerializedName(ApiConstants.VLAN)
6056
@Param(description = "The VLAN id to be used for Management traffic by VMware host")
6157
private String vlan;
@@ -64,10 +60,6 @@ public class TrafficTypeResponse extends BaseResponse {
6460
@Param(description = "isolation methods for the physical network traffic")
6561
private String isolationMethods;
6662

67-
@SerializedName(ApiConstants.OVM3_NETWORK_LABEL)
68-
@Param(description = "The Network name of the physical device dedicated to this traffic on an OVM3 host")
69-
private String ovm3NetworkLabel;
70-
7163
@Override
7264
public String getObjectId() {
7365
return this.id;
@@ -105,18 +97,10 @@ public String getKvmLabel() {
10597
return kvmNetworkLabel;
10698
}
10799

108-
public String getHypervLabel() {
109-
return hypervNetworkLabel;
110-
}
111-
112100
public void setXenLabel(String xenLabel) {
113101
this.xenNetworkLabel = xenLabel;
114102
}
115103

116-
public void setHypervLabel(String hypervLabel) {
117-
this.hypervNetworkLabel = hypervLabel;
118-
}
119-
120104
public void setKvmLabel(String kvmLabel) {
121105
this.kvmNetworkLabel = kvmLabel;
122106
}
@@ -129,14 +113,6 @@ public String getVmwareLabel() {
129113
return vmwareNetworkLabel;
130114
}
131115

132-
public String getOvm3Label() {
133-
return ovm3NetworkLabel;
134-
}
135-
136-
public void setOvm3Label(String ovm3Label) {
137-
this.ovm3NetworkLabel = ovm3Label;
138-
}
139-
140116
public String getIsolationMethods() {
141117
return isolationMethods;
142118
}

engine/orchestration/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@
7878
<artifactId>cloud-plugin-hypervisor-external</artifactId>
7979
<version>${project.version}</version>
8080
</dependency>
81+
<dependency>
82+
<groupId>org.apache.cloudstack</groupId>
83+
<artifactId>cloud-api</artifactId>
84+
<version>4.23.0.0-SNAPSHOT</version>
85+
<scope>compile</scope>
86+
</dependency>
8187
</dependencies>
8288
<build>
8389
<plugins>

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ public boolean getExecuteInSequence(final HypervisorType hypervisorType) {
20102010
return ExecuteInSequence.value();
20112011
}
20122012

2013-
if (Set.of(HypervisorType.KVM, HypervisorType.XenServer, HypervisorType.Hyperv, HypervisorType.LXC).contains(hypervisorType)) {
2013+
if (Set.of(HypervisorType.KVM, HypervisorType.XenServer, HypervisorType.LXC).contains(hypervisorType)) {
20142014
return false;
20152015
} else if (hypervisorType.equals(HypervisorType.VMware)) {
20162016
return StorageManager.shouldExecuteInSequenceOnVmware();
@@ -5406,8 +5406,7 @@ private void handlePowerOffReportWithNoPendingJobsOnVM(final VMInstanceVO vm) {
54065406
, vm, vm.getState(), vm.getPowerState());
54075407
if((HighAvailabilityManager.ForceHA.value() || vm.isHaEnabled()) && vm.getState() == State.Running
54085408
&& HaVmRestartHostUp.value()
5409-
&& vm.getHypervisorType() != HypervisorType.VMware
5410-
&& vm.getHypervisorType() != HypervisorType.Hyperv) {
5409+
&& vm.getHypervisorType() != HypervisorType.VMware) {
54115410
logger.info("Detected out-of-band stop of a HA enabled VM {}, will schedule restart.", vm);
54125411
if (!_haMgr.hasPendingHaWork(vm.getId())) {
54135412
_haMgr.scheduleRestart(vm, true);

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,24 +1156,14 @@ private ImageFormat getSupportedImageFormatForCluster(HypervisorType hyperType)
11561156
return ImageFormat.OVA;
11571157
} else if (hyperType == HypervisorType.Ovm) {
11581158
return ImageFormat.RAW;
1159-
} else if (hyperType == HypervisorType.Hyperv) {
1160-
return ImageFormat.VHDX;
11611159
} else {
11621160
return null;
11631161
}
11641162
}
11651163

11661164
private boolean isSupportedImageFormatForCluster(VolumeInfo volume, HypervisorType rootDiskHyperType) {
11671165
ImageFormat volumeFormat = volume.getFormat();
1168-
if (rootDiskHyperType == HypervisorType.Hyperv) {
1169-
if (volumeFormat.equals(ImageFormat.VHDX) || volumeFormat.equals(ImageFormat.VHD)) {
1170-
return true;
1171-
} else {
1172-
return false;
1173-
}
1174-
} else {
1175-
return volume.getFormat().equals(getSupportedImageFormatForCluster(rootDiskHyperType));
1176-
}
1166+
return volume.getFormat().equals(getSupportedImageFormatForCluster(rootDiskHyperType));
11771167
}
11781168

11791169
private VolumeInfo copyVolume(StoragePool rootDiskPool, VolumeInfo volumeInfo, VirtualMachine vm, VirtualMachineTemplate rootDiskTmplt, DataCenter dcVO, Pod pod, DiskOffering diskVO,

0 commit comments

Comments
 (0)