f5 python sdk
33 TopicsGetting module 'signal' has no attribute 'SIGALRM' error from f5-sdk on Windows
Hi, I am trying to use python sdk for F5 from here https://github.com/F5Networks/f5-common-python. I am on Windows. I am running Python 3 (tried python 3.3.5 and python 3.5.4). I am getting the following error when I run this (some information masked): from import ManagementRoot mgmt = ManagementRoot("...", "...", "...") File "...\lib\site-packages\f5\bigip__init__.py", line 150, in init self.post_configuration_setup() File "...\lib\site-packages\f5\bigip__init__.py", line 111, in post_configuration_setup self._get_tmos_version() File "...\lib\site-packages\f5\bigip__init__.py", line 117, in _get_tmos_version signal.signal(signal.SIGALRM, timeout_handler) AttributeError: module 'signal' has no attribute 'SIGALRM' Pip shows it installed version 3.0.8 of f5-sdk. How can I run this from python? Thanks.Solved3.5KViews0likes2Commentspython show running-config
I am trying to get a Python script to output the running config of my F5, to show everything from authentication to pools to ntp settings. With TMSH/SSH it's so easy doing 'show running-config' and then saving that output. Is there anything similar to this that I can do with the Python F5-SDK? I am trying to generate this in a cleaner fashion than 'show running-config' does it as I use this for PCI compliance evidence. Any help would be appreciated. To muddy the waters a bit I am EXTREMELY new to F5 products.Solved2.9KViews0likes10CommentsUpload programatically external data group file?
Hi everyone, I use external data group file contains more than 350K records. And now I would like to programmatically update (overwrite) the data group file for the automation process. I did some research and found something bigsuds library but the python version we used is not supported. Does someone have any idea about uploading external data group file using python? F5 version is 12.1.3.3 Python version is 3.7.0. Thanks in advance. -- Oguz1KViews0likes2CommentsCPU, memory, disk usage and http profile using the BIG-IP Python SDK
I've been busy with the Python SDK for a couple of weeks now. While I managed to get a lot of information out of it, I'm struggling with a couple of API endpoints. Does anyone have an idea where I can find the statistics for CPU, Memory, Disk as well as the http profile? REST endpoints: mgmt/tm/sys/hostInfo (for CPU and memory) mgmt/tm/sys/disk/logical-disk (for disks) mgmt/tm/ltm/profile/http/stats (for http profile) Thanks! MikeSolved899Views0likes3CommentsUse F5 Python SDK to Create Node with Pool in Separate Partition
I have seen multiple samples on creating a pool and loading a member in that pool. I have looked at the "; for creating nodes but so far I am not getting the idea. Is there a way using Python Rest or Python SDK to create a node in the common partition with no pool? After the node is loaded I will then take that node and use it in a pool/s but the pool/s are in different partition.799Views0likes6CommentsHow 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?701Views0likes5CommentsSet a Virtual Server Type in F5 Python SDK
Can I set up a Virtual Server Type, among the existing, for example Standard, Performance (Layer 4), Performance (HTTP), or Forwarding IP? When I create a Virtual Server, by default it is created with the Performance (Layer 4) type. Thanks in advance.651Views0likes5CommentsAdding Client, Server, and SSL profiles to a VIP via the SDK
I've been able to successfully build out a VIP, pool, and nodes then bind them all together using the f5-sdk however I'm running into issues with adding profiles to the VIP's. I'm using the following code to try and update an existing VIP with an existing profile: mgmt = ManagementRoot("x.x.x.x", "username", "password") vip_resource = mgmt.tm.ltm.virtuals.virtual.load(partition='CDE-DMZ', name='test_vip-https-443') for profile in vip_resource.profiles_s.get_collection(): print(profile) Anyone else bang their head over this issue? I can see profiles attached via the GUI but I can't get them to work via the SDK. Any help would be appreciated.511Views0likes2Comments