Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- host = "192.168.122.61"
- port = "8443"
- user = "admin"
- password = "admin"
- b = requests.session()
- b.auth = (user, password)
- b.verify = False
- b.headers.update({'Content-Type':'application/json'})
- results = b.get('https://%s:%s/mgmt/tm/ltm/pool' % (host, port))
- for item in results.json()['items']:
- print item['name']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement