def measures_list(cls, resource_id=None, metric_name=None, param=None): url = cls.format_url() + settings.measures_list_url.format( resource_id=resource_id, metric_name=metric_name, query=param) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def resource_detail(cls, resource_id=None): url = cls.format_url() + settings.resource_detail_url.format( resource_id=resource_id) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def measure_detail(cls, metric_id=None, param=None): url = cls.format_url() + settings.measure_detail_url.format( metric_id=metric_id, query=param) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def list_stacks(cls, tenant_id=None): url = cls.format_url() + settings.list_stacks_url.format( tenant_id=tenant_id) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def validate_template(cls, tenant_id=None): url = cls.format_url() + settings.template_versions_list_url.format( tenant_id=tenant_id) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def suspend_stack(cls, tenant_id=None, stack_name=None, stack_id=None): url = cls.format_url() + settings.suspend_stack_url.format( tenant_id=tenant_id, stack_name=stack_name, stack_id=stack_id, ) response = RequestMethod.post(url=url, data={'suspend': ''}) print "status_code: %s" % response.status_code return response.content
def show_stacks_details(cls, tenant_id=None, stack_name=None, stack_id=None): url = cls.format_url() + settings.show_stack_details_url.format( tenant_id=tenant_id, stack_name=stack_name, stack_id=stack_id) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def resource_history(cls, resource_type="generic", resource_id=None, history=None, param=None): url = cls.format_url() + settings.resource_history_url.format( resource_type=resource_type, resource_id=resource_id, history=history, query=param) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content
def resource_list(cls, param=None): url = cls.format_url() + settings.resource_list_url.format(query=param) response = RequestMethod.get(url=url) print "status_code: %s" % response.status_code content = json.loads(response.content) return content