@@ -1100,4 +1100,26 @@ def transfer_replica(self, client, source_group, target_group, collection_name,
1100
1100
source_group = source_group , target_group = target_group ,
1101
1101
collection_name = collection_name , num_replicas = num_replicas ,
1102
1102
** kwargs ).run ()
1103
+ return res , check_result
1104
+
1105
+ @trace ()
1106
+ def create_field_schema (self , client , name , data_type , desc = '' , timeout = None , check_task = None , check_items = None , ** kwargs ):
1107
+ timeout = TIMEOUT if timeout is None else timeout
1108
+ kwargs .update ({"timeout" : timeout })
1109
+
1110
+ func_name = sys ._getframe ().f_code .co_name
1111
+ res , check = api_request ([client .create_field_schema , name , data_type , desc ], ** kwargs )
1112
+ check_result = ResponseChecker (res , func_name , check_task , check_items , check ,
1113
+ ** kwargs ).run ()
1114
+ return res , check_result
1115
+
1116
+ @trace ()
1117
+ def add_collection_field (self , client , collection_name , field_name , data_type , desc = "" , timeout = None , check_task = None , check_items = None , ** kwargs ):
1118
+ timeout = TIMEOUT if timeout is None else timeout
1119
+ kwargs .update ({"timeout" : timeout })
1120
+
1121
+ func_name = sys ._getframe ().f_code .co_name
1122
+ res , check = api_request ([client .add_collection_field , collection_name , field_name , data_type , desc ], ** kwargs )
1123
+ check_result = ResponseChecker (res , func_name , check_task , check_items , check ,
1124
+ ** kwargs ).run ()
1103
1125
return res , check_result
0 commit comments