Fix for cnos.py utility file for Python3.5 (#21750)

* fix in cnos.py utility file

* fix compile errors in cnos.py, update module short description in cnos_vlan.py, move vlan roles under integration/roles

* corrections in readme

* Change module directory name to Lenovo

* change import cnos statement
This commit is contained in:
Dave Kasberg 2017-03-02 08:08:49 -08:00 committed by John R Barker
commit e5ceb3a99c
5 changed files with 17 additions and 6 deletions

View file

@ -3118,7 +3118,7 @@ def enterEnableModeForDevice(enablePassword, timeout, obj):
flag = False
retVal = ""
count = 5
while (flag is False):
while not flag:
# If wait time is execeeded.
if(count == 0):
flag = True
@ -3168,7 +3168,7 @@ def waitForDeviceResponse(command, prompt, timeout, obj):
obj.send(command)
flag = False
retVal = ""
while (flag is False):
while not flag:
time.sleep(1)
try:
buffByte = obj.recv(9999)
@ -3179,7 +3179,10 @@ def waitForDeviceResponse(command, prompt, timeout, obj):
if(gotit != -1):
flag = True
except:
retVal = retVal + "\n Error-101"
if prompt != "(yes/no)?":
retVal = retVal + "\n Error-101"
else:
retVal = retVal
flag = True
return retVal
# EOM

View file

@ -30,7 +30,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
DOCUMENTATION = '''
---
module: cnos_vlan
short_description: Performs VLAN switch configuration and state management.
short_description: Manage VLAN resources and attributes on devices running Lenovo CNOS
description:
- This module allows you to work with VLAN related configurations. The
operators used are overloaded to ensure control over switch VLAN
@ -196,7 +196,7 @@ import time
import re
try:
import cnos
from ansible.module_utils import cnos
HAS_LIB = True
except:
HAS_LIB = False