|
|
@ -2179,6 +2179,17 @@ def vlanAccessMapConfig(
|
|
|
|
# EOM
|
|
|
|
# EOM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def checkVlanNameNotAssigned(
|
|
|
|
|
|
|
|
obj, deviceType, prompt, timeout, vlanId, vlanName):
|
|
|
|
|
|
|
|
retVal = "ok"
|
|
|
|
|
|
|
|
command = "display vlan id " + vlanId + " \n"
|
|
|
|
|
|
|
|
retVal = waitForDeviceResponse(command, prompt, timeout, obj)
|
|
|
|
|
|
|
|
if(retVal.find(vlanName) != -1):
|
|
|
|
|
|
|
|
return "Nok"
|
|
|
|
|
|
|
|
return retVal
|
|
|
|
|
|
|
|
# EOM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Utility Method to create vlan
|
|
|
|
# Utility Method to create vlan
|
|
|
|
def createVlan(
|
|
|
|
def createVlan(
|
|
|
|
obj, deviceType, prompt, timeout, vlanArg1, vlanArg2, vlanArg3,
|
|
|
|
obj, deviceType, prompt, timeout, vlanArg1, vlanArg2, vlanArg3,
|
|
|
@ -2193,8 +2204,13 @@ def createVlan(
|
|
|
|
# debugOutput("name")
|
|
|
|
# debugOutput("name")
|
|
|
|
command = vlanArg2 + " "
|
|
|
|
command = vlanArg2 + " "
|
|
|
|
value = checkSanityofVariable(deviceType, "vlan_name", vlanArg3)
|
|
|
|
value = checkSanityofVariable(deviceType, "vlan_name", vlanArg3)
|
|
|
|
|
|
|
|
if(value == "ok"):
|
|
|
|
|
|
|
|
value = checkVlanNameNotAssigned(obj, deviceType, prompt, timeout,
|
|
|
|
|
|
|
|
vlanArg1, vlanArg3)
|
|
|
|
if(value == "ok"):
|
|
|
|
if(value == "ok"):
|
|
|
|
command = command + vlanArg3
|
|
|
|
command = command + vlanArg3
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
command = "\n"
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
retVal = "Error-139"
|
|
|
|
retVal = "Error-139"
|
|
|
|
return retVal
|
|
|
|
return retVal
|
|
|
|