Forum Discussion
Jason_Nance
Nimbostratus
Sep 25, 2018REST Call Timeout - Python SDK
Running 11.6.0 HF5 the following Python SDK call:
mgmt.tm.util.bash.exec_cmd(
command='run',
utilCmdArgs="-c 'tmsh save /sys ucs /var/local/ucs/f5-create-backup-python.ucs'",
)
...
Lee_Sutcliffe
Nacreous
Sep 25, 2018I use this method to increase the timeout using the REST API, so you may be able to translate it for the SDK. (sorry Python SDK isn't my strong point)
curl -X POST \
'https://bigip1.local/mgmt/shared/authn/login' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"username":"admin",
"password":"admin",
"loginProviderName": "tmos"
}'
This will respond with a JSON body containing a token (token.token) Use this token on a second request to extend your timeout. If your token was ABCDEFGHIJKMLNOPQRSTUVWXYZ, your second request would look like this:
curl -X PATCH \
https://bigip1.local/mgmt/shared/authz/tokens/ABCDEFGHIJKMLNOPQRSTUVWXYZ \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"timeout":"36000"
}'
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects