mirror of https://github.com/milvus-io/milvus.git
Add alias function wrapper (#8422)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/8431/head
parent
0cc80c7bfd
commit
a3971e656a
|
@ -192,11 +192,29 @@ class ApiCollectionWrapper:
|
|||
check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run()
|
||||
return res, check_result
|
||||
|
||||
def create_alias(self):
|
||||
pass
|
||||
def create_alias(self, alias_name, check_task=None, check_items=None, **kwargs):
|
||||
timeout = kwargs.get("timeout", TIMEOUT)
|
||||
kwargs.update({"timeout": timeout})
|
||||
|
||||
def drop_alias(self):
|
||||
pass
|
||||
func_name = sys._getframe().f_code.co_name
|
||||
res, check = api_request([self.collection.create_alias, alias_name], **kwargs)
|
||||
check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run()
|
||||
return res, check_result
|
||||
|
||||
def alter_alias(self):
|
||||
pass
|
||||
def drop_alias(self, alias_name, check_task=None, check_items=None, **kwargs):
|
||||
timeout = kwargs.get("timeout", TIMEOUT)
|
||||
kwargs.update({"timeout": timeout})
|
||||
|
||||
func_name = sys._getframe().f_code.co_name
|
||||
res, check = api_request([self.collection.drop_alias, alias_name], **kwargs)
|
||||
check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run()
|
||||
return res, check_result
|
||||
|
||||
def alter_alias(self, alias_name, check_task=None, check_items=None, **kwargs):
|
||||
timeout = kwargs.get("timeout", TIMEOUT)
|
||||
kwargs.update({"timeout": timeout})
|
||||
|
||||
func_name = sys._getframe().f_code.co_name
|
||||
res, check = api_request([self.collection.alter_alias, alias_name], **kwargs)
|
||||
check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run()
|
||||
return res, check_result
|
||||
|
|
|
@ -12,7 +12,7 @@ pytest-print==0.2.1
|
|||
pytest-level==0.1.1
|
||||
pytest-xdist==2.2.1
|
||||
# pytest-parallel
|
||||
pymilvus==2.0.0rc7.dev4
|
||||
pymilvus==2.0.0rc7.dev11
|
||||
pytest-rerunfailures==9.1.1
|
||||
git+https://github.com/Projectplace/pytest-tags
|
||||
ndg-httpsclient
|
||||
|
|
Loading…
Reference in New Issue