f5-common-python
f5-common-python copied to clipboard
RFE: Support for specifying auth token to use
ICR added the ability to specify the auth token to use in https://github.com/F5Networks/f5-icontrol-rest-python/pull/138.
Please add support for this parameter to the SDK.
Using:
f5-icontrol-rest==1.3.11
f5-sdk==3.0.20
I get the following:
mgmt = ManagementRoot(
hostname,
username,
password,
token=True,
token_to_use='my_big_token_from_another_connection',
)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../f5env/lib/python3.6/site-packages/f5/bigip/__init__.py", line 169, in __init__
hostname, username, password, **kwargs
File ".../f5env/lib/python3.6/site-packages/f5/bigip/__init__.py", line 55, in __init__
hostname, username, password, **kwargs
File ".../f5env/lib/python3.6/site-packages/f5/bigip/__init__.py", line 72, in parse_arguments
raise TypeError('Unexpected **kwargs: %r' % kwargs)
TypeError: Unexpected **kwargs: {'token_to_use': 'my_big_token_from_another_connection'}
PR #1511 added to try and get this rolling