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

Problem with multiple ArubaCentralBase objects #34

Closed
marclallen opened this issue Aug 16, 2023 · 1 comment
Closed

Problem with multiple ArubaCentralBase objects #34

marclallen opened this issue Aug 16, 2023 · 1 comment

Comments

@marclallen
Copy link

I believe the use of a singleton C_DEFAULT_ARGS in pycentral.base_utils is causing an issue when using multiple API connections (e.g. when connecting multiple times with different credentials).

ArubaCentralBase.init makes a call to base_utils.parseInputArgs() to get a clean set of central_info parameters. Unfortunately, parseInputArgs() uses the same return dictionary for all calls. So, calling parseInputArgs() with different values affects all previous calls.

In parseInputArgs(), the line:

default_dict = C_DEFAULT_ARGS

can be replaced by:

default_dict = dict(C_DEFAULT_ARGS)

Thanks!

@marclallen
Copy link
Author

I just took a look at the latest 1.0.0 release and it looks like this has been fixed. No idea if it was due to this ticket or not, but I'm glad it's fixed.

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