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

sdk error in #1600

Open
treygauche opened this issue Aug 12, 2021 · 1 comment
Open

sdk error in #1600

treygauche opened this issue Aug 12, 2021 · 1 comment

Comments

@treygauche
Copy link

treygauche commented Aug 12, 2021

I am getting an error when trying to retrieve the web-acceleration collection, that i have not seen in previous calls:

Here is the code:

mgmt = ManagementRoot(ip, usr, pwd)
f5Data = mgmt.tm.ltm.profile.web_accelerations.get_collection()
for profile in f5Data:
      comps = profile.web_compressions.get_collection()
      for comp in comps:
         print (f"{comp.raw}")

And here is the error i'm getting:

Traceback (most recent call last):
File "/Users/ttait/Documents/Networks/f5scraper/mytest.py", line 14, in
f5Data = mgmt.tm.ltm.profile.web_accelerations.get_collection()
File "/usr/local/lib/python3.9/site-packages/f5/bigip/resource.py", line 818, in get_collection
raise UnregisteredKind(error_message)
f5.sdk_exception.UnregisteredKind: 'tm:ltm:profile:web-acceleration:web-accelerationstate' is not registered!

i have successfully done many other calls using the sdk, so i know it connects, and has the ability to work properly. but i am unable to get the web_accelerations due to this error.

thank you,
-timothy

this seems to be a similar issue to #1533

@f5-rahm
Copy link
Contributor

f5-rahm commented Aug 13, 2021

i wonder if the dash in the kind is the problem as that is similar in both issues. I can load the profiles by name just fine.

We are no longer putting development effort in this library, feel free to fork it and make changes if necessary. For imperative operations like this with the rest interface, I'd recommend the bigrest library developed by one of our MVPs. The wa profile load works fine with that:

from bigrest.bigip import BIGIP
b = BIGIP('ltm3.test.local', 'admin', 'admin')
wa_profiles = b.load('/mgmt/tm/ltm/profile/web-acceleration')
for p in wa_profiles:
    print(p.properties.get('name'))

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