Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

await send_command not accepting 'use_textfsm=True' #15

Open
walidamer711 opened this issue Sep 27, 2018 · 5 comments
Open

await send_command not accepting 'use_textfsm=True' #15

walidamer711 opened this issue Sep 27, 2018 · 5 comments
Assignees
Milestone

Comments

@walidamer711
Copy link

While trying add use_textfsm=True to send_commad function it raises the below error.

Traceback (most recent call last):
File "async-ssh.py", line 51, in
main()
File "async-ssh.py", line 46, in main
print(task.result())
File "async-ssh.py", line 30, in collect_output
command_result = await connection.send_command(command,use_textfsm=True)
TypeError: send_command() got an unexpected keyword argument 'use_textfsm'
Task exception was never retrieved
future: <Task finished coro=<collect_output() done, defined at async-ssh.py:24> exception=TypeError("send_command() got an unexpected keyword argument 'use_textfsm'",)>
Traceback (most recent call last):
File "async-ssh.py", line 30, in collect_output
command_result = await connection.send_command(command,use_textfsm=True)
TypeError: send_command() got an unexpected keyword argument 'use_textfsm'

@selfuryon
Copy link
Owner

Hello, @walidamer711 !
My library doesn't support textfsm, but it's interesting. What do you expect from using this args "use_textfsm=True"?

@selfuryon selfuryon self-assigned this Sep 28, 2018
@walidamer711
Copy link
Author

Hello,
In reference to the below link, netmiko now support passing this parameter "use_textfsm=True" along with send_command() in order to return structured data parsed with ready textfsm templates created in ntc-templates. So it is all about getting structured data.

https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html

if you can add this to your library, that will be great.
Thanks

@selfuryon
Copy link
Owner

Oh, it's a great idea! I will realize it in the next release!

@selfuryon selfuryon added this to the Release v1.0 milestone Feb 2, 2019
@Ali-aqrabawi
Copy link

@selfuryon i'm interested to work on this, you can assign it to me.

@selfuryon
Copy link
Owner

Related PR #33

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

No branches or pull requests

3 participants