sure icon indicating copy to clipboard operation
sure copied to clipboard

Unable to access Viptela-Shell from script for version 20.12

Open rukapse opened this issue 2 years ago • 1 comments

Manage Password (Note: Tool doesn't support passwords containing "!") :

Traceback (most recent call last): File "newsure.py", line 1954, in version, version_tuple = vManageVersion() File "newsure.py", line 316, in vManageVersion version_tuple =tuple([int(i) for i in version_tuple]) File "newsure.py", line 316, in version_tuple =tuple([int(i) for i in version_tuple]) ValueError: invalid literal for int() with base 10: '' vmanage:~$

def showCommand(exec_mode_command): exec_mode_command = exec_mode_command+'\n' exec_mode_command = exec_mode_command.encode() p = subprocess.Popen('viptela_cli'.format(args.username), shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.stdin.write(exec_mode_command) #passing command stdOutput,stdError = p.communicate() p.stdin.close() return stdOutput.decode()

Manage Password (Note: Tool doesn't support passwords containing "!") :

/home/admin/newsure.py(1955)() -> version, version_tuple = vManageVersion() (Pdb) print(showCommand('show version'))

(Pdb) version=showCommand('show version')
(Pdb) print(version)

(Pdb)

rukapse avatar Nov 06 '23 06:11 rukapse

I have the same issue, running Manager version 20.12.3.

vmanage# show version
20.12.3
vmanage:~$ python3 py3_sure.py -u admin
vManage Password (Note: Tool doesn't support passwords containing "!") :
Traceback (most recent call last):
  File "py3_sure.py", line 1953, in <module>
    version, version_tuple = vManageVersion()
  File "py3_sure.py", line 315, in vManageVersion
    version_tuple =tuple([int(i) for i in version_tuple])
  File "py3_sure.py", line 315, in <listcomp>
    version_tuple =tuple([int(i) for i in version_tuple])
ValueError: invalid literal for int() with base 10: ''

UnspokenDrop7 avatar Apr 23 '24 12:04 UnspokenDrop7