def get_namespace(self, params=None): """获取namesapce,计算数量使用""" if not params: params = {"cluster_id": self.cluster_id} if isinstance(params, dict): params["cluster_id"] = self.cluster_id namespace = resources.Namespace(self.api_client) return namespace.get_namespace(params)
def delete_namespace(self, name): namespace = resources.Namespace(self.api_client) return namespace.delete_namespace(name)
def create_namespace(self, data): namespace = resources.Namespace(self.api_client) return namespace.create_namespace(data)