Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access Viptela-Shell from script for version 20.12 #118

Open
rukapse opened this issue Nov 6, 2023 · 1 comment
Open

Unable to access Viptela-Shell from script for version 20.12 #118

rukapse opened this issue Nov 6, 2023 · 1 comment
Assignees

Comments

@rukapse
Copy link
Collaborator

rukapse commented Nov 6, 2023

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 rukapse self-assigned this Nov 6, 2023
@UnspokenDrop7
Copy link

UnspokenDrop7 commented Apr 23, 2024

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: ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants