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 create a Loopback #14

Open
jkeane100 opened this issue Dec 15, 2021 · 1 comment
Open

Unable to create a Loopback #14

jkeane100 opened this issue Dec 15, 2021 · 1 comment

Comments

@jkeane100
Copy link

I am trying to create a lookback using pyaoscx ver 2.1.0

my code is:

from pyaoscx.session import Session
from pyaoscx.pyaoscx_factory import PyaoscxFactory

import urllib3
import traceback
import logging

urllib3.disable_warnings()

host = "192.168.91.200"
version = "10.04"

s = Session(host, version)
s.open("admin", "admin")

try:
factory = PyaoscxFactory(s)
loopback_2 = factory.interface("loopback2")
loopback_2.configure_loopback("fred", ipv4=["7.7.7.7/32"], description=None)

except Exception as e:
logging.error(traceback.format_exc())

finally:
session.close()

The error I get is:

ERROR:root:Traceback (most recent call last):
File "create_lo2.py", line 32, in
loopback_2.configure_loopback("fred", ipv4=["7.7.7.7/32"], description=None)
File "C:\Users\user1\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyaoscx\interface.py", line 1430, in configure_loopback
return self.apply()
File "C:\Users\user1\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyaoscx\pyaoscx_module.py", line 33, in ensure_connected
return fnct(self, *args, **kwargs)
File "C:\Users\user1\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyaoscx\interface.py", line 534, in apply
modified = self.update()
File "C:\Users\user1\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyaoscx\pyaoscx_module.py", line 33, in ensure_connected
return fnct(self, *args, **kwargs)
File "C:\Users\user1\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyaoscx\interface.py", line 730, in update
raise GenericOperationError(
pyaoscx.exceptions.generic_op_error.GenericOperationError: GENERIC OPERATION ERROR

any assistance appreciated

@alagoutte
Copy link

Hi,

What platform and release do you using ?

You have a vrf named Fred ? (First parameter of configure loopback)

Do you try to create the interface
Loopback_2.create()

Before configure ?

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