(self, method, path, body=None, **params)
| 210 | |
| 211 | @meta_request |
| 212 | def request(self, method, path, body=None, **params): |
| 213 | if not path.startswith('/'): |
| 214 | path = '/' + path |
| 215 | |
| 216 | path_params = params.get('path_params', {}) |
| 217 | query_params = params.get('query_params', []) |
| 218 | if params.get('pretty') is not None: |
| 219 | query_params.append(('pretty', params['pretty'])) |
| 220 | if params.get('_continue') is not None: |
| 221 | query_params.append(('continue', params['_continue'])) |
| 222 | if params.get('include_uninitialized') is not None: |
| 223 | query_params.append(('includeUninitialized', params['include_uninitialized'])) |
| 224 | if params.get('field_selector') is not None: |
| 225 | query_params.append(('fieldSelector', params['field_selector'])) |
| 226 | if params.get('label_selector') is not None: |
| 227 | query_params.append(('labelSelector', params['label_selector'])) |
| 228 | if params.get('limit') is not None: |
| 229 | query_params.append(('limit', params['limit'])) |
| 230 | if params.get('resource_version') is not None: |
| 231 | query_params.append(('resourceVersion', params['resource_version'])) |
| 232 | if params.get('timeout_seconds') is not None: |
| 233 | query_params.append(('timeoutSeconds', params['timeout_seconds'])) |
| 234 | if params.get('watch') is not None: |
| 235 | query_params.append(('watch', params['watch'])) |
| 236 | if params.get('grace_period_seconds') is not None: |
| 237 | query_params.append(('gracePeriodSeconds', params['grace_period_seconds'])) |
| 238 | if params.get('propagation_policy') is not None: |
| 239 | query_params.append(('propagationPolicy', params['propagation_policy'])) |
| 240 | if params.get('orphan_dependents') is not None: |
| 241 | query_params.append(('orphanDependents', params['orphan_dependents'])) |
| 242 | if params.get('dry_run') is not None: |
| 243 | query_params.append(('dryRun', params['dry_run'])) |
| 244 | if params.get('field_manager') is not None: |
| 245 | query_params.append(('fieldManager', params['field_manager'])) |
| 246 | if params.get('force_conflicts') is not None: |
| 247 | query_params.append(('force', params['force_conflicts'])) |
| 248 | if params.get('allow_watch_bookmarks') is not None: |
| 249 | query_params.append(('allowWatchBookmarks', params['allow_watch_bookmarks'])) |
| 250 | |
| 251 | header_params = params.get('header_params', {}) |
| 252 | form_params = [] |
| 253 | local_var_files = {} |
| 254 | |
| 255 | # Checking Accept header. |
| 256 | new_header_params = {key.lower(): value for key, value in header_params.items()} |
| 257 | if not 'accept' in new_header_params: |
| 258 | header_params['Accept'] = self.client.select_header_accept([ |
| 259 | 'application/json', |
| 260 | 'application/yaml', |
| 261 | ]) |
| 262 | |
| 263 | # HTTP header `Content-Type` |
| 264 | if params.get('content_type'): |
| 265 | header_params['Content-Type'] = params['content_type'] |
| 266 | else: |
| 267 | header_params['Content-Type'] = self.client.select_header_content_type(['*/*']) |
| 268 | |
| 269 | # Authentication setting |
no test coverage detected