python
51 TopicsMicrosoft 365 IP Steering python script
Hello! Hola! I have created a small and rudimentary script that generates a datagroup with MS 365 IPv4 and v6 addresses to be used by an iRule or policy. There are other scripts that solve this same issue but either they were: based on iRulesLX, which forces you to enable iRuleLX only for this, and made me run into issues when upgrading (memory table got filled with nonsense) based on the XML version of the list, which MS changed to a JSON file. This script is a super simple bash script that calls another super simple python file, and a couple of helper files. The biggest To Do are: Add a more secure approach to password usage. Right now, it is stored in a parameters file locked away with permissions. There should be a better way. Add support for URLs. You can find the contents here:https://github.com/teoiovine-novared/fetch-office365/tree/main I appreciate advice, (constructive) criticism and questions all the same! Thank you for your time.106Views1like3CommentsHow to install a cert and a key through Python SDK
I am trying to install a cert and a key through Python SDK. BIG-IP Version: 12.1.2 First.. I had no problem with uploading certs and keys to F5's /var/config/rest/downloads/ folder. Now when I tried the following python code to install cert and key, I didn't see any error. key = bitip.tm.sys.file.ssl_keys.ssl_key.create(name='test', partition='Common', sourcePath='file:/var/config/rest/downloads/test.key') cert = bitip.tm.sys.file.ssl_certs.ssl_cert.create(name='test', partition='Common', sourcePath='file:/var/config/rest/downloads/test.crt') However when I logged on BIG-IP device and clicked a cert or key to see their actual content, I couldn't see any content. "No certificate" under certificate tab and an error message of "An error has occurred while trying to process your request." under Key tab. Does any one know what is causing this problem? Or is there any way I can troubleshoot this issue? Thank you.1KViews1like4CommentsHow to get all servers in a GTM pool (Python f5-sdk)
I am sure this is quite simple but I can't find reference to this in documentation. pool = mgmt.tm.gtm.pools.a_s.a.load(name='poolname') Once i've loaded it, how can I see what servers are in this pool and get their name(s)? I would also like to do the same with wideips, gather all pools in each one to see if a particular pool is being used by it. (Version 12)994Views1like2CommentsAdd FQDN Node to a Pool with autopopulate enable
Hey Team, I encountered some issues on the cluster of the LB if I add FQDN Nodes to the pool. As per F5 support we have to add the nodes to the pool with the Auto Populate Enable since that can cause problems. I am trying to find a way when we add the nodes with that feature on however i am not able to find it This is my code defadd_node_to_pool(self,node_name,pool_name,port_number): #methodtoaddnodetothepoolcreated my_pool_add=self.mgmt.tm.ltm.pools.pool.load(name=pool_name) my_pool_add.members_s.members.create(partition='Common',name=node_name+':'+port_number) my_pool_add.update() print('Node'+node_name+'addedtopool'+pool_name)475Views1like1Comment