Skip to content

Commit 24e830a

Browse files
DaanHooglandclaude
andauthored
remove Ovm/Ovm3 leftovers from core code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2431feb commit 24e830a

24 files changed

Lines changed: 26 additions & 136 deletions

‎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,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/usage/AddTrafficTypeCmd.java‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd {
7373
description = "The network name label of the physical device dedicated to this traffic on a Hyperv host")
7474
private String hypervLabel;
7575

76+
@Deprecated
7677
@Parameter(name = ApiConstants.OVM3_NETWORK_LABEL,
7778
type = CommandType.STRING,
7879
description = "The network name of the physical device dedicated to this traffic on an OVM3 host")
@@ -114,9 +115,6 @@ public String getSimulatorLabel() {
114115
return null;
115116
}
116117

117-
public String getOvm3Label() {
118-
return ovm3Label;
119-
}
120118

121119
public void setVlan(String vlan) {
122120
this.vlan = vlan;
@@ -160,7 +158,7 @@ public void execute() {
160158
public void create() throws ResourceAllocationException {
161159
PhysicalNetworkTrafficType result =
162160
_networkService.addTrafficTypeToPhysicalNetwork(getPhysicalNetworkId(), getTrafficType(), getIsolationMethod(), getXenLabel(), getKvmLabel(), getVmwareLabel(),
163-
getSimulatorLabel(), getVlan(), null, getOvm3Label());
161+
getSimulatorLabel(), getVlan(), null, null);
164162
if (result != null) {
165163
setEntityId(result.getId());
166164
setEntityUuid(result.getUuid());

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class UpdateTrafficTypeCmd extends BaseAsyncCmd {
6363
description = "The network name label of the physical device dedicated to this traffic on a Hyperv host")
6464
private String hypervLabel;
6565

66+
@Deprecated
6667
@Parameter(name = ApiConstants.OVM3_NETWORK_LABEL,
6768
type = CommandType.STRING,
6869
description = "The network name of the physical device dedicated to this traffic on an OVM3 host")
@@ -88,9 +89,6 @@ public String getVmwareLabel() {
8889
return vmwareLabel;
8990
}
9091

91-
public String getOvm3Label() {
92-
return ovm3Label;
93-
}
9492

9593
/////////////////////////////////////////////////////
9694
/////////////// API Implementation///////////////////
@@ -103,7 +101,7 @@ public long getEntityOwnerId() {
103101

104102
@Override
105103
public void execute() {
106-
PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType(getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), null, getOvm3Label());
104+
PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType(getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), null, null);
107105
if (result != null) {
108106
TrafficTypeResponse response = _responseGenerator.createTrafficTypeResponse(result);
109107
response.setResponseName(getCommandName());

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ public class TrafficTypeResponse extends BaseResponse {
6060
@Param(description = "isolation methods for the physical network traffic")
6161
private String isolationMethods;
6262

63-
@SerializedName(ApiConstants.OVM3_NETWORK_LABEL)
64-
@Param(description = "The Network name of the physical device dedicated to this traffic on an OVM3 host")
65-
private String ovm3NetworkLabel;
66-
6763
@Override
6864
public String getObjectId() {
6965
return this.id;
@@ -117,14 +113,6 @@ public String getVmwareLabel() {
117113
return vmwareNetworkLabel;
118114
}
119115

120-
public String getOvm3Label() {
121-
return ovm3NetworkLabel;
122-
}
123-
124-
public void setOvm3Label(String ovm3Label) {
125-
this.ovm3NetworkLabel = ovm3Label;
126-
}
127-
128116
public String getIsolationMethods() {
129117
return isolationMethods;
130118
}

‎engine/schema/pom.xml‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-kvm")
110110
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-vmware")
111111
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-xen")
112-
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-ovm")
113112
File file = new File("./engine/schema/dist/systemvm-templates/sha512sum.txt")
114113
def lines = file.readLines()
115114
for (template in templateList) {
@@ -303,41 +302,5 @@
303302
</plugins>
304303
</build>
305304
</profile>
306-
<profile>
307-
<id>download-ovm-systemvm-template</id>
308-
<activation>
309-
<property>
310-
<name>systemvm-ovm</name>
311-
</property>
312-
</activation>
313-
<build>
314-
<plugins>
315-
<plugin>
316-
<groupId>org.apache.maven.plugins</groupId>
317-
<artifactId>maven-resources-plugin</artifactId>
318-
<version>${cs.resources-plugin.version}</version>
319-
</plugin>
320-
<plugin>
321-
<groupId>com.googlecode.maven-download-plugin</groupId>
322-
<artifactId>download-maven-plugin</artifactId>
323-
<version>1.6.3</version>
324-
<executions>
325-
<execution>
326-
<id>download-ovm-template</id>
327-
<goals>
328-
<goal>wget</goal>
329-
</goals>
330-
<configuration>
331-
<checkSignature>true</checkSignature>
332-
<url>${project.systemvm.template.location}/${cs.version}/systemvmtemplate-${cs.version}.${patch.version}-x86_64-ovm.raw.bz2</url>
333-
<outputDirectory>${basedir}/dist/systemvm-templates/</outputDirectory>
334-
<sha512>${ovm.checksum}</sha512>
335-
</configuration>
336-
</execution>
337-
</executions>
338-
</plugin>
339-
</plugins>
340-
</build>
341-
</profile>
342305
</profiles>
343306
</project>

‎engine/schema/src/main/java/com/cloud/network/dao/PhysicalNetworkTrafficTypeDaoImpl.java‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,8 @@ public String getNetworkTag(long physicalNetworkId, TrafficType trafficType, Hyp
123123
sc = vmWareAllFieldsSearch.create();
124124
} else if (hType == HypervisorType.Simulator) {
125125
sc = simulatorAllFieldsSearch.create();
126-
} else if (hType == HypervisorType.Ovm) {
127-
sc = ovmAllFieldsSearch.create();
128126
} else if (hType == HypervisorType.BareMetal || hType == HypervisorType.External) {
129127
return null;
130-
} else if (hType == HypervisorType.Ovm3) {
131-
sc = ovm3AllFieldsSearch.create();
132128
} else {
133129
assert (false) : "We don't handle this hypervisor type";
134130
return null;

‎engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ public void setUpdated(Date updated) {
309309
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.arm64),
310310
new Pair<>(Hypervisor.HypervisorType.VMware, CPU.CPUArch.amd64),
311311
new Pair<>(Hypervisor.HypervisorType.XenServer, CPU.CPUArch.amd64),
312-
new Pair<>(Hypervisor.HypervisorType.LXC, CPU.CPUArch.amd64),
313-
new Pair<>(Hypervisor.HypervisorType.Ovm3, CPU.CPUArch.amd64)
312+
new Pair<>(Hypervisor.HypervisorType.LXC, CPU.CPUArch.amd64)
314313
);
315314

316315
protected static final List<MetadataTemplateDetails> METADATA_TEMPLATE_LIST = new ArrayList<>();
@@ -321,7 +320,6 @@ public void setUpdated(Date updated) {
321320
ROUTER_TEMPLATE_CONFIGURATION_NAMES.put(Hypervisor.HypervisorType.VMware, "router.template.vmware");
322321
ROUTER_TEMPLATE_CONFIGURATION_NAMES.put(Hypervisor.HypervisorType.XenServer, "router.template.xenserver");
323322
ROUTER_TEMPLATE_CONFIGURATION_NAMES.put(Hypervisor.HypervisorType.LXC, "router.template.lxc");
324-
ROUTER_TEMPLATE_CONFIGURATION_NAMES.put(Hypervisor.HypervisorType.Ovm3, "router.template.ovm3");
325323
}
326324

327325
protected static final Map<Hypervisor.HypervisorType, ImageFormat> HYPERVISOR_IMAGE_FORMAT_MAP = new HashMap<>();
@@ -330,7 +328,6 @@ public void setUpdated(Date updated) {
330328
HYPERVISOR_IMAGE_FORMAT_MAP.put(Hypervisor.HypervisorType.XenServer, ImageFormat.VHD);
331329
HYPERVISOR_IMAGE_FORMAT_MAP.put(Hypervisor.HypervisorType.VMware, ImageFormat.OVA);
332330
HYPERVISOR_IMAGE_FORMAT_MAP.put(Hypervisor.HypervisorType.LXC, ImageFormat.QCOW2);
333-
HYPERVISOR_IMAGE_FORMAT_MAP.put(Hypervisor.HypervisorType.Ovm3, ImageFormat.RAW);
334331
}
335332

336333
public static Map<Hypervisor.HypervisorType, Integer> hypervisorGuestOsMap = new HashMap<>();
@@ -339,7 +336,6 @@ public void setUpdated(Date updated) {
339336
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.XenServer, OTHER_LINUX_ID);
340337
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.VMware, OTHER_LINUX_ID);
341338
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.LXC, LINUX_12_ID);
342-
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.Ovm3, LINUX_12_ID);
343339
}
344340

345341
private static boolean isRunningInTest() {
@@ -701,7 +697,6 @@ protected void updateHypervisorGuestOsMap() {
701697
SystemVmTemplateRegistration.LINUX_12_ID = Math.toIntExact(guestOS.getId());
702698
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.KVM, LINUX_12_ID);
703699
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.LXC, LINUX_12_ID);
704-
hypervisorGuestOsMap.put(Hypervisor.HypervisorType.Ovm3, LINUX_12_ID);
705700
} catch (Exception e) {
706701
LOGGER.warn("Couldn't update System VM template guest OS ID, due to {}", e.getMessage());
707702
}

‎engine/schema/src/main/resources/META-INF/db/schema-42300to2400.sql‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,8 @@ CREATE TABLE IF NOT EXISTS `cloud`.`instance_boot_group_details` (
243243
-- UCS and Hyper-V hypervisor plugins are no longer built
244244
DELETE FROM `cloud`.`configuration` WHERE name = 'ucs.sync.blade.interval';
245245
DELETE FROM `cloud`.`configuration` WHERE name IN ('hyperv.public.network.device', 'hyperv.private.network.device', 'hyperv.guest.network.device', 'router.template.hyperv');
246+
247+
-- OVM and OVM3 hypervisor plugins are no longer built
248+
DELETE FROM `cloud`.`configuration` WHERE name IN ('ovm.public.network.device', 'ovm.private.network.device', 'ovm.guest.network.device',
249+
'ovm3.public.network.device', 'ovm3.private.network.device', 'ovm3.guest.network.device', 'ovm3.storage.network.device',
250+
'ovm3.heartbeat.timeout', 'ovm3.heartbeat.interval', 'router.template.ovm3');

‎engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,6 @@ public void updateHypervisorGuestOsMap_UpdatesGuestOsMapSuccessfully() {
15541554
assertEquals(10, SystemVmTemplateRegistration.LINUX_12_ID.intValue());
15551555
assertEquals(10, SystemVmTemplateRegistration.hypervisorGuestOsMap.get(Hypervisor.HypervisorType.KVM).intValue());
15561556
assertEquals(10, SystemVmTemplateRegistration.hypervisorGuestOsMap.get(Hypervisor.HypervisorType.LXC).intValue());
1557-
assertEquals(10, SystemVmTemplateRegistration.hypervisorGuestOsMap.get(Hypervisor.HypervisorType.Ovm3).intValue());
15581557
}
15591558

15601559
@Test

‎engine/schema/templateConfig.sh‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ function getTemplateVersion() {
5656

5757
function getGenericName() {
5858
hypervisor=$(echo "$1" | tr "[:upper:]" "[:lower:]")
59-
if [[ "$hypervisor" == "ovm3" ]]; then
60-
echo "ovm"
61-
elif [[ "$hypervisor" == "lxc" ]]; then
59+
if [[ "$hypervisor" == "lxc" ]]; then
6260
echo "kvm"
6361
elif [[ "$hypervisor" == "xenserver" ]]; then
6462
echo "xen"
@@ -115,7 +113,6 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
115113
[vmware]="x86_64-vmware.ova"
116114
[xenserver]="x86_64-xen.vhd.bz2"
117115
[lxc]="x86_64-kvm.qcow2.bz2"
118-
[ovm3]="x86_64-ovm.raw.bz2"
119116
)
120117

121118
templates=()

0 commit comments

Comments
 (0)