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

can't load pool objects after created it with transaction #1550

Open
Sinan828 opened this issue Feb 25, 2020 · 0 comments
Open

can't load pool objects after created it with transaction #1550

Sinan828 opened this issue Feb 25, 2020 · 0 comments

Comments

@Sinan828
Copy link

Sinan828 commented Feb 25, 2020

I can't use F5 SDK load pool objects after created it.

from f5.bigip import ManagementRoot from f5.bigip.contexts import TransactionContextManager if __name__ == "__main__": for x in range(1, 50): mgmt = ManagementRoot('10.5.10.23', 'admin', 'XXXX', token=True) tx = mgmt.tm.transactions.transaction with TransactionContextManager(tx) as api: name = 'pool' + str(x) api.tm.ltm.pools.pool.create(name=name, partition='Common') p = api.tm.ltm.pools.pool.load(name=name, partition='Common') p.delete() api.tm.util.bash.exec_cmd( command='run', utilCmdArgs="-c 'tmsh save sys config'" )

Traceback (most recent call last): File "/Users/sinwang/PycharmProjects/f5_sdk_transaction.py", line 31, in <module> p = api.tm.ltm.pools.pool.load(name=name, partition='Common') File "/Users/sinwang/PycharmProjects/venv/lib/python2.7/site-packages/f5/bigip/resource.py", line 1110, in load return self._load(**kwargs) File "/Users/sinwang/PycharmProjects/venv/lib/python2.7/site-packages/f5/bigip/resource.py", line 1084, in _load response = refresh_session.get(base_uri, **kwargs) File "/Users/sinwang/PycharmProjects/venv/lib/python2.7/site-packages/icontrol/session.py", line 295, in wrapper raise iControlUnexpectedHTTPError(error_message, response=response) icontrol.exceptions.iControlUnexpectedHTTPError: 404 Unexpected Error: Not Found for uri: https://10.5.10.23:443/mgmt/tm/ltm/pool/~Common~pool1 Text: u'{"code":404,"message":"01020036:3: The requested Pool (/Common/pool1) was not found.","errorStack":[],"apiError":3}'

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