Created
October 9, 2018 23:17
-
-
Save pbrandiezs/3f201310bb5497033372097dcbb64abd to your computer and use it in GitHub Desktop.
Python code to get ipaddr in PureApp
This file contains 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
#!/usr/bin/python | |
import json | |
from pprint import pprint | |
with open('/0config/network.json') as json_data: | |
d = json.load(json_data) | |
myNetworkInfo = d["networkInfo"] | |
# pprint(myNetworkInfo) | |
for item in myNetworkInfo: | |
print item["ipaddr"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment