Esempio n. 1
0
 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)
Esempio n. 2
0
 def delete_namespace(self, name):
     namespace = resources.Namespace(self.api_client)
     return namespace.delete_namespace(name)
Esempio n. 3
0
 def create_namespace(self, data):
     namespace = resources.Namespace(self.api_client)
     return namespace.create_namespace(data)