Skip to content

Commit 8db1ca2

Browse files
Devdeep SinghVijayendra Bhamidipati
authored andcommitted
CS-9919: Support for Nexus Swiches (Cisco Vswitches)
Description: Do not set the access mode of an interface if vlanid is zero.
1 parent b6687fa commit 8db1ca2

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

utils/src/com/cloud/utils/cisco/n1kv/vsm/VsmCommand.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public enum SwitchPortMode {
5050

5151
public enum OperationType {
5252
addvlanid,
53-
removevlanid,
54-
setrate
53+
removevlanid
5554
}
5655

5756
public static String getAddPortProfile(String name, PortProfileType type,
@@ -338,7 +337,9 @@ private static Element configPortProfileDetails(Document doc, String name, PortP
338337
// Switchport mode.
339338
portProf.appendChild(getSwitchPortMode(doc, mode));
340339
// Adding vlan details.
341-
portProf.appendChild(getAddVlanDetails(doc, mode, Integer.toString(vlanid)));
340+
if (vlanid > 0) {
341+
portProf.appendChild(getAddVlanDetails(doc, mode, Integer.toString(vlanid)));
342+
}
342343
}
343344

344345
// Command "vmware port-group".

vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ public static void createPortProfile(VmwareContext context, String ethPortProfil
165165

166166
List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>();
167167
params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString()));
168-
params.add(new Pair<OperationType, String>(OperationType.setrate, networkRateMbps.toString()));
169168

170169
try {
171170
netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);
@@ -202,7 +201,6 @@ public static void updatePortProfile(VmwareContext context, String ethPortProfil
202201

203202
List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>();
204203
params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString()));
205-
params.add(new Pair<OperationType, String>(OperationType.setrate, networkRateMbps.toString()));
206204

207205
try {
208206
netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);

0 commit comments

Comments
 (0)