Posted on December 6, 2018 8:02 pm
 |  Asked by Reecha
 |  52 views
0
0
Print Friendly, PDF & Email

How to configure arista Virtual box VM for https protocol. I want to run a python script which run some basic commands (create interface vlan and shutdown ) on itself using https.

eapi.conf :
[connection:localhost]
transport: https
username: test
password: test

test.py :
import pyeapi
pyeapi.load_config(eapi.conf)
node = pyeapi.connect_to(‘localhost’)
output = node.enable(‘show version’)
print(output)

After running this script, I am getting an error : TypeError: invalid transport specified

If anyone could explain step-by-step how to configure VM for https, Please help.
Thanks

0
Posted by Alexis Dacquay
Answered on December 7, 2018 11:56 am

Hi,
Have you tried adding the following to your config, which would specify the port and transport?

port: 443
transport: https

https://eos.arista.com/arista-eapi-101/
https://eos.arista.com/introducing-the-python-client-for-eapi-pyeapi/
https://pyeapi.readthedocs.io/en/latest/quickstart.html
https://github.com/arista-eosplus/pyeapi

3rd party article:
https://sreeninet.wordpress.com/2015/05/11/arista-eapi-and-pyeapi/

If you are trying to do Port Forwarding in Virtual Box when your VM network is set as NAT, then look up for port forwarding:
https://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
https://medium.com/@ThilinaAshenGamage/port-forwarding-for-ssh-http-on-virtualbox-459277a888be

Regards,

0
Posted by jack jones
Answered on December 14, 2018 8:09 am

http and socket configuration settings is not an easy task so if you want to do the setup properly then you have to do the setup process properly and if you don’t know the process then you can learn it from readynet customer support for the help

Post your Answer

You must be logged in to post an answer.