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
import urllib, json, time | |
def getUrl(path): | |
""" Makes an OpsCenter API call to the given path """ | |
url = 'http://localhost:8888/%s' % path | |
contents = urllib.urlopen(url).read() | |
return json.loads(contents) | |
def pollCluster(cluster_id): |