Skip to content

Commit 628d8e6

Browse files
Ritu Sabharwalspark404
authored andcommitted
CLOUDSTACK-6823 : First code drop for Brocade Network plugin to orchestrate Brocade VDX switches for L2 connectivity
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
1 parent 0ac2eb4 commit 628d8e6

51 files changed

Lines changed: 5108 additions & 6 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/com/cloud/network/Network.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public static class Provider {
135135
// add Nuage Vsp Providers
136136
public static final Provider NuageVsp = new Provider("NuageVsp", false);
137137
public static final Provider NuageVspVpc = new Provider("NuageVspVpc", false);
138+
public static final Provider BrocadeVcs = new Provider("BrocadeVcs", false);
138139

139140
private final String name;
140141
private final boolean isExternal;
@@ -223,7 +224,7 @@ public enum State {
223224

224225
Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing(
225226
"Indicates the network configuration is being implemented"), Implemented("Indicates the network configuration is in use"), Shutdown(
226-
"Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed");
227+
"Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed");
227228

228229
protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();
229230

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,20 @@ public <T> URI toUri(T value) {
104104
else
105105
return new URI("vxlan://" + value.toString());
106106
} catch (URISyntaxException e) {
107-
throw new CloudRuntimeException(
108-
"Unable to convert to broadcast URI: " + value);
107+
throw new CloudRuntimeException("Unable to convert to broadcast URI: " + value);
108+
}
109+
}
110+
},
111+
Vcs("vcs", Integer.class) {
112+
@Override
113+
public <T> URI toUri(T value) {
114+
try {
115+
if (value.toString().contains("://"))
116+
return new URI(value.toString());
117+
else
118+
return new URI("vcs://" + value.toString());
119+
} catch (URISyntaxException e) {
120+
throw new CloudRuntimeException("Unable to convert to broadcast URI: " + value);
109121
}
110122
}
111123
},

api/src/com/cloud/network/PhysicalNetwork.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public enum State {
3333
}
3434

3535
public enum IsolationMethod {
36-
VLAN, L3, GRE, STT, VNS, MIDO, SSP, VXLAN, ODL, L3VPN, VSP;
36+
VLAN, L3, GRE, STT, VNS, MIDO, SSP, VXLAN, ODL, L3VPN, VSP, VCS;
3737
}
3838

3939
public enum BroadcastDomainRange {

api/src/org/apache/cloudstack/network/ExternalNetworkDeviceManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static class NetworkDevice {
4646
public static final NetworkDevice NiciraNvp = new NetworkDevice("NiciraNvp", Network.Provider.NiciraNvp.getName());
4747
public static final NetworkDevice CiscoVnmc = new NetworkDevice("CiscoVnmc", Network.Provider.CiscoVnmc.getName());
4848
public static final NetworkDevice OpenDaylightController = new NetworkDevice("OpenDaylightController", Network.Provider.Opendaylight.getName());
49+
public static final NetworkDevice BrocadeVcs = new NetworkDevice("BrocadeVcs", Network.Provider.BrocadeVcs.getName());
4950

5051
public NetworkDevice(String deviceName, String ntwkServiceprovider) {
5152
_name = deviceName;

client/WEB-INF/classes/resources/messages.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ label.add.new.PA=Add new Palo Alto
328328
label.add.new.tier=Add new tier
329329
label.add.NiciraNvp.device=Add Nvp Controller
330330
label.add.NuageVsp.device=Add Nuage Virtualized Services Directory (VSD)
331+
label.add.BrocadeVcs.device=Add Brocade Vcs Switch
331332
label.add.physical.network=Add physical network
332333
label.add.pod=Add Pod
333334
label.add.port.forwarding.rule=Add port forwarding rule
@@ -504,6 +505,7 @@ label.delete.gateway=delete gateway
504505
label.delete.NetScaler=Delete NetScaler
505506
label.delete.NiciraNvp=Remove Nvp Controller
506507
label.delete.NuageVsp=Remove Nuage VSD
508+
label.delete.BrocadeVcs=Remove Brocade Vcs Switch
507509
label.delete.project=Delete project
508510
label.delete.SRX=Delete SRX
509511
label.delete.PA=Delete Palo Alto
@@ -878,6 +880,7 @@ label.nic.adapter.type=NIC adapter type
878880
label.nicira.controller.address=Controller Address
879881
label.nicira.l3gatewayserviceuuid=L3 Gateway Service Uuid
880882
label.nicira.transportzoneuuid=Transport Zone Uuid
883+
label.brocade.vcs.address=Vcs Switch Address
881884
label.nics=NICs
882885
label.no.actions=No Available Actions
883886
label.no.alerts=No Recent Alerts
@@ -1423,6 +1426,8 @@ label.srx.details=SRX details
14231426
label.palo.alto.details=Palo Alto details
14241427
label.added.nicira.nvp.controller=Added new Nicira NVP Controller
14251428
label.nicira.nvp.details=Nicira NVP details
1429+
label.added.brocade.vcs.switch=Added new Brocade Vcs Switch
1430+
label.brocade.vcs.details=Brocade Vcs Switch details
14261431
label.added.new.bigswitch.vns.controller=Added new BigSwitch VNS Controller
14271432
label.bigswitch.vns.details=BigSwitch VNS details
14281433
label.dedicate=Dedicate
@@ -1634,6 +1639,7 @@ message.configuring.public.traffic=Configuring public traffic
16341639
message.configuring.storage.traffic=Configuring storage traffic
16351640
message.confirm.action.force.reconnect=Please confirm that you want to force reconnect this host.
16361641
message.confirm.delete.F5=Please confirm that you would like to delete F5
1642+
message.confirm.delete.BrocadeVcs=Please confirm that you would like to delete Brocade Vcs Switch
16371643
message.confirm.delete.NetScaler=Please confirm that you would like to delete NetScaler
16381644
message.confirm.delete.NuageVsp=Please confirm that you would like to delete Nuage Virtualized Services Directory
16391645
message.confirm.delete.SRX=Please confirm that you would like to delete SRX

client/WEB-INF/classes/resources/messages_zh_CN.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ label.add.new.tier=\u6dfb\u52a0\u65b0\u5c42
298298
label.add.nfs.secondary.staging.store=\u6dfb\u52a0 NFS \u4e8c\u7ea7\u6682\u5b58\u5b58\u50a8
299299
label.add.NiciraNvp.device=\u6dfb\u52a0 Nvp \u63a7\u5236\u5668
300300
label.add.NuageVsp.device=\u6DFB\u52A0 Nuage \u865A\u62DF\u670D\u52A1\u76EE\u5F55 (VSD)
301+
label.add.BrocadeVcs.device=\u6dfb\u52a0 Vcs \u63a7\u5236\u5668
301302
label.add.OpenDaylight.device=\u6dfb\u52a0 OpenDaylight \u63a7\u5236\u5668
302303
label.add.PA.device=\u6dfb\u52a0 Palo Alto \u8bbe\u5907
303304
label.add.physical.network=\u6dfb\u52a0\u7269\u7406\u7f51\u7edc
@@ -511,6 +512,7 @@ label.delete.gateway=\u5220\u9664\u7f51\u5173
511512
label.delete.NetScaler=\u5220\u9664 NetScaler
512513
label.delete.NiciraNvp=\u79fb\u9664 Nvp \u63a7\u5236\u5668
513514
label.delete.NuageVsp=\u5220\u9664 Nuage VSD
515+
label.delete.BrocadeVcs=\u79fb\u9664 Vcs \u63a7\u5236\u5668
514516
label.delete.OpenDaylight.device=\u5220\u9664 OpenDaylight \u63a7\u5236\u5668
515517
label.delete.PA=\u5220\u9664 Palo Alto
516518
label.delete.portable.ip.range=\u5220\u9664\u53ef\u79fb\u690d IP \u8303\u56f4
@@ -1610,6 +1612,7 @@ message.confirm.dedicate.pod.domain.account=\u662f\u5426\u786e\u5b9e\u8981\u5c06
16101612
message.confirm.dedicate.zone=\u662f\u5426\u8981\u5c06\u6b64\u8d44\u6e90\u57df\u4e13\u7528\u4e8e\u57df/\u5e10\u6237?
16111613
message.confirm.delete.ciscovnmc.resource=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 CiscoVNMC \u8d44\u6e90
16121614
message.confirm.delete.F5=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 F5
1615+
message.confirm.delete.BrocadeVcs=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Brocade Vcs Switch
16131616
message.confirm.delete.NetScaler=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 NetScaler
16141617
message.confirm.delete.NuageVsp=\u8BF7\u786E\u8BA4\u5220\u9664 Nuage \u865A\u62DF\u670D\u52A1\u76EE\u5F55
16151618
message.confirm.delete.PA=\u8bf7\u786e\u8ba4\u60a8\u786e\u5b9e\u8981\u5220\u9664 Palo Alto

client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@
145145
<artifactId>cloud-plugin-network-opendaylight</artifactId>
146146
<version>${project.version}</version>
147147
</dependency>
148+
<dependency>
149+
<groupId>org.apache.cloudstack</groupId>
150+
<artifactId>cloud-plugin-network-vcs</artifactId>
151+
<version>${project.version}</version>
152+
</dependency>
148153
<dependency>
149154
<groupId>org.apache.cloudstack</groupId>
150155
<artifactId>cloud-plugin-hypervisor-xenserver</artifactId>

client/tomcatconf/commands.properties.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@ listNiciraNvpDeviceNetworks=1
607607
# Not implemented (yet)
608608
#configureNiciraNvpDevice=1
609609

610+
#### brocade vcs commands
611+
612+
addBrocadeVcsDevice=1
613+
deleteBrocadeVcsDevice=1
614+
listBrocadeVcsDevices=1
615+
listBrocadeVcsDeviceNetworks=1
616+
610617
#### bigswitch vns commands
611618

612619
addBigSwitchVnsDevice=1
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
2+
license agreements. See the NOTICE file distributed with this work for additional
3+
information regarding copyright ownership. The ASF licenses this file to
4+
you under the Apache License, Version 2.0 (the "License"); you may not use
5+
this file except in compliance with the License. You may obtain a copy of
6+
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
7+
by applicable law or agreed to in writing, software distributed under the
8+
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
9+
OF ANY KIND, either express or implied. See the License for the specific
10+
language governing permissions and limitations under the License. -->
11+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
13+
<modelVersion>4.0.0</modelVersion>
14+
<artifactId>cloud-plugin-network-vcs</artifactId>
15+
<name>Apache CloudStack Plugin - Network Brocade VCS</name>
16+
<parent>
17+
<groupId>org.apache.cloudstack</groupId>
18+
<artifactId>cloudstack-plugins</artifactId>
19+
<version>4.5.0-SNAPSHOT</version>
20+
<relativePath>../../pom.xml</relativePath>
21+
</parent>
22+
23+
24+
<build>
25+
<plugins>
26+
<plugin>
27+
<groupId>org.jvnet.jaxb2.maven2</groupId>
28+
<artifactId>maven-jaxb2-plugin</artifactId>
29+
<version>0.7.1</version>
30+
<executions>
31+
<execution>
32+
<id>interface</id>
33+
<goals>
34+
<goal>generate</goal>
35+
</goals>
36+
<configuration>
37+
<generateDirectory>${project.basedir}/target/generated-sources/xjc1</generateDirectory>
38+
<schemaDirectory>${project.basedir}/resources</schemaDirectory>
39+
<schemaIncludes>
40+
<include>BrocadeInterfaceSchema.xsd</include>
41+
</schemaIncludes>
42+
<generatePackage>com.cloud.network.schema.interfacevlan</generatePackage>
43+
</configuration>
44+
</execution>
45+
<execution>
46+
<id>portprofile</id>
47+
<goals>
48+
<goal>generate</goal>
49+
</goals>
50+
<configuration>
51+
<generateDirectory>${project.basedir}/target/generated-sources/xjc2</generateDirectory>
52+
<schemaDirectory>${project.basedir}/resources</schemaDirectory>
53+
<schemaIncludes>
54+
<include>BrocadePortProfileSchema.xsd</include>
55+
</schemaIncludes>
56+
<generatePackage>com.cloud.network.schema.portprofile</generatePackage>
57+
</configuration>
58+
</execution>
59+
<execution>
60+
<id>show-vcs</id>
61+
<goals>
62+
<goal>generate</goal>
63+
</goals>
64+
<configuration>
65+
<generateDirectory>${project.basedir}/target/generated-sources/xjc3</generateDirectory>
66+
<schemaDirectory>${project.basedir}/resources</schemaDirectory>
67+
<schemaIncludes>
68+
<include>BrocadeShowVcsSchema.xsd</include>
69+
</schemaIncludes>
70+
<generatePackage>com.cloud.network.schema.showvcs</generatePackage>
71+
</configuration>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
</plugins>
76+
</build>
77+
78+
</project>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:brocade.com:mgmt:brocade-interface"
3+
xmlns:tns="urn:brocade.com:mgmt:brocade-interface" elementFormDefault="qualified">
4+
5+
<annotation>
6+
<documentation>
7+
8+
Licensed to the Apache Software Foundation (ASF) under one
9+
or more contributor license agreements. See the NOTICE file
10+
distributed with this work for additional information
11+
regarding copyright ownership. The ASF licenses this file
12+
to you under the Apache License, Version 2.0 (the
13+
"License"); you may not use this file except in compliance
14+
with the License. You may obtain a copy of the License at
15+
16+
http://www.apache.org/licenses/LICENSE-2.0
17+
18+
Unless required by applicable law or agreed to in writing,
19+
software distributed under the License is distributed on an
20+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21+
KIND, either express or implied. See the License for the
22+
specific language governing permissions and limitations
23+
under the License.
24+
</documentation>
25+
</annotation>
26+
<element name="interface-vlan">
27+
<complexType>
28+
<sequence>
29+
<element ref="tns:interface"></element>
30+
</sequence>
31+
</complexType>
32+
</element>
33+
34+
<element name="interface">
35+
<complexType>
36+
<sequence>
37+
<element ref="tns:vlan"></element>
38+
39+
</sequence>
40+
</complexType>
41+
</element>
42+
43+
<element name="vlan">
44+
<complexType>
45+
<sequence>
46+
<element name="name" type="int" />
47+
</sequence>
48+
<attribute name="operation" type="string" default="delete"></attribute>
49+
</complexType>
50+
</element>
51+
</schema>

0 commit comments

Comments
 (0)