Tim_18689
Dec 13, 2017Cirrus
How do I retrieve the BIG-IP version using F5-SDK?
I am trying to figure out how to get the running version of a BIG-IP using the F5-sdk. I am able to get it by making a REST request:
restcurl -u admin:admin '/mgmt/tm/sys/version?$select=Product,Version,Build,Edition'
{ "entries": {
"https://localhost/mgmt/tm/sys/version/0": {
"nestedStats": {
"entries": {
"Build": {
"description": "2.234.1671"
},
"Edition": {
"description": "Engineering Hotfix HF2"
},
"Product": {
"description": "BIG-IP"
},
"Version": {
"description": "13.0.0"
...
I cannot seem to find a way to do this with the SDK.
>>> from f5.bigip import ManagementRoot
>>> mgmt = ManagementRoot('10.97.243.52', 'admin', 'admin')
>>> globalSettings = mgmt.tm.sys.global_settings.load()
>>> print globalSettings.hostname
host1.example.com
>>> mgmt.tm.sys.version
Traceback (most recent call last):
File "", line 1, in
File "/home/tech1/.local/lib/python2.7/site-packages/f5/bigip/mixins.py", line 102, in __getattr__
raise AttributeError(error_message)
AttributeError: '' object has no attribute 'version'
Can anyone point in the right direction?