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

Interface configuration fails when Interface is attached to an VRF other than default #9

Closed
aopdal opened this issue Sep 23, 2021 · 3 comments

Comments

@aopdal
Copy link

aopdal commented Sep 23, 2021

Running the test on Ubuntu 20.04 and testing with virtual Aruba CX

Switch:
sw01# sh ver

ArubaOS-CX
(c) Copyright Hewlett Packard Enterprise Development LP

Version : Virtual.10.07.0010
Build Date :
Build ID : ArubaOS-CX:Virtual.10.07.0010:c075dcdbb1f5:202106100007
Build SHA : c075dcdbb1f5c2d88d501045bc6386f1dfa49bbc
Active Image :

Service OS Version :
BIOS Version :

My virtual environment:
(test) arne@linux:~/test$ pip list
Package Version


certifi 2021.5.30
charset-normalizer 2.0.6
idna 3.2
netaddr 0.8.0
pip 20.0.2
pkg-resources 0.0.0
pyaoscx 2.0.1
PyYAML 5.4.1
requests 2.26.0
setuptools 44.0.0
urllib3 1.26.6

My testscript:
(test) arne@linux:~/test$ cat sw01-int-down.py
from pyaoscx.session import Session
from pyaoscx.pyaoscx_factory import PyaoscxFactory
#from pyaoscx.vlan import Vlan
from pyaoscx.interface import Interface

There are two approaches to workflows, both using the session.

version = '10.04'
switch_ip = 'sw01.ao-test.net'
s = Session(switch_ip, version)
s.open('admin', 'Pass0rd123!')

Try block is used so that session closes even on error.

try:
#port_1_1_7 = Interface(s, '1/1/7')
#port_1_1_7.get()
#port_1_1_7.admin = 'down'
# Apply changes
#port_1_1_7.apply()
port_1_1_8 = Interface(s, '1/1/8')
port_1_1_8.get()
port_1_1_8.admin = 'down'
# Apply changes
port_1_1_8.apply()
#port_1_1_9 = Interface(s, '1/1/9')
#port_1_1_9.get()
#port_1_1_9.admin = 'down'
# Apply changes
#port_1_1_9.apply()

except Exception as error:
print('Ran into exception: {}. Closing session.'.format(error))

finally:
# At the end, the session MUST be closed
s.close()

Error message when changing 1/1/7 or 1/1/8
Ran into exception: RESPONSE ERROR in maximum recursion depth exceeded while calling a Python object: GET. Closing session.

Interface config:
interface 1/1/7
no shutdown
vrf attach transport
ip address 10.200.99.129/29
ip ospf 1 area 0.0.0.0
interface 1/1/8
no shutdown
vrf attach transport
ip address 10.200.99.145/29
ip ospf 1 area 0.0.0.0
interface 1/1/9
no shutdown
no routing
vlan trunk native 1
vlan trunk allowed all

@alagoutte
Copy link

Hi @aopdal do you have always the issue ?

@aopdal
Copy link
Author

aopdal commented Nov 24, 2023

Hi @aopdal do you have always the issue ?

Hi, thanks for asking, I will retest after updating my environment. Perhaps it's ok now with the latest fix on VRF's.

@aopdal
Copy link
Author

aopdal commented Nov 24, 2023

It looks like this has been resolved when I retest using pyaoscx==2.5.1.

@aopdal aopdal closed this as completed Nov 24, 2023
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