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

loadScope is broken #92

Open
steffenschumacher opened this issue Feb 12, 2022 · 0 comments
Open

loadScope is broken #92

steffenschumacher opened this issue Feb 12, 2022 · 0 comments

Comments

@steffenschumacher
Copy link

steffenschumacher commented Feb 12, 2022

NS1.loadScope requires a scope_id, but does not allow to pass one:
def loadScope( self, scopegroup_id, address_id, callback=None, errback=None):

Attempting to issue this call breaks:

    res = api.loadScope(21939286, 68740)
  File "/Users/xxxx/PycharmProjects/netmanager/venv/lib/python3.9/site-packages/ns1/__init__.py", line 575, in loadScope
    return scope.load(callback=callback, errback=errback)
  File "/Users/xxxx/PycharmProjects/netmanager/venv/lib/python3.9/site-packages/ns1/ipam.py", line 922, in load
    raise ScopeException("Must specify a scope_id")
ns1.ipam.ScopeException: Must specify a scope_id

It would be quite useful to be able to search for scopes, either from:

  • address_id
  • cidr prefix
  • Subnet name

But this seems to require API work, beyond this SDK.. Not sure where to place that issue..

steffenschumacher pushed a commit to steffenschumacher/ns1-python that referenced this issue Mar 12, 2022
Fix loadScope so it accepts only the required scope id
Fix rest.ipam.xyz classes so they accept the fields listed on the current API docs
Fix rest.ipam.addresses.search so it works pr API docs
Add expand method to rest.ipam.scopegroups

Running tests in 3.9 fails helpers::test_singleton_mixin_with_concurrency but I doubt this is my doing..
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

1 participant