Created
September 7, 2017 10:32
-
-
Save karmab/6bc35f1a10089d5e15a03fff5e076f35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment