Skip to content

Commit e11f7ee

Browse files
fmaximusDaanHoogland
authored andcommitted
RIP Nuage Cloudstack Plugin (#3146)
may it rest in peaces
1 parent 4c60a5b commit e11f7ee

145 files changed

Lines changed: 48 additions & 38841 deletions

File tree

Some content is hidden

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

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,6 @@ public class EventTypes {
480480
public static final String EVENT_EXTERNAL_OVS_CONTROLLER_DELETE = "PHYSICAL.OVSCONTROLLER.DELETE";
481481

482482
// external network mapping events
483-
public static final String EVENT_EXTERNAL_VSP_VSD_ADD = "PHYSICAL.NUAGE.VSD.ADD";
484-
public static final String EVENT_EXTERNAL_VSP_VSD_UPDATE = "PHYSICAL.NUAGE.VSD.UPDATE";
485-
public static final String EVENT_EXTERNAL_VSP_VSD_DELETE = "PHYSICAL.NUAGE.VSD.DELETE";
486483
// AutoScale
487484
public static final String EVENT_COUNTER_CREATE = "COUNTER.CREATE";
488485
public static final String EVENT_COUNTER_DELETE = "COUNTER.DELETE";
@@ -924,8 +921,6 @@ public class EventTypes {
924921
entityEventDetails.put(EVENT_EXTERNAL_NVP_CONTROLLER_CONFIGURE, "NvpController");
925922

926923
// external network mapping events
927-
entityEventDetails.put(EVENT_EXTERNAL_VSP_VSD_ADD, "NuageVsp");
928-
entityEventDetails.put(EVENT_EXTERNAL_VSP_VSD_DELETE, "NuageVsp");
929924

930925
// AutoScale
931926
entityEventDetails.put(EVENT_COUNTER_CREATE, AutoScaleCounter.class);

api/src/main/java/com/cloud/network/Network.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ public static class Provider {
144144
// add new Ovs provider
145145
public static final Provider Ovs = new Provider("Ovs", false);
146146
public static final Provider Opendaylight = new Provider("Opendaylight", false);
147-
// add Nuage Vsp Providers
148-
public static final Provider NuageVsp = new Provider("NuageVsp", false);
149147
public static final Provider BrocadeVcs = new Provider("BrocadeVcs", false);
150148
// add GloboDns provider
151149
public static final Provider GloboDns = new Provider("GloboDns", true);

api/src/main/java/com/cloud/network/Networks.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ public <T> URI toUri(T value) {
125125
}
126126
}
127127
},
128-
UnDecided(null, null), OpenDaylight("opendaylight", String.class),
129-
Vsp("vsp", String.class),;
128+
UnDecided(null, null),
129+
OpenDaylight("opendaylight", String.class);
130130

131131
private final String scheme;
132132
private final Class<?> type;

client/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,6 @@
213213
<artifactId>cloud-plugin-network-vcs</artifactId>
214214
<version>${project.version}</version>
215215
</dependency>
216-
<dependency>
217-
<groupId>org.apache.cloudstack</groupId>
218-
<artifactId>cloud-plugin-network-vsp</artifactId>
219-
<version>${project.version}</version>
220-
</dependency>
221216
<dependency>
222217
<groupId>org.apache.cloudstack</groupId>
223218
<artifactId>cloud-plugin-hypervisor-xenserver</artifactId>
@@ -802,7 +797,7 @@
802797
<artifactId>maven-antrun-plugin</artifactId>
803798
<version>1.7</version>
804799
<executions>
805-
<!-- Copy the systemvm in the package phase as it is generated by console-proxy in the package
800+
<!-- Copy the systemvm in the package phase as it is generated by console-proxy in the package
806801
phase. -->
807802
<execution>
808803
<id>copy-systemvm</id>

engine/schema/src/main/resources/META-INF/db/create-default-role-api-mappings.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`,
166166
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'getVMPassword', 'ALLOW', 143) ON DUPLICATE KEY UPDATE rule=rule;
167167
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'getVirtualMachineUserData', 'ALLOW', 144) ON DUPLICATE KEY UPDATE rule=rule;
168168
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'importLdapUsers', 'ALLOW', 145) ON DUPLICATE KEY UPDATE rule=rule;
169-
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'issueNuageVspResourceRequest', 'ALLOW', 146) ON DUPLICATE KEY UPDATE rule=rule;
170169
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'ldapCreateAccount', 'ALLOW', 147) ON DUPLICATE KEY UPDATE rule=rule;
171170
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'linkDomainToLdap', 'ALLOW', 148) ON DUPLICATE KEY UPDATE rule=rule;
172171
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 2, 'listAccounts', 'ALLOW', 149) ON DUPLICATE KEY UPDATE rule=rule;
@@ -479,7 +478,6 @@ INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`,
479478
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'getUploadParamsForVolume', 'ALLOW', 138) ON DUPLICATE KEY UPDATE rule=rule;
480479
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'getVMPassword', 'ALLOW', 139) ON DUPLICATE KEY UPDATE rule=rule;
481480
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'getVirtualMachineUserData', 'ALLOW', 140) ON DUPLICATE KEY UPDATE rule=rule;
482-
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'issueNuageVspResourceRequest', 'ALLOW', 141) ON DUPLICATE KEY UPDATE rule=rule;
483481
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'listAccounts', 'ALLOW', 142) ON DUPLICATE KEY UPDATE rule=rule;
484482
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'listAffinityGroupTypes', 'ALLOW', 143) ON DUPLICATE KEY UPDATE rule=rule;
485483
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 3, 'listAffinityGroups', 'ALLOW', 144) ON DUPLICATE KEY UPDATE rule=rule;
@@ -759,7 +757,6 @@ INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`,
759757
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'getUploadParamsForVolume', 'ALLOW', 116) ON DUPLICATE KEY UPDATE rule=rule;
760758
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'getVMPassword', 'ALLOW', 117) ON DUPLICATE KEY UPDATE rule=rule;
761759
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'getVirtualMachineUserData', 'ALLOW', 118) ON DUPLICATE KEY UPDATE rule=rule;
762-
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'issueNuageVspResourceRequest', 'ALLOW', 119) ON DUPLICATE KEY UPDATE rule=rule;
763760
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'listAccounts', 'ALLOW', 120) ON DUPLICATE KEY UPDATE rule=rule;
764761
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'listAffinityGroupTypes', 'ALLOW', 121) ON DUPLICATE KEY UPDATE rule=rule;
765762
INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`, `sort_order`) values (UUID(), 4, 'listAffinityGroups', 'ALLOW', 122) ON DUPLICATE KEY UPDATE rule=rule;

engine/schema/src/main/resources/META-INF/db/schema-41120to41200-cleanup.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ DROP TABLE IF EXISTS `cloud`.`iam_group_policy_map`;
2525
DROP TABLE IF EXISTS `cloud`.`iam_group`;
2626
DROP TABLE IF EXISTS `cloud`.`iam_policy_permission`;
2727
DROP TABLE IF EXISTS `cloud`.`iam_policy`;
28+
29+
-- Cleanup Nuage VSP
30+
DELETE FROM `cloud`.`host` WHERE id in (SELECT vsp.host_id FROM `cloud`.`external_nuage_vsp_devices` vsp);
31+
DROP TABLE IF EXISTS `cloud`.`external_nuage_vsp_devices`;
32+
delete from `cloud`.`role_permissions` where rule = 'issueNuageVspResourceRequest';

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,16 +2491,6 @@ private void setBurstProperties(final VolumeObjectTO volumeObjectTO, final DiskD
24912491
}
24922492

24932493
private void createVif(final LibvirtVMDef vm, final NicTO nic, final String nicAdapter, Map<String, String> extraConfig) throws InternalErrorException, LibvirtException {
2494-
2495-
if (nic.getType().equals(TrafficType.Guest) && nic.getBroadcastType().equals(BroadcastDomainType.Vsp)) {
2496-
String vrIp = nic.getBroadcastUri().getPath().substring(1);
2497-
vm.getMetaData().getMetadataNode(LibvirtVMDef.NuageExtensionDef.class).addNuageExtension(nic.getMac(), vrIp);
2498-
2499-
if (s_logger.isDebugEnabled()) {
2500-
s_logger.debug("NIC with MAC " + nic.getMac() + " and BroadcastDomainType " + nic.getBroadcastType() + " in network(" + nic.getGateway() + "/" + nic.getNetmask()
2501-
+ ") is " + nic.getType() + " traffic type. So, vsp-vr-ip " + vrIp + " is set in the metadata");
2502-
}
2503-
}
25042494
if (vm.getDevices() == null) {
25052495
s_logger.error("LibvirtVMDef object get devices with null result");
25062496
throw new InternalErrorException("LibvirtVMDef object get devices with null result");

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import org.apache.commons.lang.StringUtils;
2727
import org.apache.log4j.Logger;
2828

29-
import com.google.common.collect.Maps;
30-
3129
public class LibvirtVMDef {
3230
private static final Logger s_logger = Logger.getLogger(LibvirtVMDef.class);
3331

@@ -1665,28 +1663,6 @@ public String toString() {
16651663
}
16661664
}
16671665

1668-
public static class NuageExtensionDef {
1669-
private Map<String, String> addresses = Maps.newHashMap();
1670-
1671-
public void addNuageExtension(String macAddress, String vrIp) {
1672-
addresses.put(macAddress, vrIp);
1673-
}
1674-
1675-
@Override
1676-
public String toString() {
1677-
StringBuilder fsBuilder = new StringBuilder();
1678-
fsBuilder.append("<nuage-extension xmlns='nuagenetworks.net/nuage/cna'>\n");
1679-
for (Map.Entry<String, String> address : addresses.entrySet()) {
1680-
fsBuilder.append(" <interface mac='")
1681-
.append(address.getKey())
1682-
.append("' vsp-vr-ip='")
1683-
.append(address.getValue())
1684-
.append("'></interface>\n");
1685-
}
1686-
return fsBuilder.append("</nuage-extension>\n").toString();
1687-
}
1688-
}
1689-
16901666
public static class RngDef {
16911667
enum RngModel {
16921668
VIRTIO("virtio");

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ public InterfaceDef plug(NicTO nic, String guestOsType, String nicAdapter, Map<S
183183
String brName = "OVSTunnel" + vnetId;
184184
s_logger.debug("nic " + nic + " needs to be connected to LogicalSwitch " + brName);
185185
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
186-
} else if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vsp) {
187-
intf.setVirtualPortInterfaceId(nic.getUuid());
188-
String brName = (trafficLabel != null && !trafficLabel.isEmpty()) ? _pifs.get(trafficLabel) : _pifs.get("private");
189-
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
190186
} else {
191187
intf.defBridgeNet(_bridges.get("guest"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
192188
}

plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -292,23 +292,4 @@ public void testSCSIDef() {
292292
"</controller>\n";
293293
assertEquals(str, expected);
294294
}
295-
296-
@Test
297-
public void testMetadataDef() {
298-
LibvirtVMDef.MetadataDef metadataDef = new LibvirtVMDef.MetadataDef();
299-
300-
metadataDef.getMetadataNode(LibvirtVMDef.NuageExtensionDef.class).addNuageExtension("mac1", "ip1");
301-
metadataDef.getMetadataNode(LibvirtVMDef.NuageExtensionDef.class).addNuageExtension("mac2", "ip2");
302-
303-
String xmlDef = metadataDef.toString();
304-
String expectedXml = "<metadata>\n" +
305-
"<nuage-extension xmlns='nuagenetworks.net/nuage/cna'>\n" +
306-
" <interface mac='mac2' vsp-vr-ip='ip2'></interface>\n" +
307-
" <interface mac='mac1' vsp-vr-ip='ip1'></interface>\n" +
308-
"</nuage-extension>\n" +
309-
"</metadata>\n";
310-
311-
assertEquals(xmlDef, expectedXml);
312-
}
313-
314295
}

0 commit comments

Comments
 (0)