cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
mantle_architecture_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 MantleArchitectureApi(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_get_composable_logic_all_part(self, username, password, part, **kwargs): # noqa: E501
36  """Returns all composable logics of the given part that are `IN_USE` # noqa: E501
37 
38  This method makes a synchronous HTTP request by default. To make an
39  asynchronous HTTP request, please pass async_req=True
40  >>> thread = api.cf_manager_rest_api_get_composable_logic_all_part(username, password, part, async_req=True)
41  >>> result = thread.get()
42 
43  :param async_req bool
44  :param str username: OpenStack username (required)
45  :param str password: OpenStack password (required)
46  :param str part: The part of the composable logics (required)
47  :return: None
48  If the method is called asynchronously,
49  returns the request thread.
50  """
51  kwargs['_return_http_data_only'] = True
52  if kwargs.get('async_req'):
53  return self.cf_manager_rest_api_get_composable_logic_all_part_with_http_infocf_manager_rest_api_get_composable_logic_all_part_with_http_info(username, password, part, **kwargs) # noqa: E501
54  else:
55  (data) = self.cf_manager_rest_api_get_composable_logic_all_part_with_http_infocf_manager_rest_api_get_composable_logic_all_part_with_http_info(username, password, part, **kwargs) # noqa: E501
56  return data
57 
58  def cf_manager_rest_api_get_composable_logic_all_part_with_http_info(self, username, password, part, **kwargs): # noqa: E501
59  """Returns all composable logics of the given part that are `IN_USE` # noqa: E501
60 
61  This method makes a synchronous HTTP request by default. To make an
62  asynchronous HTTP request, please pass async_req=True
63  >>> thread = api.cf_manager_rest_api_get_composable_logic_all_part_with_http_info(username, password, part, async_req=True)
64  >>> result = thread.get()
65 
66  :param async_req bool
67  :param str username: OpenStack username (required)
68  :param str password: OpenStack password (required)
69  :param str part: The part of the composable logics (required)
70  :return: None
71  If the method is called asynchronously,
72  returns the request thread.
73  """
74 
75  all_params = ['username', 'password', 'part'] # noqa: E501
76  all_params.append('async_req')
77  all_params.append('_return_http_data_only')
78  all_params.append('_preload_content')
79  all_params.append('_request_timeout')
80 
81  params = locals()
82  for key, val in six.iteritems(params['kwargs']):
83  if key not in all_params:
84  raise TypeError(
85  "Got an unexpected keyword argument '%s'"
86  " to method cf_manager_rest_api_get_composable_logic_all_part" % key
87  )
88  params[key] = val
89  del params['kwargs']
90  # verify the required parameter 'username' is set
91  if ('username' not in params or
92  params['username'] is None):
93  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_composable_logic_all_part`") # noqa: E501
94  # verify the required parameter 'password' is set
95  if ('password' not in params or
96  params['password'] is None):
97  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_composable_logic_all_part`") # noqa: E501
98  # verify the required parameter 'part' is set
99  if ('part' not in params or
100  params['part'] is None):
101  raise ValueError("Missing the required parameter `part` when calling `cf_manager_rest_api_get_composable_logic_all_part`") # noqa: E501
102 
103  collection_formats = {}
104 
105  path_params = {}
106  if 'part' in params:
107  path_params['part'] = params['part'] # noqa: E501
108 
109  query_params = []
110  if 'username' in params:
111  query_params.append(('username', params['username'])) # noqa: E501
112  if 'password' in params:
113  query_params.append(('password', params['password'])) # noqa: E501
114 
115  header_params = {}
116 
117  form_params = []
118  local_var_files = {}
119 
120  body_params = None
121  # Authentication setting
122  auth_settings = [] # noqa: E501
123 
124  return self.api_clientapi_client.call_api(
125  '/composablelogic/by_part/{part}', 'GET',
126  path_params,
127  query_params,
128  header_params,
129  body=body_params,
130  post_params=form_params,
131  files=local_var_files,
132  response_type=None, # noqa: E501
133  auth_settings=auth_settings,
134  async_req=params.get('async_req'),
135  _return_http_data_only=params.get('_return_http_data_only'),
136  _preload_content=params.get('_preload_content', True),
137  _request_timeout=params.get('_request_timeout'),
138  collection_formats=collection_formats)
139 
140  def cf_manager_rest_api_get_composable_logic_all_prp(self, username, password, prp, **kwargs): # noqa: E501
141  """Returns all composable logics of the given prp-type that are `IN_USE` # noqa: E501
142 
143  This method makes a synchronous HTTP request by default. To make an
144  asynchronous HTTP request, please pass async_req=True
145  >>> thread = api.cf_manager_rest_api_get_composable_logic_all_prp(username, password, prp, async_req=True)
146  >>> result = thread.get()
147 
148  :param async_req bool
149  :param str username: OpenStack username (required)
150  :param str password: OpenStack password (required)
151  :param int prp: The prp-level of the composable logics (required)
152  :return: None
153  If the method is called asynchronously,
154  returns the request thread.
155  """
156  kwargs['_return_http_data_only'] = True
157  if kwargs.get('async_req'):
158  return self.cf_manager_rest_api_get_composable_logic_all_prp_with_http_infocf_manager_rest_api_get_composable_logic_all_prp_with_http_info(username, password, prp, **kwargs) # noqa: E501
159  else:
160  (data) = self.cf_manager_rest_api_get_composable_logic_all_prp_with_http_infocf_manager_rest_api_get_composable_logic_all_prp_with_http_info(username, password, prp, **kwargs) # noqa: E501
161  return data
162 
163  def cf_manager_rest_api_get_composable_logic_all_prp_with_http_info(self, username, password, prp, **kwargs): # noqa: E501
164  """Returns all composable logics of the given prp-type that are `IN_USE` # noqa: E501
165 
166  This method makes a synchronous HTTP request by default. To make an
167  asynchronous HTTP request, please pass async_req=True
168  >>> thread = api.cf_manager_rest_api_get_composable_logic_all_prp_with_http_info(username, password, prp, async_req=True)
169  >>> result = thread.get()
170 
171  :param async_req bool
172  :param str username: OpenStack username (required)
173  :param str password: OpenStack password (required)
174  :param int prp: The prp-level of the composable logics (required)
175  :return: None
176  If the method is called asynchronously,
177  returns the request thread.
178  """
179 
180  all_params = ['username', 'password', 'prp'] # noqa: E501
181  all_params.append('async_req')
182  all_params.append('_return_http_data_only')
183  all_params.append('_preload_content')
184  all_params.append('_request_timeout')
185 
186  params = locals()
187  for key, val in six.iteritems(params['kwargs']):
188  if key not in all_params:
189  raise TypeError(
190  "Got an unexpected keyword argument '%s'"
191  " to method cf_manager_rest_api_get_composable_logic_all_prp" % key
192  )
193  params[key] = val
194  del params['kwargs']
195  # verify the required parameter 'username' is set
196  if ('username' not in params or
197  params['username'] is None):
198  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_composable_logic_all_prp`") # noqa: E501
199  # verify the required parameter 'password' is set
200  if ('password' not in params or
201  params['password'] is None):
202  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_composable_logic_all_prp`") # noqa: E501
203  # verify the required parameter 'prp' is set
204  if ('prp' not in params or
205  params['prp'] is None):
206  raise ValueError("Missing the required parameter `prp` when calling `cf_manager_rest_api_get_composable_logic_all_prp`") # noqa: E501
207 
208  collection_formats = {}
209 
210  path_params = {}
211  if 'prp' in params:
212  path_params['prp'] = params['prp'] # noqa: E501
213 
214  query_params = []
215  if 'username' in params:
216  query_params.append(('username', params['username'])) # noqa: E501
217  if 'password' in params:
218  query_params.append(('password', params['password'])) # noqa: E501
219 
220  header_params = {}
221 
222  form_params = []
223  local_var_files = {}
224 
225  body_params = None
226  # Authentication setting
227  auth_settings = [] # noqa: E501
228 
229  return self.api_clientapi_client.call_api(
230  '/composablelogic/by_prp/{prp}', 'GET',
231  path_params,
232  query_params,
233  header_params,
234  body=body_params,
235  post_params=form_params,
236  files=local_var_files,
237  response_type=None, # noqa: E501
238  auth_settings=auth_settings,
239  async_req=params.get('async_req'),
240  _return_http_data_only=params.get('_return_http_data_only'),
241  _preload_content=params.get('_preload_content', True),
242  _request_timeout=params.get('_request_timeout'),
243  collection_formats=collection_formats)
244 
245  def cf_manager_rest_api_get_composable_logic_all_shell_type(self, username, password, shell_type, **kwargs): # noqa: E501
246  """Returns all composable logics of the given shell-type that are `IN_USE` # noqa: E501
247 
248  If the resulting list is empty, the shell_type is invalid (or no such composalbe logics exist). # noqa: E501
249  This method makes a synchronous HTTP request by default. To make an
250  asynchronous HTTP request, please pass async_req=True
251  >>> thread = api.cf_manager_rest_api_get_composable_logic_all_shell_type(username, password, shell_type, async_req=True)
252  >>> result = thread.get()
253 
254  :param async_req bool
255  :param str username: OpenStack username (required)
256  :param str password: OpenStack password (required)
257  :param str shell_type: Name of cloudFPGA Shell (required)
258  :return: None
259  If the method is called asynchronously,
260  returns the request thread.
261  """
262  kwargs['_return_http_data_only'] = True
263  if kwargs.get('async_req'):
264  return self.cf_manager_rest_api_get_composable_logic_all_shell_type_with_http_infocf_manager_rest_api_get_composable_logic_all_shell_type_with_http_info(username, password, shell_type, **kwargs) # noqa: E501
265  else:
266  (data) = self.cf_manager_rest_api_get_composable_logic_all_shell_type_with_http_infocf_manager_rest_api_get_composable_logic_all_shell_type_with_http_info(username, password, shell_type, **kwargs) # noqa: E501
267  return data
268 
269  def cf_manager_rest_api_get_composable_logic_all_shell_type_with_http_info(self, username, password, shell_type, **kwargs): # noqa: E501
270  """Returns all composable logics of the given shell-type that are `IN_USE` # noqa: E501
271 
272  If the resulting list is empty, the shell_type is invalid (or no such composalbe logics exist). # noqa: E501
273  This method makes a synchronous HTTP request by default. To make an
274  asynchronous HTTP request, please pass async_req=True
275  >>> thread = api.cf_manager_rest_api_get_composable_logic_all_shell_type_with_http_info(username, password, shell_type, async_req=True)
276  >>> result = thread.get()
277 
278  :param async_req bool
279  :param str username: OpenStack username (required)
280  :param str password: OpenStack password (required)
281  :param str shell_type: Name of cloudFPGA Shell (required)
282  :return: None
283  If the method is called asynchronously,
284  returns the request thread.
285  """
286 
287  all_params = ['username', 'password', 'shell_type'] # noqa: E501
288  all_params.append('async_req')
289  all_params.append('_return_http_data_only')
290  all_params.append('_preload_content')
291  all_params.append('_request_timeout')
292 
293  params = locals()
294  for key, val in six.iteritems(params['kwargs']):
295  if key not in all_params:
296  raise TypeError(
297  "Got an unexpected keyword argument '%s'"
298  " to method cf_manager_rest_api_get_composable_logic_all_shell_type" % key
299  )
300  params[key] = val
301  del params['kwargs']
302  # verify the required parameter 'username' is set
303  if ('username' not in params or
304  params['username'] is None):
305  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_composable_logic_all_shell_type`") # noqa: E501
306  # verify the required parameter 'password' is set
307  if ('password' not in params or
308  params['password'] is None):
309  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_composable_logic_all_shell_type`") # noqa: E501
310  # verify the required parameter 'shell_type' is set
311  if ('shell_type' not in params or
312  params['shell_type'] is None):
313  raise ValueError("Missing the required parameter `shell_type` when calling `cf_manager_rest_api_get_composable_logic_all_shell_type`") # noqa: E501
314 
315  collection_formats = {}
316 
317  path_params = {}
318  if 'shell_type' in params:
319  path_params['shell_type'] = params['shell_type'] # noqa: E501
320 
321  query_params = []
322  if 'username' in params:
323  query_params.append(('username', params['username'])) # noqa: E501
324  if 'password' in params:
325  query_params.append(('password', params['password'])) # noqa: E501
326 
327  header_params = {}
328 
329  form_params = []
330  local_var_files = {}
331 
332  body_params = None
333  # Authentication setting
334  auth_settings = [] # noqa: E501
335 
336  return self.api_clientapi_client.call_api(
337  '/composablelogic/by_shell/{shell_type}', 'GET',
338  path_params,
339  query_params,
340  header_params,
341  body=body_params,
342  post_params=form_params,
343  files=local_var_files,
344  response_type=None, # noqa: E501
345  auth_settings=auth_settings,
346  async_req=params.get('async_req'),
347  _return_http_data_only=params.get('_return_http_data_only'),
348  _preload_content=params.get('_preload_content', True),
349  _request_timeout=params.get('_request_timeout'),
350  collection_formats=collection_formats)
351 
352  def cf_manager_rest_api_get_composable_logic_dcp(self, username, password, cl_id, **kwargs): # noqa: E501
353  """Get the dcp file of a composable logic # noqa: E501
354 
355  This method makes a synchronous HTTP request by default. To make an
356  asynchronous HTTP request, please pass async_req=True
357  >>> thread = api.cf_manager_rest_api_get_composable_logic_dcp(username, password, cl_id, async_req=True)
358  >>> result = thread.get()
359 
360  :param async_req bool
361  :param str username: OpenStack username (required)
362  :param str password: OpenStack password (required)
363  :param int cl_id: ID of a composable logic (Static Shell or Mantles) (required)
364  :return: None
365  If the method is called asynchronously,
366  returns the request thread.
367  """
368  kwargs['_return_http_data_only'] = True
369  if kwargs.get('async_req'):
370  return self.cf_manager_rest_api_get_composable_logic_dcp_with_http_infocf_manager_rest_api_get_composable_logic_dcp_with_http_info(username, password, cl_id, **kwargs) # noqa: E501
371  else:
372  (data) = self.cf_manager_rest_api_get_composable_logic_dcp_with_http_infocf_manager_rest_api_get_composable_logic_dcp_with_http_info(username, password, cl_id, **kwargs) # noqa: E501
373  return data
374 
375  def cf_manager_rest_api_get_composable_logic_dcp_with_http_info(self, username, password, cl_id, **kwargs): # noqa: E501
376  """Get the dcp file of a composable logic # noqa: E501
377 
378  This method makes a synchronous HTTP request by default. To make an
379  asynchronous HTTP request, please pass async_req=True
380  >>> thread = api.cf_manager_rest_api_get_composable_logic_dcp_with_http_info(username, password, cl_id, async_req=True)
381  >>> result = thread.get()
382 
383  :param async_req bool
384  :param str username: OpenStack username (required)
385  :param str password: OpenStack password (required)
386  :param int cl_id: ID of a composable logic (Static Shell or Mantles) (required)
387  :return: None
388  If the method is called asynchronously,
389  returns the request thread.
390  """
391 
392  all_params = ['username', 'password', 'cl_id'] # noqa: E501
393  all_params.append('async_req')
394  all_params.append('_return_http_data_only')
395  all_params.append('_preload_content')
396  all_params.append('_request_timeout')
397 
398  params = locals()
399  for key, val in six.iteritems(params['kwargs']):
400  if key not in all_params:
401  raise TypeError(
402  "Got an unexpected keyword argument '%s'"
403  " to method cf_manager_rest_api_get_composable_logic_dcp" % key
404  )
405  params[key] = val
406  del params['kwargs']
407  # verify the required parameter 'username' is set
408  if ('username' not in params or
409  params['username'] is None):
410  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_composable_logic_dcp`") # noqa: E501
411  # verify the required parameter 'password' is set
412  if ('password' not in params or
413  params['password'] is None):
414  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_composable_logic_dcp`") # noqa: E501
415  # verify the required parameter 'cl_id' is set
416  if ('cl_id' not in params or
417  params['cl_id'] is None):
418  raise ValueError("Missing the required parameter `cl_id` when calling `cf_manager_rest_api_get_composable_logic_dcp`") # noqa: E501
419 
420  collection_formats = {}
421 
422  path_params = {}
423  if 'cl_id' in params:
424  path_params['cl_id'] = params['cl_id'] # noqa: E501
425 
426  query_params = []
427  if 'username' in params:
428  query_params.append(('username', params['username'])) # noqa: E501
429  if 'password' in params:
430  query_params.append(('password', params['password'])) # noqa: E501
431 
432  header_params = {}
433 
434  form_params = []
435  local_var_files = {}
436 
437  body_params = None
438  # Authentication setting
439  auth_settings = [] # noqa: E501
440 
441  return self.api_clientapi_client.call_api(
442  '/composablelogic/{cl_id}/dcp', 'GET',
443  path_params,
444  query_params,
445  header_params,
446  body=body_params,
447  post_params=form_params,
448  files=local_var_files,
449  response_type=None, # noqa: E501
450  auth_settings=auth_settings,
451  async_req=params.get('async_req'),
452  _return_http_data_only=params.get('_return_http_data_only'),
453  _preload_content=params.get('_preload_content', True),
454  _request_timeout=params.get('_request_timeout'),
455  collection_formats=collection_formats)
456 
457  def cf_manager_rest_api_get_composable_logic_meta(self, username, password, cl_id, **kwargs): # noqa: E501
458  """Get the meta data of a composable logic # noqa: E501
459 
460  This method makes a synchronous HTTP request by default. To make an
461  asynchronous HTTP request, please pass async_req=True
462  >>> thread = api.cf_manager_rest_api_get_composable_logic_meta(username, password, cl_id, async_req=True)
463  >>> result = thread.get()
464 
465  :param async_req bool
466  :param str username: OpenStack username (required)
467  :param str password: OpenStack password (required)
468  :param int cl_id: ID of a composable logic (Static Shell or Mantles) (required)
469  :return: Image
470  If the method is called asynchronously,
471  returns the request thread.
472  """
473  kwargs['_return_http_data_only'] = True
474  if kwargs.get('async_req'):
475  return self.cf_manager_rest_api_get_composable_logic_meta_with_http_infocf_manager_rest_api_get_composable_logic_meta_with_http_info(username, password, cl_id, **kwargs) # noqa: E501
476  else:
477  (data) = self.cf_manager_rest_api_get_composable_logic_meta_with_http_infocf_manager_rest_api_get_composable_logic_meta_with_http_info(username, password, cl_id, **kwargs) # noqa: E501
478  return data
479 
480  def cf_manager_rest_api_get_composable_logic_meta_with_http_info(self, username, password, cl_id, **kwargs): # noqa: E501
481  """Get the meta data of a composable logic # noqa: E501
482 
483  This method makes a synchronous HTTP request by default. To make an
484  asynchronous HTTP request, please pass async_req=True
485  >>> thread = api.cf_manager_rest_api_get_composable_logic_meta_with_http_info(username, password, cl_id, async_req=True)
486  >>> result = thread.get()
487 
488  :param async_req bool
489  :param str username: OpenStack username (required)
490  :param str password: OpenStack password (required)
491  :param int cl_id: ID of a composable logic (Static Shell or Mantles) (required)
492  :return: Image
493  If the method is called asynchronously,
494  returns the request thread.
495  """
496 
497  all_params = ['username', 'password', 'cl_id'] # noqa: E501
498  all_params.append('async_req')
499  all_params.append('_return_http_data_only')
500  all_params.append('_preload_content')
501  all_params.append('_request_timeout')
502 
503  params = locals()
504  for key, val in six.iteritems(params['kwargs']):
505  if key not in all_params:
506  raise TypeError(
507  "Got an unexpected keyword argument '%s'"
508  " to method cf_manager_rest_api_get_composable_logic_meta" % key
509  )
510  params[key] = val
511  del params['kwargs']
512  # verify the required parameter 'username' is set
513  if ('username' not in params or
514  params['username'] is None):
515  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_composable_logic_meta`") # noqa: E501
516  # verify the required parameter 'password' is set
517  if ('password' not in params or
518  params['password'] is None):
519  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_composable_logic_meta`") # noqa: E501
520  # verify the required parameter 'cl_id' is set
521  if ('cl_id' not in params or
522  params['cl_id'] is None):
523  raise ValueError("Missing the required parameter `cl_id` when calling `cf_manager_rest_api_get_composable_logic_meta`") # noqa: E501
524 
525  collection_formats = {}
526 
527  path_params = {}
528  if 'cl_id' in params:
529  path_params['cl_id'] = params['cl_id'] # noqa: E501
530 
531  query_params = []
532  if 'username' in params:
533  query_params.append(('username', params['username'])) # noqa: E501
534  if 'password' in params:
535  query_params.append(('password', params['password'])) # noqa: E501
536 
537  header_params = {}
538 
539  form_params = []
540  local_var_files = {}
541 
542  body_params = None
543  # HTTP header `Accept`
544  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
545  ['application/json']) # noqa: E501
546 
547  # Authentication setting
548  auth_settings = [] # noqa: E501
549 
550  return self.api_clientapi_client.call_api(
551  '/composablelogic/{cl_id}/meta', 'GET',
552  path_params,
553  query_params,
554  header_params,
555  body=body_params,
556  post_params=form_params,
557  files=local_var_files,
558  response_type='Image', # noqa: E501
559  auth_settings=auth_settings,
560  async_req=params.get('async_req'),
561  _return_http_data_only=params.get('_return_http_data_only'),
562  _preload_content=params.get('_preload_content', True),
563  _request_timeout=params.get('_request_timeout'),
564  collection_formats=collection_formats)
def cf_manager_rest_api_get_composable_logic_all_shell_type_with_http_info(self, username, password, shell_type, **kwargs)
def cf_manager_rest_api_get_composable_logic_all_shell_type(self, username, password, shell_type, **kwargs)