F5 Friday: Python SDK for BIG-IP
Published Mar 11, 2016
Version 1.0Was this article helpful?
I'm trying part of the sample code to learn this and I'm getting security warnings.
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.htmlssl-warnings
After reading the information listed and applying the code cited I still get the same error. I've tried disabling warnings as well as verifying the certs but neither works. Anyone have any ideas as to what I'm doing wrong? Thank you..
import urllib3
urllib3.disable_warnings()
import certifi
import urllib3
http = urllib3.PoolManager(
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where())
import requests
from f5.bigip import BigIP
Connect to the BigIP
bigip = BigIP("address", "admin", "pw")
Get a list of all pools on the BigIP and print their name and their
members' name
pools = bigip.ltm.pools.get_collection()
for pool in pools:
print (pool.name)
for member in pool.members_s.get_collection():
print (member.name)