@@ -1055,6 +1055,261 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace
1055
1055
_request_timeout = params .get ('_request_timeout' ),
1056
1056
collection_formats = collection_formats )
1057
1057
1058
+ def patch_cluster_custom_object (self , group , version , plural , name , body , ** kwargs ):
1059
+ """
1060
+ patch the specified cluster scoped custom object
1061
+ This method makes a synchronous HTTP request by default. To make an
1062
+ asynchronous HTTP request, please pass async=True
1063
+ >>> thread = api.patch_cluster_custom_object(group, version, plural, name, body, async=True)
1064
+ >>> result = thread.get()
1065
+
1066
+ :param async bool
1067
+ :param str group: the custom resource's group (required)
1068
+ :param str version: the custom resource's version (required)
1069
+ :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
1070
+ :param str name: the custom object's name (required)
1071
+ :param object body: The JSON schema of the Resource to patch. (required)
1072
+ :return: object
1073
+ If the method is called asynchronously,
1074
+ returns the request thread.
1075
+ """
1076
+ kwargs ['_return_http_data_only' ] = True
1077
+ if kwargs .get ('async' ):
1078
+ return self .patch_cluster_custom_object_with_http_info (group , version , plural , name , body , ** kwargs )
1079
+ else :
1080
+ (data ) = self .patch_cluster_custom_object_with_http_info (group , version , plural , name , body , ** kwargs )
1081
+ return data
1082
+
1083
+ def patch_cluster_custom_object_with_http_info (self , group , version , plural , name , body , ** kwargs ):
1084
+ """
1085
+ patch the specified cluster scoped custom object
1086
+ This method makes a synchronous HTTP request by default. To make an
1087
+ asynchronous HTTP request, please pass async=True
1088
+ >>> thread = api.patch_cluster_custom_object_with_http_info(group, version, plural, name, body, async=True)
1089
+ >>> result = thread.get()
1090
+
1091
+ :param async bool
1092
+ :param str group: the custom resource's group (required)
1093
+ :param str version: the custom resource's version (required)
1094
+ :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required)
1095
+ :param str name: the custom object's name (required)
1096
+ :param object body: The JSON schema of the Resource to patch. (required)
1097
+ :return: object
1098
+ If the method is called asynchronously,
1099
+ returns the request thread.
1100
+ """
1101
+
1102
+ all_params = ['group' , 'version' , 'plural' , 'name' , 'body' ]
1103
+ all_params .append ('async' )
1104
+ all_params .append ('_return_http_data_only' )
1105
+ all_params .append ('_preload_content' )
1106
+ all_params .append ('_request_timeout' )
1107
+
1108
+ params = locals ()
1109
+ for key , val in iteritems (params ['kwargs' ]):
1110
+ if key not in all_params :
1111
+ raise TypeError (
1112
+ "Got an unexpected keyword argument '%s'"
1113
+ " to method patch_cluster_custom_object" % key
1114
+ )
1115
+ params [key ] = val
1116
+ del params ['kwargs' ]
1117
+ # verify the required parameter 'group' is set
1118
+ if ('group' not in params ) or (params ['group' ] is None ):
1119
+ raise ValueError ("Missing the required parameter `group` when calling `patch_cluster_custom_object`" )
1120
+ # verify the required parameter 'version' is set
1121
+ if ('version' not in params ) or (params ['version' ] is None ):
1122
+ raise ValueError ("Missing the required parameter `version` when calling `patch_cluster_custom_object`" )
1123
+ # verify the required parameter 'plural' is set
1124
+ if ('plural' not in params ) or (params ['plural' ] is None ):
1125
+ raise ValueError ("Missing the required parameter `plural` when calling `patch_cluster_custom_object`" )
1126
+ # verify the required parameter 'name' is set
1127
+ if ('name' not in params ) or (params ['name' ] is None ):
1128
+ raise ValueError ("Missing the required parameter `name` when calling `patch_cluster_custom_object`" )
1129
+ # verify the required parameter 'body' is set
1130
+ if ('body' not in params ) or (params ['body' ] is None ):
1131
+ raise ValueError ("Missing the required parameter `body` when calling `patch_cluster_custom_object`" )
1132
+
1133
+
1134
+ collection_formats = {}
1135
+
1136
+ path_params = {}
1137
+ if 'group' in params :
1138
+ path_params ['group' ] = params ['group' ]
1139
+ if 'version' in params :
1140
+ path_params ['version' ] = params ['version' ]
1141
+ if 'plural' in params :
1142
+ path_params ['plural' ] = params ['plural' ]
1143
+ if 'name' in params :
1144
+ path_params ['name' ] = params ['name' ]
1145
+
1146
+ query_params = []
1147
+
1148
+ header_params = {}
1149
+
1150
+ form_params = []
1151
+ local_var_files = {}
1152
+
1153
+ body_params = None
1154
+ if 'body' in params :
1155
+ body_params = params ['body' ]
1156
+ # HTTP header `Accept`
1157
+ header_params ['Accept' ] = self .api_client .\
1158
+ select_header_accept (['application/json' ])
1159
+
1160
+ # HTTP header `Content-Type`
1161
+ header_params ['Content-Type' ] = self .api_client .\
1162
+ select_header_content_type (['application/merge-patch+json' ])
1163
+
1164
+ # Authentication setting
1165
+ auth_settings = ['BearerToken' ]
1166
+
1167
+ return self .api_client .call_api ('/apis/{group}/{version}/{plural}/{name}' , 'PATCH' ,
1168
+ path_params ,
1169
+ query_params ,
1170
+ header_params ,
1171
+ body = body_params ,
1172
+ post_params = form_params ,
1173
+ files = local_var_files ,
1174
+ response_type = 'object' ,
1175
+ auth_settings = auth_settings ,
1176
+ async = params .get ('async' ),
1177
+ _return_http_data_only = params .get ('_return_http_data_only' ),
1178
+ _preload_content = params .get ('_preload_content' , True ),
1179
+ _request_timeout = params .get ('_request_timeout' ),
1180
+ collection_formats = collection_formats )
1181
+
1182
+ def patch_namespaced_custom_object (self , group , version , namespace , plural , name , body , ** kwargs ):
1183
+ """
1184
+ patch the specified namespace scoped custom object
1185
+ This method makes a synchronous HTTP request by default. To make an
1186
+ asynchronous HTTP request, please pass async=True
1187
+ >>> thread = api.patch_namespaced_custom_object(group, version, namespace, plural, name, body, async=True)
1188
+ >>> result = thread.get()
1189
+
1190
+ :param async bool
1191
+ :param str group: the custom resource's group (required)
1192
+ :param str version: the custom resource's version (required)
1193
+ :param str namespace: The custom resource's namespace (required)
1194
+ :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
1195
+ :param str name: the custom object's name (required)
1196
+ :param object body: The JSON schema of the Resource to patch. (required)
1197
+ :return: object
1198
+ If the method is called asynchronously,
1199
+ returns the request thread.
1200
+ """
1201
+ kwargs ['_return_http_data_only' ] = True
1202
+ if kwargs .get ('async' ):
1203
+ return self .patch_namespaced_custom_object_with_http_info (group , version , namespace , plural , name , body , ** kwargs )
1204
+ else :
1205
+ (data ) = self .patch_namespaced_custom_object_with_http_info (group , version , namespace , plural , name , body , ** kwargs )
1206
+ return data
1207
+
1208
+ def patch_namespaced_custom_object_with_http_info (self , group , version , namespace , plural , name , body , ** kwargs ):
1209
+ """
1210
+ patch the specified namespace scoped custom object
1211
+ This method makes a synchronous HTTP request by default. To make an
1212
+ asynchronous HTTP request, please pass async=True
1213
+ >>> thread = api.patch_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, async=True)
1214
+ >>> result = thread.get()
1215
+
1216
+ :param async bool
1217
+ :param str group: the custom resource's group (required)
1218
+ :param str version: the custom resource's version (required)
1219
+ :param str namespace: The custom resource's namespace (required)
1220
+ :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required)
1221
+ :param str name: the custom object's name (required)
1222
+ :param object body: The JSON schema of the Resource to patch. (required)
1223
+ :return: object
1224
+ If the method is called asynchronously,
1225
+ returns the request thread.
1226
+ """
1227
+
1228
+ all_params = ['group' , 'version' , 'namespace' , 'plural' , 'name' , 'body' ]
1229
+ all_params .append ('async' )
1230
+ all_params .append ('_return_http_data_only' )
1231
+ all_params .append ('_preload_content' )
1232
+ all_params .append ('_request_timeout' )
1233
+
1234
+ params = locals ()
1235
+ for key , val in iteritems (params ['kwargs' ]):
1236
+ if key not in all_params :
1237
+ raise TypeError (
1238
+ "Got an unexpected keyword argument '%s'"
1239
+ " to method patch_namespaced_custom_object" % key
1240
+ )
1241
+ params [key ] = val
1242
+ del params ['kwargs' ]
1243
+ # verify the required parameter 'group' is set
1244
+ if ('group' not in params ) or (params ['group' ] is None ):
1245
+ raise ValueError ("Missing the required parameter `group` when calling `patch_namespaced_custom_object`" )
1246
+ # verify the required parameter 'version' is set
1247
+ if ('version' not in params ) or (params ['version' ] is None ):
1248
+ raise ValueError ("Missing the required parameter `version` when calling `patch_namespaced_custom_object`" )
1249
+ # verify the required parameter 'namespace' is set
1250
+ if ('namespace' not in params ) or (params ['namespace' ] is None ):
1251
+ raise ValueError ("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object`" )
1252
+ # verify the required parameter 'plural' is set
1253
+ if ('plural' not in params ) or (params ['plural' ] is None ):
1254
+ raise ValueError ("Missing the required parameter `plural` when calling `patch_namespaced_custom_object`" )
1255
+ # verify the required parameter 'name' is set
1256
+ if ('name' not in params ) or (params ['name' ] is None ):
1257
+ raise ValueError ("Missing the required parameter `name` when calling `patch_namespaced_custom_object`" )
1258
+ # verify the required parameter 'body' is set
1259
+ if ('body' not in params ) or (params ['body' ] is None ):
1260
+ raise ValueError ("Missing the required parameter `body` when calling `patch_namespaced_custom_object`" )
1261
+
1262
+
1263
+ collection_formats = {}
1264
+
1265
+ path_params = {}
1266
+ if 'group' in params :
1267
+ path_params ['group' ] = params ['group' ]
1268
+ if 'version' in params :
1269
+ path_params ['version' ] = params ['version' ]
1270
+ if 'namespace' in params :
1271
+ path_params ['namespace' ] = params ['namespace' ]
1272
+ if 'plural' in params :
1273
+ path_params ['plural' ] = params ['plural' ]
1274
+ if 'name' in params :
1275
+ path_params ['name' ] = params ['name' ]
1276
+
1277
+ query_params = []
1278
+
1279
+ header_params = {}
1280
+
1281
+ form_params = []
1282
+ local_var_files = {}
1283
+
1284
+ body_params = None
1285
+ if 'body' in params :
1286
+ body_params = params ['body' ]
1287
+ # HTTP header `Accept`
1288
+ header_params ['Accept' ] = self .api_client .\
1289
+ select_header_accept (['application/json' ])
1290
+
1291
+ # HTTP header `Content-Type`
1292
+ header_params ['Content-Type' ] = self .api_client .\
1293
+ select_header_content_type (['application/merge-patch+json' ])
1294
+
1295
+ # Authentication setting
1296
+ auth_settings = ['BearerToken' ]
1297
+
1298
+ return self .api_client .call_api ('/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' , 'PATCH' ,
1299
+ path_params ,
1300
+ query_params ,
1301
+ header_params ,
1302
+ body = body_params ,
1303
+ post_params = form_params ,
1304
+ files = local_var_files ,
1305
+ response_type = 'object' ,
1306
+ auth_settings = auth_settings ,
1307
+ async = params .get ('async' ),
1308
+ _return_http_data_only = params .get ('_return_http_data_only' ),
1309
+ _preload_content = params .get ('_preload_content' , True ),
1310
+ _request_timeout = params .get ('_request_timeout' ),
1311
+ collection_formats = collection_formats )
1312
+
1058
1313
def replace_cluster_custom_object (self , group , version , plural , name , body , ** kwargs ):
1059
1314
"""
1060
1315
replace the specified cluster scoped custom object
0 commit comments