def status(cls, snapshot_url): """ Returns the status code of snapshot. Can be used to know when the snapshot is ready for download. :param snapshot_url: snapshot URL to check :type snapshot_url: string url :returns: Dictionary representing the API's JSON response """ snap_path = urlparse(snapshot_url).path snap_path = snap_path.split('/snapshot/view/')[1].split('.png')[0] snapshot_status_url = '/graph/snapshot_status/{0}'.format(snap_path) return super(Graph, cls)._trigger_action('GET', snapshot_status_url)
def status(cls, snapshot_url): """ Returns the status code of snapshot. Can be used to know when the snapshot is ready for download. :param snapshot_url: snapshot URL to check :type snapshot_url: string url :returns: JSON response from HTTP API request """ snap_path = urlparse(snapshot_url).path snap_path = snap_path.split("/snapshot/view/")[1].split(".png")[0] snapshot_status_url = "/graph/snapshot_status/{0}".format(snap_path) return super(Graph, cls)._trigger_action("GET", snapshot_status_url)