CS-9919: Support for Nexus Swiches (Cisco Vswitches)

Description:

	Do not set the access mode of an interface if vlanid is zero.
This commit is contained in:
Devdeep Singh 2012-05-13 12:32:04 +05:30 committed by Vijayendra Bhamidipati
parent b6687faf89
commit 8db1ca296b
2 changed files with 4 additions and 5 deletions

View File

@ -50,8 +50,7 @@ public class VsmCommand {
public enum OperationType {
addvlanid,
removevlanid,
setrate
removevlanid
}
public static String getAddPortProfile(String name, PortProfileType type,
@ -338,7 +337,9 @@ public class VsmCommand {
// Switchport mode.
portProf.appendChild(getSwitchPortMode(doc, mode));
// Adding vlan details.
portProf.appendChild(getAddVlanDetails(doc, mode, Integer.toString(vlanid)));
if (vlanid > 0) {
portProf.appendChild(getAddVlanDetails(doc, mode, Integer.toString(vlanid)));
}
}
// Command "vmware port-group".

View File

@ -165,7 +165,6 @@ public class HypervisorHostHelper {
List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>();
params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString()));
params.add(new Pair<OperationType, String>(OperationType.setrate, networkRateMbps.toString()));
try {
netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);
@ -202,7 +201,6 @@ public class HypervisorHostHelper {
List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>();
params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString()));
params.add(new Pair<OperationType, String>(OperationType.setrate, networkRateMbps.toString()));
try {
netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);