F5 sdk snippets
Jump to navigation
Jump to search
import requests import os requests.packages.urllib3.disable_warnings() url = "https://foo.example.com/mgmt/tm/ltm/virtual" AD_USER = os.getenv('AD_USER') AD_PASS = os.environ.get('AD_PASS') session = requests.Session() session.auth = (AD_USER, AD_PASS) r = session.get(url, verify=False) r.json()['entries']['https://localhost/mgmt/tm/ltm/virtual/~QA~vs_qa.mktp.io_int_https/stats']['nestedStats']['entries']