[skip ci] Reformat milvus operator file (#10947)

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
This commit is contained in:
ThreadDao 2021-10-30 16:18:39 +08:00 committed by GitHub
parent 0fe88c0571
commit 19abf7cd70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ from benedict import benedict
from utils.util_log import test_log as log from utils.util_log import test_log as log
from common.cus_resource_opts import CustomResourceOperations as CusResource from common.cus_resource_opts import CustomResourceOperations as CusResource
template_yaml = 'template/default.yaml' template_yaml = 'template/default.yaml'
MILVUS_GRP = 'milvus.io' MILVUS_GRP = 'milvus.io'
MILVUS_VER = 'v1alpha1' MILVUS_VER = 'v1alpha1'
@ -17,7 +16,6 @@ class MilvusOperator(object):
self.version = MILVUS_VER self.version = MILVUS_VER
self.plural = MILVUS_PLURAL.lower() self.plural = MILVUS_PLURAL.lower()
@staticmethod @staticmethod
def _update_configs(configs, template=None): def _update_configs(configs, template=None):
""" """
@ -120,7 +118,7 @@ class MilvusOperator(object):
res_object = cus_res.get(release_name) res_object = cus_res.get(release_name)
if res_object.get('status', None) is not None: if res_object.get('status', None) is not None:
if 'Healthy' == res_object['status']['status']: if 'Healthy' == res_object['status']['status']:
log.info(f"milvus healthy in {time.time()-starttime} seconds") log.info(f"milvus healthy in {time.time() - starttime} seconds")
return True return True
log.info(f"end to check healthy until timeout {timeout}") log.info(f"end to check healthy until timeout {timeout}")
return False return False
@ -141,7 +139,6 @@ class MilvusOperator(object):
if __name__ == '__main__': if __name__ == '__main__':
namespace = 'chaos-testing' namespace = 'chaos-testing'
image = "master-20211027-c51155a" image = "master-20211027-c51155a"
name = f'milvus-{image.split("-")[2]}' name = f'milvus-{image.split("-")[2]}'
@ -171,4 +168,3 @@ if __name__ == '__main__':
# print(endpoint) # print(endpoint)
# milvusOp.uninstall(name, namespace=namespace) # milvusOp.uninstall(name, namespace=namespace)