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.7KViews0likes2Commentspython 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.Solved3.3KViews0likes10CommentsUpload 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. -- Oguz1.3KViews0likes2CommentsCPU, 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! MikeSolved963Views0likes3CommentsUse 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.880Views0likes6CommentsHow 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?783Views0likes5CommentsSet 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.746Views0likes5CommentsF5 iControl & Python for Beginners
Folks, There's been lot of iControl Rest and Python stuff going on. I recently downloaded Python SDK from here https://github.com/F5Networks/f5-common-python. I have downloaded python 2.7 and 3.6 as well. I'm running v12.1.2 on my f5 appliances. FYI, I'm a fresher when it comes to Python. Now the silly question, What do i do? What do i do before i run a python script? Do i need to copy the SDK folder on to Python installed folder? All I'm looking for is a way to integrate F5 Python SDK and Python to run my 1st script. Any help is appreciated! Thanks in advance! Hope this helps new folks trying to run python on F5.626Views0likes4Comments