cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
resources__admin_only_api.py
Go to the documentation of this file.
1 # coding: utf-8
2 
3 """
4  cloudFPGA Resource Manager API
5 
6  No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7 
8  OpenAPI spec version: 0.8
9 
10  Generated by: https://github.com/swagger-api/swagger-codegen.git
11 """
12 
13 from __future__ import absolute_import
14 
15 import re # noqa: F401
16 
17 # python 2 and python 3 compatibility library
18 import six
19 
20 from swagger_client.api_client import ApiClient
21 
22 
23 class ResourcesAdminOnlyApi(object):
24  """NOTE: This class is auto generated by the swagger code generator program.
25 
26  Do not edit the class manually.
27  Ref: https://github.com/swagger-api/swagger-codegen
28  """
29 
30  def __init__(self, api_client=None):
31  if api_client is None:
32  api_client = ApiClient()
33  self.api_clientapi_client = api_client
34 
35  def cf_manager_rest_api_delete_resource(self, username, password, resource_id, **kwargs): # noqa: E501
36  """Remove a resource # noqa: E501
37 
38  Please Note, after the deletion of a resource, the freed resource-id will be assigned again for new resources. # noqa: E501
39  This method makes a synchronous HTTP request by default. To make an
40  asynchronous HTTP request, please pass async_req=True
41  >>> thread = api.cf_manager_rest_api_delete_resource(username, password, resource_id, async_req=True)
42  >>> result = thread.get()
43 
44  :param async_req bool
45  :param str username: OpenStack username (required)
46  :param str password: OpenStack password (required)
47  :param str resource_id: cloudFPGA resource unique identifier (required)
48  :return: None
49  If the method is called asynchronously,
50  returns the request thread.
51  """
52  kwargs['_return_http_data_only'] = True
53  if kwargs.get('async_req'):
54  return self.cf_manager_rest_api_delete_resource_with_http_infocf_manager_rest_api_delete_resource_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
55  else:
56  (data) = self.cf_manager_rest_api_delete_resource_with_http_infocf_manager_rest_api_delete_resource_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
57  return data
58 
59  def cf_manager_rest_api_delete_resource_with_http_info(self, username, password, resource_id, **kwargs): # noqa: E501
60  """Remove a resource # noqa: E501
61 
62  Please Note, after the deletion of a resource, the freed resource-id will be assigned again for new resources. # noqa: E501
63  This method makes a synchronous HTTP request by default. To make an
64  asynchronous HTTP request, please pass async_req=True
65  >>> thread = api.cf_manager_rest_api_delete_resource_with_http_info(username, password, resource_id, async_req=True)
66  >>> result = thread.get()
67 
68  :param async_req bool
69  :param str username: OpenStack username (required)
70  :param str password: OpenStack password (required)
71  :param str resource_id: cloudFPGA resource unique identifier (required)
72  :return: None
73  If the method is called asynchronously,
74  returns the request thread.
75  """
76 
77  all_params = ['username', 'password', 'resource_id'] # noqa: E501
78  all_params.append('async_req')
79  all_params.append('_return_http_data_only')
80  all_params.append('_preload_content')
81  all_params.append('_request_timeout')
82 
83  params = locals()
84  for key, val in six.iteritems(params['kwargs']):
85  if key not in all_params:
86  raise TypeError(
87  "Got an unexpected keyword argument '%s'"
88  " to method cf_manager_rest_api_delete_resource" % key
89  )
90  params[key] = val
91  del params['kwargs']
92  # verify the required parameter 'username' is set
93  if ('username' not in params or
94  params['username'] is None):
95  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_delete_resource`") # noqa: E501
96  # verify the required parameter 'password' is set
97  if ('password' not in params or
98  params['password'] is None):
99  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_delete_resource`") # noqa: E501
100  # verify the required parameter 'resource_id' is set
101  if ('resource_id' not in params or
102  params['resource_id'] is None):
103  raise ValueError("Missing the required parameter `resource_id` when calling `cf_manager_rest_api_delete_resource`") # noqa: E501
104 
105  collection_formats = {}
106 
107  path_params = {}
108  if 'resource_id' in params:
109  path_params['resource_id'] = params['resource_id'] # noqa: E501
110 
111  query_params = []
112  if 'username' in params:
113  query_params.append(('username', params['username'])) # noqa: E501
114  if 'password' in params:
115  query_params.append(('password', params['password'])) # noqa: E501
116 
117  header_params = {}
118 
119  form_params = []
120  local_var_files = {}
121 
122  body_params = None
123  # Authentication setting
124  auth_settings = [] # noqa: E501
125 
126  return self.api_clientapi_client.call_api(
127  '/resources/{resource_id}', 'DELETE',
128  path_params,
129  query_params,
130  header_params,
131  body=body_params,
132  post_params=form_params,
133  files=local_var_files,
134  response_type=None, # noqa: E501
135  auth_settings=auth_settings,
136  async_req=params.get('async_req'),
137  _return_http_data_only=params.get('_return_http_data_only'),
138  _preload_content=params.get('_preload_content', True),
139  _request_timeout=params.get('_request_timeout'),
140  collection_formats=collection_formats)
141 
142  def cf_manager_rest_api_get_available_resources(self, username, password, status, **kwargs): # noqa: E501
143  """Get all cloudFPGA resources in state `{status}` # noqa: E501
144 
145  This method makes a synchronous HTTP request by default. To make an
146  asynchronous HTTP request, please pass async_req=True
147  >>> thread = api.cf_manager_rest_api_get_available_resources(username, password, status, async_req=True)
148  >>> result = thread.get()
149 
150  :param async_req bool
151  :param str username: OpenStack username (required)
152  :param str password: OpenStack password (required)
153  :param str status: Status of the requested resources (required)
154  :param int limit:
155  :return: list[Resource]
156  If the method is called asynchronously,
157  returns the request thread.
158  """
159  kwargs['_return_http_data_only'] = True
160  if kwargs.get('async_req'):
161  return self.cf_manager_rest_api_get_available_resources_with_http_infocf_manager_rest_api_get_available_resources_with_http_info(username, password, status, **kwargs) # noqa: E501
162  else:
163  (data) = self.cf_manager_rest_api_get_available_resources_with_http_infocf_manager_rest_api_get_available_resources_with_http_info(username, password, status, **kwargs) # noqa: E501
164  return data
165 
166  def cf_manager_rest_api_get_available_resources_with_http_info(self, username, password, status, **kwargs): # noqa: E501
167  """Get all cloudFPGA resources in state `{status}` # noqa: E501
168 
169  This method makes a synchronous HTTP request by default. To make an
170  asynchronous HTTP request, please pass async_req=True
171  >>> thread = api.cf_manager_rest_api_get_available_resources_with_http_info(username, password, status, async_req=True)
172  >>> result = thread.get()
173 
174  :param async_req bool
175  :param str username: OpenStack username (required)
176  :param str password: OpenStack password (required)
177  :param str status: Status of the requested resources (required)
178  :param int limit:
179  :return: list[Resource]
180  If the method is called asynchronously,
181  returns the request thread.
182  """
183 
184  all_params = ['username', 'password', 'status', 'limit'] # noqa: E501
185  all_params.append('async_req')
186  all_params.append('_return_http_data_only')
187  all_params.append('_preload_content')
188  all_params.append('_request_timeout')
189 
190  params = locals()
191  for key, val in six.iteritems(params['kwargs']):
192  if key not in all_params:
193  raise TypeError(
194  "Got an unexpected keyword argument '%s'"
195  " to method cf_manager_rest_api_get_available_resources" % key
196  )
197  params[key] = val
198  del params['kwargs']
199  # verify the required parameter 'username' is set
200  if ('username' not in params or
201  params['username'] is None):
202  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_available_resources`") # noqa: E501
203  # verify the required parameter 'password' is set
204  if ('password' not in params or
205  params['password'] is None):
206  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_available_resources`") # noqa: E501
207  # verify the required parameter 'status' is set
208  if ('status' not in params or
209  params['status'] is None):
210  raise ValueError("Missing the required parameter `status` when calling `cf_manager_rest_api_get_available_resources`") # noqa: E501
211 
212  collection_formats = {}
213 
214  path_params = {}
215  if 'status' in params:
216  path_params['status'] = params['status'] # noqa: E501
217 
218  query_params = []
219  if 'username' in params:
220  query_params.append(('username', params['username'])) # noqa: E501
221  if 'password' in params:
222  query_params.append(('password', params['password'])) # noqa: E501
223  if 'limit' in params:
224  query_params.append(('limit', params['limit'])) # noqa: E501
225 
226  header_params = {}
227 
228  form_params = []
229  local_var_files = {}
230 
231  body_params = None
232  # HTTP header `Accept`
233  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
234  ['application/json']) # noqa: E501
235 
236  # Authentication setting
237  auth_settings = [] # noqa: E501
238 
239  return self.api_clientapi_client.call_api(
240  '/resources/status/{status}', 'GET',
241  path_params,
242  query_params,
243  header_params,
244  body=body_params,
245  post_params=form_params,
246  files=local_var_files,
247  response_type='list[Resource]', # noqa: E501
248  auth_settings=auth_settings,
249  async_req=params.get('async_req'),
250  _return_http_data_only=params.get('_return_http_data_only'),
251  _preload_content=params.get('_preload_content', True),
252  _request_timeout=params.get('_request_timeout'),
253  collection_formats=collection_formats)
254 
255  def cf_manager_rest_api_get_resources(self, username, password, **kwargs): # noqa: E501
256  """Get all cloudFPGA resources # noqa: E501
257 
258  This method makes a synchronous HTTP request by default. To make an
259  asynchronous HTTP request, please pass async_req=True
260  >>> thread = api.cf_manager_rest_api_get_resources(username, password, async_req=True)
261  >>> result = thread.get()
262 
263  :param async_req bool
264  :param str username: OpenStack username (required)
265  :param str password: OpenStack password (required)
266  :param int limit:
267  :return: list[Resource]
268  If the method is called asynchronously,
269  returns the request thread.
270  """
271  kwargs['_return_http_data_only'] = True
272  if kwargs.get('async_req'):
273  return self.cf_manager_rest_api_get_resources_with_http_infocf_manager_rest_api_get_resources_with_http_info(username, password, **kwargs) # noqa: E501
274  else:
275  (data) = self.cf_manager_rest_api_get_resources_with_http_infocf_manager_rest_api_get_resources_with_http_info(username, password, **kwargs) # noqa: E501
276  return data
277 
278  def cf_manager_rest_api_get_resources_with_http_info(self, username, password, **kwargs): # noqa: E501
279  """Get all cloudFPGA resources # noqa: E501
280 
281  This method makes a synchronous HTTP request by default. To make an
282  asynchronous HTTP request, please pass async_req=True
283  >>> thread = api.cf_manager_rest_api_get_resources_with_http_info(username, password, async_req=True)
284  >>> result = thread.get()
285 
286  :param async_req bool
287  :param str username: OpenStack username (required)
288  :param str password: OpenStack password (required)
289  :param int limit:
290  :return: list[Resource]
291  If the method is called asynchronously,
292  returns the request thread.
293  """
294 
295  all_params = ['username', 'password', 'limit'] # noqa: E501
296  all_params.append('async_req')
297  all_params.append('_return_http_data_only')
298  all_params.append('_preload_content')
299  all_params.append('_request_timeout')
300 
301  params = locals()
302  for key, val in six.iteritems(params['kwargs']):
303  if key not in all_params:
304  raise TypeError(
305  "Got an unexpected keyword argument '%s'"
306  " to method cf_manager_rest_api_get_resources" % key
307  )
308  params[key] = val
309  del params['kwargs']
310  # verify the required parameter 'username' is set
311  if ('username' not in params or
312  params['username'] is None):
313  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_resources`") # noqa: E501
314  # verify the required parameter 'password' is set
315  if ('password' not in params or
316  params['password'] is None):
317  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_resources`") # noqa: E501
318 
319  collection_formats = {}
320 
321  path_params = {}
322 
323  query_params = []
324  if 'username' in params:
325  query_params.append(('username', params['username'])) # noqa: E501
326  if 'password' in params:
327  query_params.append(('password', params['password'])) # noqa: E501
328  if 'limit' in params:
329  query_params.append(('limit', params['limit'])) # noqa: E501
330 
331  header_params = {}
332 
333  form_params = []
334  local_var_files = {}
335 
336  body_params = None
337  # HTTP header `Accept`
338  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
339  ['application/json']) # noqa: E501
340 
341  # Authentication setting
342  auth_settings = [] # noqa: E501
343 
344  return self.api_clientapi_client.call_api(
345  '/resources', 'GET',
346  path_params,
347  query_params,
348  header_params,
349  body=body_params,
350  post_params=form_params,
351  files=local_var_files,
352  response_type='list[Resource]', # noqa: E501
353  auth_settings=auth_settings,
354  async_req=params.get('async_req'),
355  _return_http_data_only=params.get('_return_http_data_only'),
356  _preload_content=params.get('_preload_content', True),
357  _request_timeout=params.get('_request_timeout'),
358  collection_formats=collection_formats)
359 
360  def cf_manager_rest_api_get_resources_of_sled_status(self, username, password, sled_ip, **kwargs): # noqa: E501
361  """Get status of **all resources** from a specific sled # noqa: E501
362 
363  This method makes a synchronous HTTP request by default. To make an
364  asynchronous HTTP request, please pass async_req=True
365  >>> thread = api.cf_manager_rest_api_get_resources_of_sled_status(username, password, sled_ip, async_req=True)
366  >>> result = thread.get()
367 
368  :param async_req bool
369  :param str username: OpenStack username (required)
370  :param str password: OpenStack password (required)
371  :param str sled_ip: The ip address of a SM (required)
372  :return: None
373  If the method is called asynchronously,
374  returns the request thread.
375  """
376  kwargs['_return_http_data_only'] = True
377  if kwargs.get('async_req'):
378  return self.cf_manager_rest_api_get_resources_of_sled_status_with_http_infocf_manager_rest_api_get_resources_of_sled_status_with_http_info(username, password, sled_ip, **kwargs) # noqa: E501
379  else:
380  (data) = self.cf_manager_rest_api_get_resources_of_sled_status_with_http_infocf_manager_rest_api_get_resources_of_sled_status_with_http_info(username, password, sled_ip, **kwargs) # noqa: E501
381  return data
382 
383  def cf_manager_rest_api_get_resources_of_sled_status_with_http_info(self, username, password, sled_ip, **kwargs): # noqa: E501
384  """Get status of **all resources** from a specific sled # noqa: E501
385 
386  This method makes a synchronous HTTP request by default. To make an
387  asynchronous HTTP request, please pass async_req=True
388  >>> thread = api.cf_manager_rest_api_get_resources_of_sled_status_with_http_info(username, password, sled_ip, async_req=True)
389  >>> result = thread.get()
390 
391  :param async_req bool
392  :param str username: OpenStack username (required)
393  :param str password: OpenStack password (required)
394  :param str sled_ip: The ip address of a SM (required)
395  :return: None
396  If the method is called asynchronously,
397  returns the request thread.
398  """
399 
400  all_params = ['username', 'password', 'sled_ip'] # noqa: E501
401  all_params.append('async_req')
402  all_params.append('_return_http_data_only')
403  all_params.append('_preload_content')
404  all_params.append('_request_timeout')
405 
406  params = locals()
407  for key, val in six.iteritems(params['kwargs']):
408  if key not in all_params:
409  raise TypeError(
410  "Got an unexpected keyword argument '%s'"
411  " to method cf_manager_rest_api_get_resources_of_sled_status" % key
412  )
413  params[key] = val
414  del params['kwargs']
415  # verify the required parameter 'username' is set
416  if ('username' not in params or
417  params['username'] is None):
418  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_resources_of_sled_status`") # noqa: E501
419  # verify the required parameter 'password' is set
420  if ('password' not in params or
421  params['password'] is None):
422  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_resources_of_sled_status`") # noqa: E501
423  # verify the required parameter 'sled_ip' is set
424  if ('sled_ip' not in params or
425  params['sled_ip'] is None):
426  raise ValueError("Missing the required parameter `sled_ip` when calling `cf_manager_rest_api_get_resources_of_sled_status`") # noqa: E501
427 
428  collection_formats = {}
429 
430  path_params = {}
431  if 'sled_ip' in params:
432  path_params['sled_ip'] = params['sled_ip'] # noqa: E501
433 
434  query_params = []
435  if 'username' in params:
436  query_params.append(('username', params['username'])) # noqa: E501
437  if 'password' in params:
438  query_params.append(('password', params['password'])) # noqa: E501
439 
440  header_params = {}
441 
442  form_params = []
443  local_var_files = {}
444 
445  body_params = None
446  # Authentication setting
447  auth_settings = [] # noqa: E501
448 
449  return self.api_clientapi_client.call_api(
450  '/resources/sled/{sled_ip}/status/', 'GET',
451  path_params,
452  query_params,
453  header_params,
454  body=body_params,
455  post_params=form_params,
456  files=local_var_files,
457  response_type=None, # noqa: E501
458  auth_settings=auth_settings,
459  async_req=params.get('async_req'),
460  _return_http_data_only=params.get('_return_http_data_only'),
461  _preload_content=params.get('_preload_content', True),
462  _request_timeout=params.get('_request_timeout'),
463  collection_formats=collection_formats)
464 
465  def cf_manager_rest_api_get_resources_of_sled_status_in_state(self, username, password, sled_ip, status, **kwargs): # noqa: E501
466  """Get status of **all resources** from a specific sled in a specific `{status}` # noqa: E501
467 
468  This method makes a synchronous HTTP request by default. To make an
469  asynchronous HTTP request, please pass async_req=True
470  >>> thread = api.cf_manager_rest_api_get_resources_of_sled_status_in_state(username, password, sled_ip, status, async_req=True)
471  >>> result = thread.get()
472 
473  :param async_req bool
474  :param str username: OpenStack username (required)
475  :param str password: OpenStack password (required)
476  :param str sled_ip: The ip address of a SM (required)
477  :param str status: Status of the requested resources (required)
478  :return: None
479  If the method is called asynchronously,
480  returns the request thread.
481  """
482  kwargs['_return_http_data_only'] = True
483  if kwargs.get('async_req'):
484  return self.cf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_infocf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_info(username, password, sled_ip, status, **kwargs) # noqa: E501
485  else:
486  (data) = self.cf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_infocf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_info(username, password, sled_ip, status, **kwargs) # noqa: E501
487  return data
488 
489  def cf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_info(self, username, password, sled_ip, status, **kwargs): # noqa: E501
490  """Get status of **all resources** from a specific sled in a specific `{status}` # noqa: E501
491 
492  This method makes a synchronous HTTP request by default. To make an
493  asynchronous HTTP request, please pass async_req=True
494  >>> thread = api.cf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_info(username, password, sled_ip, status, async_req=True)
495  >>> result = thread.get()
496 
497  :param async_req bool
498  :param str username: OpenStack username (required)
499  :param str password: OpenStack password (required)
500  :param str sled_ip: The ip address of a SM (required)
501  :param str status: Status of the requested resources (required)
502  :return: None
503  If the method is called asynchronously,
504  returns the request thread.
505  """
506 
507  all_params = ['username', 'password', 'sled_ip', 'status'] # noqa: E501
508  all_params.append('async_req')
509  all_params.append('_return_http_data_only')
510  all_params.append('_preload_content')
511  all_params.append('_request_timeout')
512 
513  params = locals()
514  for key, val in six.iteritems(params['kwargs']):
515  if key not in all_params:
516  raise TypeError(
517  "Got an unexpected keyword argument '%s'"
518  " to method cf_manager_rest_api_get_resources_of_sled_status_in_state" % key
519  )
520  params[key] = val
521  del params['kwargs']
522  # verify the required parameter 'username' is set
523  if ('username' not in params or
524  params['username'] is None):
525  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_resources_of_sled_status_in_state`") # noqa: E501
526  # verify the required parameter 'password' is set
527  if ('password' not in params or
528  params['password'] is None):
529  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_resources_of_sled_status_in_state`") # noqa: E501
530  # verify the required parameter 'sled_ip' is set
531  if ('sled_ip' not in params or
532  params['sled_ip'] is None):
533  raise ValueError("Missing the required parameter `sled_ip` when calling `cf_manager_rest_api_get_resources_of_sled_status_in_state`") # noqa: E501
534  # verify the required parameter 'status' is set
535  if ('status' not in params or
536  params['status'] is None):
537  raise ValueError("Missing the required parameter `status` when calling `cf_manager_rest_api_get_resources_of_sled_status_in_state`") # noqa: E501
538 
539  collection_formats = {}
540 
541  path_params = {}
542  if 'sled_ip' in params:
543  path_params['sled_ip'] = params['sled_ip'] # noqa: E501
544  if 'status' in params:
545  path_params['status'] = params['status'] # noqa: E501
546 
547  query_params = []
548  if 'username' in params:
549  query_params.append(('username', params['username'])) # noqa: E501
550  if 'password' in params:
551  query_params.append(('password', params['password'])) # noqa: E501
552 
553  header_params = {}
554 
555  form_params = []
556  local_var_files = {}
557 
558  body_params = None
559  # Authentication setting
560  auth_settings = [] # noqa: E501
561 
562  return self.api_clientapi_client.call_api(
563  '/resources/sled/{sled_ip}/{status}/', 'GET',
564  path_params,
565  query_params,
566  header_params,
567  body=body_params,
568  post_params=form_params,
569  files=local_var_files,
570  response_type=None, # noqa: E501
571  auth_settings=auth_settings,
572  async_req=params.get('async_req'),
573  _return_http_data_only=params.get('_return_http_data_only'),
574  _preload_content=params.get('_preload_content', True),
575  _request_timeout=params.get('_request_timeout'),
576  collection_formats=collection_formats)
577 
578  def cf_manager_rest_api_get_single_resource(self, username, password, resource_id, **kwargs): # noqa: E501
579  """Get details of one resource # noqa: E501
580 
581  This method makes a synchronous HTTP request by default. To make an
582  asynchronous HTTP request, please pass async_req=True
583  >>> thread = api.cf_manager_rest_api_get_single_resource(username, password, resource_id, async_req=True)
584  >>> result = thread.get()
585 
586  :param async_req bool
587  :param str username: OpenStack username (required)
588  :param str password: OpenStack password (required)
589  :param str resource_id: cloudFPGA resource unique identifier (required)
590  :return: Resource
591  If the method is called asynchronously,
592  returns the request thread.
593  """
594  kwargs['_return_http_data_only'] = True
595  if kwargs.get('async_req'):
596  return self.cf_manager_rest_api_get_single_resource_with_http_infocf_manager_rest_api_get_single_resource_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
597  else:
598  (data) = self.cf_manager_rest_api_get_single_resource_with_http_infocf_manager_rest_api_get_single_resource_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
599  return data
600 
601  def cf_manager_rest_api_get_single_resource_with_http_info(self, username, password, resource_id, **kwargs): # noqa: E501
602  """Get details of one resource # noqa: E501
603 
604  This method makes a synchronous HTTP request by default. To make an
605  asynchronous HTTP request, please pass async_req=True
606  >>> thread = api.cf_manager_rest_api_get_single_resource_with_http_info(username, password, resource_id, async_req=True)
607  >>> result = thread.get()
608 
609  :param async_req bool
610  :param str username: OpenStack username (required)
611  :param str password: OpenStack password (required)
612  :param str resource_id: cloudFPGA resource unique identifier (required)
613  :return: Resource
614  If the method is called asynchronously,
615  returns the request thread.
616  """
617 
618  all_params = ['username', 'password', 'resource_id'] # noqa: E501
619  all_params.append('async_req')
620  all_params.append('_return_http_data_only')
621  all_params.append('_preload_content')
622  all_params.append('_request_timeout')
623 
624  params = locals()
625  for key, val in six.iteritems(params['kwargs']):
626  if key not in all_params:
627  raise TypeError(
628  "Got an unexpected keyword argument '%s'"
629  " to method cf_manager_rest_api_get_single_resource" % key
630  )
631  params[key] = val
632  del params['kwargs']
633  # verify the required parameter 'username' is set
634  if ('username' not in params or
635  params['username'] is None):
636  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_single_resource`") # noqa: E501
637  # verify the required parameter 'password' is set
638  if ('password' not in params or
639  params['password'] is None):
640  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_single_resource`") # noqa: E501
641  # verify the required parameter 'resource_id' is set
642  if ('resource_id' not in params or
643  params['resource_id'] is None):
644  raise ValueError("Missing the required parameter `resource_id` when calling `cf_manager_rest_api_get_single_resource`") # noqa: E501
645 
646  collection_formats = {}
647 
648  path_params = {}
649  if 'resource_id' in params:
650  path_params['resource_id'] = params['resource_id'] # noqa: E501
651 
652  query_params = []
653  if 'username' in params:
654  query_params.append(('username', params['username'])) # noqa: E501
655  if 'password' in params:
656  query_params.append(('password', params['password'])) # noqa: E501
657 
658  header_params = {}
659 
660  form_params = []
661  local_var_files = {}
662 
663  body_params = None
664  # HTTP header `Accept`
665  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
666  ['application/json']) # noqa: E501
667 
668  # Authentication setting
669  auth_settings = [] # noqa: E501
670 
671  return self.api_clientapi_client.call_api(
672  '/resources/{resource_id}', 'GET',
673  path_params,
674  query_params,
675  header_params,
676  body=body_params,
677  post_params=form_params,
678  files=local_var_files,
679  response_type='Resource', # noqa: E501
680  auth_settings=auth_settings,
681  async_req=params.get('async_req'),
682  _return_http_data_only=params.get('_return_http_data_only'),
683  _preload_content=params.get('_preload_content', True),
684  _request_timeout=params.get('_request_timeout'),
685  collection_formats=collection_formats)
686 
687  def cf_manager_rest_api_get_single_resource_status(self, username, password, resource_id, **kwargs): # noqa: E501
688  """Get status of one resource # noqa: E501
689 
690  This method makes a synchronous HTTP request by default. To make an
691  asynchronous HTTP request, please pass async_req=True
692  >>> thread = api.cf_manager_rest_api_get_single_resource_status(username, password, resource_id, async_req=True)
693  >>> result = thread.get()
694 
695  :param async_req bool
696  :param str username: OpenStack username (required)
697  :param str password: OpenStack password (required)
698  :param str resource_id: cloudFPGA resource unique identifier (required)
699  :return: InlineResponse2006
700  If the method is called asynchronously,
701  returns the request thread.
702  """
703  kwargs['_return_http_data_only'] = True
704  if kwargs.get('async_req'):
705  return self.cf_manager_rest_api_get_single_resource_status_with_http_infocf_manager_rest_api_get_single_resource_status_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
706  else:
707  (data) = self.cf_manager_rest_api_get_single_resource_status_with_http_infocf_manager_rest_api_get_single_resource_status_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
708  return data
709 
710  def cf_manager_rest_api_get_single_resource_status_with_http_info(self, username, password, resource_id, **kwargs): # noqa: E501
711  """Get status of one resource # noqa: E501
712 
713  This method makes a synchronous HTTP request by default. To make an
714  asynchronous HTTP request, please pass async_req=True
715  >>> thread = api.cf_manager_rest_api_get_single_resource_status_with_http_info(username, password, resource_id, async_req=True)
716  >>> result = thread.get()
717 
718  :param async_req bool
719  :param str username: OpenStack username (required)
720  :param str password: OpenStack password (required)
721  :param str resource_id: cloudFPGA resource unique identifier (required)
722  :return: InlineResponse2006
723  If the method is called asynchronously,
724  returns the request thread.
725  """
726 
727  all_params = ['username', 'password', 'resource_id'] # noqa: E501
728  all_params.append('async_req')
729  all_params.append('_return_http_data_only')
730  all_params.append('_preload_content')
731  all_params.append('_request_timeout')
732 
733  params = locals()
734  for key, val in six.iteritems(params['kwargs']):
735  if key not in all_params:
736  raise TypeError(
737  "Got an unexpected keyword argument '%s'"
738  " to method cf_manager_rest_api_get_single_resource_status" % key
739  )
740  params[key] = val
741  del params['kwargs']
742  # verify the required parameter 'username' is set
743  if ('username' not in params or
744  params['username'] is None):
745  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_single_resource_status`") # noqa: E501
746  # verify the required parameter 'password' is set
747  if ('password' not in params or
748  params['password'] is None):
749  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_single_resource_status`") # noqa: E501
750  # verify the required parameter 'resource_id' is set
751  if ('resource_id' not in params or
752  params['resource_id'] is None):
753  raise ValueError("Missing the required parameter `resource_id` when calling `cf_manager_rest_api_get_single_resource_status`") # noqa: E501
754 
755  collection_formats = {}
756 
757  path_params = {}
758  if 'resource_id' in params:
759  path_params['resource_id'] = params['resource_id'] # noqa: E501
760 
761  query_params = []
762  if 'username' in params:
763  query_params.append(('username', params['username'])) # noqa: E501
764  if 'password' in params:
765  query_params.append(('password', params['password'])) # noqa: E501
766 
767  header_params = {}
768 
769  form_params = []
770  local_var_files = {}
771 
772  body_params = None
773  # HTTP header `Accept`
774  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
775  ['application/json']) # noqa: E501
776 
777  # Authentication setting
778  auth_settings = [] # noqa: E501
779 
780  return self.api_clientapi_client.call_api(
781  '/resources/{resource_id}/status/', 'GET',
782  path_params,
783  query_params,
784  header_params,
785  body=body_params,
786  post_params=form_params,
787  files=local_var_files,
788  response_type='InlineResponse2006', # noqa: E501
789  auth_settings=auth_settings,
790  async_req=params.get('async_req'),
791  _return_http_data_only=params.get('_return_http_data_only'),
792  _preload_content=params.get('_preload_content', True),
793  _request_timeout=params.get('_request_timeout'),
794  collection_formats=collection_formats)
795 
796  def cf_manager_rest_api_post_resources(self, username, password, **kwargs): # noqa: E501
797  """Create a cloudFPGA resource # noqa: E501
798 
799  This method makes a synchronous HTTP request by default. To make an
800  asynchronous HTTP request, please pass async_req=True
801  >>> thread = api.cf_manager_rest_api_post_resources(username, password, async_req=True)
802  >>> result = thread.get()
803 
804  :param async_req bool
805  :param str username: OpenStack username (required)
806  :param str password: OpenStack password (required)
807  :param Resource body:
808  :return: None
809  If the method is called asynchronously,
810  returns the request thread.
811  """
812  kwargs['_return_http_data_only'] = True
813  if kwargs.get('async_req'):
814  return self.cf_manager_rest_api_post_resources_with_http_infocf_manager_rest_api_post_resources_with_http_info(username, password, **kwargs) # noqa: E501
815  else:
816  (data) = self.cf_manager_rest_api_post_resources_with_http_infocf_manager_rest_api_post_resources_with_http_info(username, password, **kwargs) # noqa: E501
817  return data
818 
819  def cf_manager_rest_api_post_resources_with_http_info(self, username, password, **kwargs): # noqa: E501
820  """Create a cloudFPGA resource # noqa: E501
821 
822  This method makes a synchronous HTTP request by default. To make an
823  asynchronous HTTP request, please pass async_req=True
824  >>> thread = api.cf_manager_rest_api_post_resources_with_http_info(username, password, async_req=True)
825  >>> result = thread.get()
826 
827  :param async_req bool
828  :param str username: OpenStack username (required)
829  :param str password: OpenStack password (required)
830  :param Resource body:
831  :return: None
832  If the method is called asynchronously,
833  returns the request thread.
834  """
835 
836  all_params = ['username', 'password', 'body'] # noqa: E501
837  all_params.append('async_req')
838  all_params.append('_return_http_data_only')
839  all_params.append('_preload_content')
840  all_params.append('_request_timeout')
841 
842  params = locals()
843  for key, val in six.iteritems(params['kwargs']):
844  if key not in all_params:
845  raise TypeError(
846  "Got an unexpected keyword argument '%s'"
847  " to method cf_manager_rest_api_post_resources" % key
848  )
849  params[key] = val
850  del params['kwargs']
851  # verify the required parameter 'username' is set
852  if ('username' not in params or
853  params['username'] is None):
854  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_post_resources`") # noqa: E501
855  # verify the required parameter 'password' is set
856  if ('password' not in params or
857  params['password'] is None):
858  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_post_resources`") # noqa: E501
859 
860  collection_formats = {}
861 
862  path_params = {}
863 
864  query_params = []
865  if 'username' in params:
866  query_params.append(('username', params['username'])) # noqa: E501
867  if 'password' in params:
868  query_params.append(('password', params['password'])) # noqa: E501
869 
870  header_params = {}
871 
872  form_params = []
873  local_var_files = {}
874 
875  body_params = None
876  if 'body' in params:
877  body_params = params['body']
878  # HTTP header `Content-Type`
879  header_params['Content-Type'] = self.api_clientapi_client.select_header_content_type( # noqa: E501
880  ['application/json']) # noqa: E501
881 
882  # Authentication setting
883  auth_settings = [] # noqa: E501
884 
885  return self.api_clientapi_client.call_api(
886  '/resources', 'POST',
887  path_params,
888  query_params,
889  header_params,
890  body=body_params,
891  post_params=form_params,
892  files=local_var_files,
893  response_type=None, # noqa: E501
894  auth_settings=auth_settings,
895  async_req=params.get('async_req'),
896  _return_http_data_only=params.get('_return_http_data_only'),
897  _preload_content=params.get('_preload_content', True),
898  _request_timeout=params.get('_request_timeout'),
899  collection_formats=collection_formats)
900 
901  def cf_manager_rest_api_put_resource(self, username, password, resource_id, **kwargs): # noqa: E501
902  """Update a resource # noqa: E501
903 
904  Only the properties to update must be part of the `resource_data` field. All not mentioned properties will stay the same. It is not possible to change the `state` with this API call. # noqa: E501
905  This method makes a synchronous HTTP request by default. To make an
906  asynchronous HTTP request, please pass async_req=True
907  >>> thread = api.cf_manager_rest_api_put_resource(username, password, resource_id, async_req=True)
908  >>> result = thread.get()
909 
910  :param async_req bool
911  :param str username: OpenStack username (required)
912  :param str password: OpenStack password (required)
913  :param str resource_id: cloudFPGA resource unique identifier (required)
914  :param Resource body:
915  :return: None
916  If the method is called asynchronously,
917  returns the request thread.
918  """
919  kwargs['_return_http_data_only'] = True
920  if kwargs.get('async_req'):
921  return self.cf_manager_rest_api_put_resource_with_http_infocf_manager_rest_api_put_resource_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
922  else:
923  (data) = self.cf_manager_rest_api_put_resource_with_http_infocf_manager_rest_api_put_resource_with_http_info(username, password, resource_id, **kwargs) # noqa: E501
924  return data
925 
926  def cf_manager_rest_api_put_resource_with_http_info(self, username, password, resource_id, **kwargs): # noqa: E501
927  """Update a resource # noqa: E501
928 
929  Only the properties to update must be part of the `resource_data` field. All not mentioned properties will stay the same. It is not possible to change the `state` with this API call. # noqa: E501
930  This method makes a synchronous HTTP request by default. To make an
931  asynchronous HTTP request, please pass async_req=True
932  >>> thread = api.cf_manager_rest_api_put_resource_with_http_info(username, password, resource_id, async_req=True)
933  >>> result = thread.get()
934 
935  :param async_req bool
936  :param str username: OpenStack username (required)
937  :param str password: OpenStack password (required)
938  :param str resource_id: cloudFPGA resource unique identifier (required)
939  :param Resource body:
940  :return: None
941  If the method is called asynchronously,
942  returns the request thread.
943  """
944 
945  all_params = ['username', 'password', 'resource_id', 'body'] # noqa: E501
946  all_params.append('async_req')
947  all_params.append('_return_http_data_only')
948  all_params.append('_preload_content')
949  all_params.append('_request_timeout')
950 
951  params = locals()
952  for key, val in six.iteritems(params['kwargs']):
953  if key not in all_params:
954  raise TypeError(
955  "Got an unexpected keyword argument '%s'"
956  " to method cf_manager_rest_api_put_resource" % key
957  )
958  params[key] = val
959  del params['kwargs']
960  # verify the required parameter 'username' is set
961  if ('username' not in params or
962  params['username'] is None):
963  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_put_resource`") # noqa: E501
964  # verify the required parameter 'password' is set
965  if ('password' not in params or
966  params['password'] is None):
967  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_put_resource`") # noqa: E501
968  # verify the required parameter 'resource_id' is set
969  if ('resource_id' not in params or
970  params['resource_id'] is None):
971  raise ValueError("Missing the required parameter `resource_id` when calling `cf_manager_rest_api_put_resource`") # noqa: E501
972 
973  collection_formats = {}
974 
975  path_params = {}
976  if 'resource_id' in params:
977  path_params['resource_id'] = params['resource_id'] # noqa: E501
978 
979  query_params = []
980  if 'username' in params:
981  query_params.append(('username', params['username'])) # noqa: E501
982  if 'password' in params:
983  query_params.append(('password', params['password'])) # noqa: E501
984 
985  header_params = {}
986 
987  form_params = []
988  local_var_files = {}
989 
990  body_params = None
991  if 'body' in params:
992  body_params = params['body']
993  # HTTP header `Content-Type`
994  header_params['Content-Type'] = self.api_clientapi_client.select_header_content_type( # noqa: E501
995  ['application/json']) # noqa: E501
996 
997  # Authentication setting
998  auth_settings = [] # noqa: E501
999 
1000  return self.api_clientapi_client.call_api(
1001  '/resources/{resource_id}', 'PUT',
1002  path_params,
1003  query_params,
1004  header_params,
1005  body=body_params,
1006  post_params=form_params,
1007  files=local_var_files,
1008  response_type=None, # noqa: E501
1009  auth_settings=auth_settings,
1010  async_req=params.get('async_req'),
1011  _return_http_data_only=params.get('_return_http_data_only'),
1012  _preload_content=params.get('_preload_content', True),
1013  _request_timeout=params.get('_request_timeout'),
1014  collection_formats=collection_formats)
1015 
1016  def cf_manager_rest_api_put_resource_status(self, username, password, resource_id, new_status, **kwargs): # noqa: E501
1017  """Update status of a resource # noqa: E501
1018 
1019  This method makes a synchronous HTTP request by default. To make an
1020  asynchronous HTTP request, please pass async_req=True
1021  >>> thread = api.cf_manager_rest_api_put_resource_status(username, password, resource_id, new_status, async_req=True)
1022  >>> result = thread.get()
1023 
1024  :param async_req bool
1025  :param str username: OpenStack username (required)
1026  :param str password: OpenStack password (required)
1027  :param str resource_id: cloudFPGA resource unique identifier (required)
1028  :param str new_status: New status of the resource (required)
1029  :return: None
1030  If the method is called asynchronously,
1031  returns the request thread.
1032  """
1033  kwargs['_return_http_data_only'] = True
1034  if kwargs.get('async_req'):
1035  return self.cf_manager_rest_api_put_resource_status_with_http_infocf_manager_rest_api_put_resource_status_with_http_info(username, password, resource_id, new_status, **kwargs) # noqa: E501
1036  else:
1037  (data) = self.cf_manager_rest_api_put_resource_status_with_http_infocf_manager_rest_api_put_resource_status_with_http_info(username, password, resource_id, new_status, **kwargs) # noqa: E501
1038  return data
1039 
1040  def cf_manager_rest_api_put_resource_status_with_http_info(self, username, password, resource_id, new_status, **kwargs): # noqa: E501
1041  """Update status of a resource # noqa: E501
1042 
1043  This method makes a synchronous HTTP request by default. To make an
1044  asynchronous HTTP request, please pass async_req=True
1045  >>> thread = api.cf_manager_rest_api_put_resource_status_with_http_info(username, password, resource_id, new_status, async_req=True)
1046  >>> result = thread.get()
1047 
1048  :param async_req bool
1049  :param str username: OpenStack username (required)
1050  :param str password: OpenStack password (required)
1051  :param str resource_id: cloudFPGA resource unique identifier (required)
1052  :param str new_status: New status of the resource (required)
1053  :return: None
1054  If the method is called asynchronously,
1055  returns the request thread.
1056  """
1057 
1058  all_params = ['username', 'password', 'resource_id', 'new_status'] # noqa: E501
1059  all_params.append('async_req')
1060  all_params.append('_return_http_data_only')
1061  all_params.append('_preload_content')
1062  all_params.append('_request_timeout')
1063 
1064  params = locals()
1065  for key, val in six.iteritems(params['kwargs']):
1066  if key not in all_params:
1067  raise TypeError(
1068  "Got an unexpected keyword argument '%s'"
1069  " to method cf_manager_rest_api_put_resource_status" % key
1070  )
1071  params[key] = val
1072  del params['kwargs']
1073  # verify the required parameter 'username' is set
1074  if ('username' not in params or
1075  params['username'] is None):
1076  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_put_resource_status`") # noqa: E501
1077  # verify the required parameter 'password' is set
1078  if ('password' not in params or
1079  params['password'] is None):
1080  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_put_resource_status`") # noqa: E501
1081  # verify the required parameter 'resource_id' is set
1082  if ('resource_id' not in params or
1083  params['resource_id'] is None):
1084  raise ValueError("Missing the required parameter `resource_id` when calling `cf_manager_rest_api_put_resource_status`") # noqa: E501
1085  # verify the required parameter 'new_status' is set
1086  if ('new_status' not in params or
1087  params['new_status'] is None):
1088  raise ValueError("Missing the required parameter `new_status` when calling `cf_manager_rest_api_put_resource_status`") # noqa: E501
1089 
1090  collection_formats = {}
1091 
1092  path_params = {}
1093  if 'resource_id' in params:
1094  path_params['resource_id'] = params['resource_id'] # noqa: E501
1095 
1096  query_params = []
1097  if 'username' in params:
1098  query_params.append(('username', params['username'])) # noqa: E501
1099  if 'password' in params:
1100  query_params.append(('password', params['password'])) # noqa: E501
1101  if 'new_status' in params:
1102  query_params.append(('new_status', params['new_status'])) # noqa: E501
1103 
1104  header_params = {}
1105 
1106  form_params = []
1107  local_var_files = {}
1108 
1109  body_params = None
1110  # Authentication setting
1111  auth_settings = [] # noqa: E501
1112 
1113  return self.api_clientapi_client.call_api(
1114  '/resources/{resource_id}/status/', 'PUT',
1115  path_params,
1116  query_params,
1117  header_params,
1118  body=body_params,
1119  post_params=form_params,
1120  files=local_var_files,
1121  response_type=None, # noqa: E501
1122  auth_settings=auth_settings,
1123  async_req=params.get('async_req'),
1124  _return_http_data_only=params.get('_return_http_data_only'),
1125  _preload_content=params.get('_preload_content', True),
1126  _request_timeout=params.get('_request_timeout'),
1127  collection_formats=collection_formats)
1128 
1129  def cf_manager_rest_api_put_resources_of_sled_status(self, username, password, sled_ip, new_status, **kwargs): # noqa: E501
1130  """Update status of **all resources** from a specific sled # noqa: E501
1131 
1132  This method makes a synchronous HTTP request by default. To make an
1133  asynchronous HTTP request, please pass async_req=True
1134  >>> thread = api.cf_manager_rest_api_put_resources_of_sled_status(username, password, sled_ip, new_status, async_req=True)
1135  >>> result = thread.get()
1136 
1137  :param async_req bool
1138  :param str username: OpenStack username (required)
1139  :param str password: OpenStack password (required)
1140  :param str sled_ip: The ip address of a SM (required)
1141  :param str new_status: New status of the resource (required)
1142  :return: None
1143  If the method is called asynchronously,
1144  returns the request thread.
1145  """
1146  kwargs['_return_http_data_only'] = True
1147  if kwargs.get('async_req'):
1148  return self.cf_manager_rest_api_put_resources_of_sled_status_with_http_infocf_manager_rest_api_put_resources_of_sled_status_with_http_info(username, password, sled_ip, new_status, **kwargs) # noqa: E501
1149  else:
1150  (data) = self.cf_manager_rest_api_put_resources_of_sled_status_with_http_infocf_manager_rest_api_put_resources_of_sled_status_with_http_info(username, password, sled_ip, new_status, **kwargs) # noqa: E501
1151  return data
1152 
1153  def cf_manager_rest_api_put_resources_of_sled_status_with_http_info(self, username, password, sled_ip, new_status, **kwargs): # noqa: E501
1154  """Update status of **all resources** from a specific sled # noqa: E501
1155 
1156  This method makes a synchronous HTTP request by default. To make an
1157  asynchronous HTTP request, please pass async_req=True
1158  >>> thread = api.cf_manager_rest_api_put_resources_of_sled_status_with_http_info(username, password, sled_ip, new_status, async_req=True)
1159  >>> result = thread.get()
1160 
1161  :param async_req bool
1162  :param str username: OpenStack username (required)
1163  :param str password: OpenStack password (required)
1164  :param str sled_ip: The ip address of a SM (required)
1165  :param str new_status: New status of the resource (required)
1166  :return: None
1167  If the method is called asynchronously,
1168  returns the request thread.
1169  """
1170 
1171  all_params = ['username', 'password', 'sled_ip', 'new_status'] # noqa: E501
1172  all_params.append('async_req')
1173  all_params.append('_return_http_data_only')
1174  all_params.append('_preload_content')
1175  all_params.append('_request_timeout')
1176 
1177  params = locals()
1178  for key, val in six.iteritems(params['kwargs']):
1179  if key not in all_params:
1180  raise TypeError(
1181  "Got an unexpected keyword argument '%s'"
1182  " to method cf_manager_rest_api_put_resources_of_sled_status" % key
1183  )
1184  params[key] = val
1185  del params['kwargs']
1186  # verify the required parameter 'username' is set
1187  if ('username' not in params or
1188  params['username'] is None):
1189  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_put_resources_of_sled_status`") # noqa: E501
1190  # verify the required parameter 'password' is set
1191  if ('password' not in params or
1192  params['password'] is None):
1193  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_put_resources_of_sled_status`") # noqa: E501
1194  # verify the required parameter 'sled_ip' is set
1195  if ('sled_ip' not in params or
1196  params['sled_ip'] is None):
1197  raise ValueError("Missing the required parameter `sled_ip` when calling `cf_manager_rest_api_put_resources_of_sled_status`") # noqa: E501
1198  # verify the required parameter 'new_status' is set
1199  if ('new_status' not in params or
1200  params['new_status'] is None):
1201  raise ValueError("Missing the required parameter `new_status` when calling `cf_manager_rest_api_put_resources_of_sled_status`") # noqa: E501
1202 
1203  collection_formats = {}
1204 
1205  path_params = {}
1206  if 'sled_ip' in params:
1207  path_params['sled_ip'] = params['sled_ip'] # noqa: E501
1208 
1209  query_params = []
1210  if 'username' in params:
1211  query_params.append(('username', params['username'])) # noqa: E501
1212  if 'password' in params:
1213  query_params.append(('password', params['password'])) # noqa: E501
1214  if 'new_status' in params:
1215  query_params.append(('new_status', params['new_status'])) # noqa: E501
1216 
1217  header_params = {}
1218 
1219  form_params = []
1220  local_var_files = {}
1221 
1222  body_params = None
1223  # Authentication setting
1224  auth_settings = [] # noqa: E501
1225 
1226  return self.api_clientapi_client.call_api(
1227  '/resources/sled/{sled_ip}/status/', 'PUT',
1228  path_params,
1229  query_params,
1230  header_params,
1231  body=body_params,
1232  post_params=form_params,
1233  files=local_var_files,
1234  response_type=None, # noqa: E501
1235  auth_settings=auth_settings,
1236  async_req=params.get('async_req'),
1237  _return_http_data_only=params.get('_return_http_data_only'),
1238  _preload_content=params.get('_preload_content', True),
1239  _request_timeout=params.get('_request_timeout'),
1240  collection_formats=collection_formats)
1241 
1242  def cf_manager_rest_api_put_resources_of_sled_status_in_state(self, username, password, sled_ip, status, new_status, **kwargs): # noqa: E501
1243  """Update status of **all resources** from a specific sled in a specific `{status}` # noqa: E501
1244 
1245  For example, if this method is called with `PUT /resources/sled/1.2.3.4/AVAILABLE`, then only all `AVAILABLE` resources of Sled `1.2.3.4` are put to to the `new_status`. # noqa: E501
1246  This method makes a synchronous HTTP request by default. To make an
1247  asynchronous HTTP request, please pass async_req=True
1248  >>> thread = api.cf_manager_rest_api_put_resources_of_sled_status_in_state(username, password, sled_ip, status, new_status, async_req=True)
1249  >>> result = thread.get()
1250 
1251  :param async_req bool
1252  :param str username: OpenStack username (required)
1253  :param str password: OpenStack password (required)
1254  :param str sled_ip: The ip address of a SM (required)
1255  :param str status: Status of the resources that should be updated (required)
1256  :param str new_status: New status of the resources (required)
1257  :return: None
1258  If the method is called asynchronously,
1259  returns the request thread.
1260  """
1261  kwargs['_return_http_data_only'] = True
1262  if kwargs.get('async_req'):
1263  return self.cf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_infocf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_info(username, password, sled_ip, status, new_status, **kwargs) # noqa: E501
1264  else:
1265  (data) = self.cf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_infocf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_info(username, password, sled_ip, status, new_status, **kwargs) # noqa: E501
1266  return data
1267 
1268  def cf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_info(self, username, password, sled_ip, status, new_status, **kwargs): # noqa: E501
1269  """Update status of **all resources** from a specific sled in a specific `{status}` # noqa: E501
1270 
1271  For example, if this method is called with `PUT /resources/sled/1.2.3.4/AVAILABLE`, then only all `AVAILABLE` resources of Sled `1.2.3.4` are put to to the `new_status`. # noqa: E501
1272  This method makes a synchronous HTTP request by default. To make an
1273  asynchronous HTTP request, please pass async_req=True
1274  >>> thread = api.cf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_info(username, password, sled_ip, status, new_status, async_req=True)
1275  >>> result = thread.get()
1276 
1277  :param async_req bool
1278  :param str username: OpenStack username (required)
1279  :param str password: OpenStack password (required)
1280  :param str sled_ip: The ip address of a SM (required)
1281  :param str status: Status of the resources that should be updated (required)
1282  :param str new_status: New status of the resources (required)
1283  :return: None
1284  If the method is called asynchronously,
1285  returns the request thread.
1286  """
1287 
1288  all_params = ['username', 'password', 'sled_ip', 'status', 'new_status'] # noqa: E501
1289  all_params.append('async_req')
1290  all_params.append('_return_http_data_only')
1291  all_params.append('_preload_content')
1292  all_params.append('_request_timeout')
1293 
1294  params = locals()
1295  for key, val in six.iteritems(params['kwargs']):
1296  if key not in all_params:
1297  raise TypeError(
1298  "Got an unexpected keyword argument '%s'"
1299  " to method cf_manager_rest_api_put_resources_of_sled_status_in_state" % key
1300  )
1301  params[key] = val
1302  del params['kwargs']
1303  # verify the required parameter 'username' is set
1304  if ('username' not in params or
1305  params['username'] is None):
1306  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_put_resources_of_sled_status_in_state`") # noqa: E501
1307  # verify the required parameter 'password' is set
1308  if ('password' not in params or
1309  params['password'] is None):
1310  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_put_resources_of_sled_status_in_state`") # noqa: E501
1311  # verify the required parameter 'sled_ip' is set
1312  if ('sled_ip' not in params or
1313  params['sled_ip'] is None):
1314  raise ValueError("Missing the required parameter `sled_ip` when calling `cf_manager_rest_api_put_resources_of_sled_status_in_state`") # noqa: E501
1315  # verify the required parameter 'status' is set
1316  if ('status' not in params or
1317  params['status'] is None):
1318  raise ValueError("Missing the required parameter `status` when calling `cf_manager_rest_api_put_resources_of_sled_status_in_state`") # noqa: E501
1319  # verify the required parameter 'new_status' is set
1320  if ('new_status' not in params or
1321  params['new_status'] is None):
1322  raise ValueError("Missing the required parameter `new_status` when calling `cf_manager_rest_api_put_resources_of_sled_status_in_state`") # noqa: E501
1323 
1324  collection_formats = {}
1325 
1326  path_params = {}
1327  if 'sled_ip' in params:
1328  path_params['sled_ip'] = params['sled_ip'] # noqa: E501
1329  if 'status' in params:
1330  path_params['status'] = params['status'] # noqa: E501
1331 
1332  query_params = []
1333  if 'username' in params:
1334  query_params.append(('username', params['username'])) # noqa: E501
1335  if 'password' in params:
1336  query_params.append(('password', params['password'])) # noqa: E501
1337  if 'new_status' in params:
1338  query_params.append(('new_status', params['new_status'])) # noqa: E501
1339 
1340  header_params = {}
1341 
1342  form_params = []
1343  local_var_files = {}
1344 
1345  body_params = None
1346  # Authentication setting
1347  auth_settings = [] # noqa: E501
1348 
1349  return self.api_clientapi_client.call_api(
1350  '/resources/sled/{sled_ip}/{status}/', 'PUT',
1351  path_params,
1352  query_params,
1353  header_params,
1354  body=body_params,
1355  post_params=form_params,
1356  files=local_var_files,
1357  response_type=None, # noqa: E501
1358  auth_settings=auth_settings,
1359  async_req=params.get('async_req'),
1360  _return_http_data_only=params.get('_return_http_data_only'),
1361  _preload_content=params.get('_preload_content', True),
1362  _request_timeout=params.get('_request_timeout'),
1363  collection_formats=collection_formats)
def cf_manager_rest_api_get_single_resource_status_with_http_info(self, username, password, resource_id, **kwargs)
def cf_manager_rest_api_get_resources_of_sled_status_in_state(self, username, password, sled_ip, status, **kwargs)
def cf_manager_rest_api_get_resources_of_sled_status_in_state_with_http_info(self, username, password, sled_ip, status, **kwargs)
def cf_manager_rest_api_put_resources_of_sled_status_in_state(self, username, password, sled_ip, status, new_status, **kwargs)
def cf_manager_rest_api_put_resources_of_sled_status(self, username, password, sled_ip, new_status, **kwargs)
def cf_manager_rest_api_put_resources_of_sled_status_in_state_with_http_info(self, username, password, sled_ip, status, new_status, **kwargs)
def cf_manager_rest_api_put_resource_status(self, username, password, resource_id, new_status, **kwargs)
def cf_manager_rest_api_put_resource_status_with_http_info(self, username, password, resource_id, new_status, **kwargs)
def cf_manager_rest_api_put_resources_of_sled_status_with_http_info(self, username, password, sled_ip, new_status, **kwargs)