def get_app_live_metrics(self, cluster_id, app_alias): """List all living metrics""" resp = self.http.get( url_maker("/clusters", cluster_id, "apps", app_alias, "metrics")) return self.process_data(resp)
def get_app_history_metrics(self, cluster_id, app_alias): """List app history metrics""" resp = self.http.get( url_maker("/clusters", cluster_id, "apps", app_alias, "monitor")) return self.process_data(resp)
def get_app_requests(self, cluster_id, app_alias): """List app's requests for per second""" resp = self.http.get( url_maker("/clusters", cluster_id, "apps", app_alias, "session")) return self.process_data(resp)
def get_app_version(self, app_id, version_id): """List all history versions for app""" resp = self.http.get(url_maker("/apps", app_id, "versions", version_id)) return self.process_data(resp)
def get_app_tasks(self, app_id): """List a specific app's tasks""" resp = self.http.get(url_maker("/apps", app_id, "tasks")) return self.process_data(resp)
def restart_app(self, app_id): """Delete specified app""" resp = self.http.post(url_maker("/apps", app_id, "restart")) return self.process_data(resp)
def delete_app(self, app_id): """Delete specified app""" resp = self.http.delete(url_maker("/apps", app_id)) return self.process_data(resp)
def update_app(self, app_id, **kwargs): """Updated app configuration""" resp = self.http.put(url_maker("/apps", app_id), data=kwargs) return self.process_data(resp)
def get_app(self, app_id): """List specified app information under specified cluster""" resp = self.http.get(url_maker("/apps", app_id)) return self.process_data(resp)
def get_cluster_resource_metrics(self, cluster_id): """List cluster metrics""" resp = self.http.get(url_maker("/clusters", cluster_id, "metrics")) return self.process_data(resp)
def get_group(self, group_id): """Get specified group""" resp = self.http.get(url_maker("/groups", group_id)) return self.process_data(resp)
def get_uri(self, registry_id): """Get sepcific registry's certification file uri""" resp = self.http.get(url_maker("/uri", registry_id)) return self.process_data(resp)
def delete_registry(self, registry_id): """Delete specific registry""" resp = self.http.delete(url_maker("/external_registries", registry_id)) return self.process_data(resp)
def update_registry(self, registry_id, **kwargs): """Update specific registry""" resp = self.http.put(url_maker("/external_registries", registry_id), data=kwargs) return self.process_data(resp)
def get_registry(self, registry_id): """Get specific third party registry""" resp = self.http.get(url_maker("/external_registries", registry_id)) return self.process_data(resp)