cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
instances_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 InstancesApi(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_app_restart_instance(self, username, password, instance_id, **kwargs): # noqa: E501
36  """Triggers app restart of this instance # 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_app_restart_instance(username, password, instance_id, 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 instance_id: ROLE instance unique identifier (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_app_restart_instance_with_http_infocf_manager_rest_api_app_restart_instance_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
54  else:
55  (data) = self.cf_manager_rest_api_app_restart_instance_with_http_infocf_manager_rest_api_app_restart_instance_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
56  return data
57 
58  def cf_manager_rest_api_app_restart_instance_with_http_info(self, username, password, instance_id, **kwargs): # noqa: E501
59  """Triggers app restart of this instance # 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_app_restart_instance_with_http_info(username, password, instance_id, 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 instance_id: ROLE instance unique identifier (required)
70  :return: None
71  If the method is called asynchronously,
72  returns the request thread.
73  """
74 
75  all_params = ['username', 'password', 'instance_id'] # 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_app_restart_instance" % 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_app_restart_instance`") # 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_app_restart_instance`") # noqa: E501
98  # verify the required parameter 'instance_id' is set
99  if ('instance_id' not in params or
100  params['instance_id'] is None):
101  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_app_restart_instance`") # noqa: E501
102 
103  collection_formats = {}
104 
105  path_params = {}
106  if 'instance_id' in params:
107  path_params['instance_id'] = params['instance_id'] # 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  '/instances/{instance_id}/app_restart', 'PATCH',
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_delete_instance(self, username, password, instance_id, **kwargs): # noqa: E501
141  """Remove an instance # 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_delete_instance(username, password, instance_id, 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 str instance_id: ROLE instance unique identifier (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_delete_instance_with_http_infocf_manager_rest_api_delete_instance_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
159  else:
160  (data) = self.cf_manager_rest_api_delete_instance_with_http_infocf_manager_rest_api_delete_instance_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
161  return data
162 
163  def cf_manager_rest_api_delete_instance_with_http_info(self, username, password, instance_id, **kwargs): # noqa: E501
164  """Remove an instance # 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_delete_instance_with_http_info(username, password, instance_id, 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 str instance_id: ROLE instance unique identifier (required)
175  :return: None
176  If the method is called asynchronously,
177  returns the request thread.
178  """
179 
180  all_params = ['username', 'password', 'instance_id'] # 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_delete_instance" % 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_delete_instance`") # 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_delete_instance`") # noqa: E501
203  # verify the required parameter 'instance_id' is set
204  if ('instance_id' not in params or
205  params['instance_id'] is None):
206  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_delete_instance`") # noqa: E501
207 
208  collection_formats = {}
209 
210  path_params = {}
211  if 'instance_id' in params:
212  path_params['instance_id'] = params['instance_id'] # 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  '/instances/{instance_id}', 'DELETE',
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_instance(self, username, password, instance_id, **kwargs): # noqa: E501
246  """Get a single instance # noqa: E501
247 
248  This method makes a synchronous HTTP request by default. To make an
249  asynchronous HTTP request, please pass async_req=True
250  >>> thread = api.cf_manager_rest_api_get_instance(username, password, instance_id, async_req=True)
251  >>> result = thread.get()
252 
253  :param async_req bool
254  :param str username: OpenStack username (required)
255  :param str password: OpenStack password (required)
256  :param str instance_id: ROLE instance unique identifier (required)
257  :return: Instance
258  If the method is called asynchronously,
259  returns the request thread.
260  """
261  kwargs['_return_http_data_only'] = True
262  if kwargs.get('async_req'):
263  return self.cf_manager_rest_api_get_instance_with_http_infocf_manager_rest_api_get_instance_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
264  else:
265  (data) = self.cf_manager_rest_api_get_instance_with_http_infocf_manager_rest_api_get_instance_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
266  return data
267 
268  def cf_manager_rest_api_get_instance_with_http_info(self, username, password, instance_id, **kwargs): # noqa: E501
269  """Get a single instance # noqa: E501
270 
271  This method makes a synchronous HTTP request by default. To make an
272  asynchronous HTTP request, please pass async_req=True
273  >>> thread = api.cf_manager_rest_api_get_instance_with_http_info(username, password, instance_id, async_req=True)
274  >>> result = thread.get()
275 
276  :param async_req bool
277  :param str username: OpenStack username (required)
278  :param str password: OpenStack password (required)
279  :param str instance_id: ROLE instance unique identifier (required)
280  :return: Instance
281  If the method is called asynchronously,
282  returns the request thread.
283  """
284 
285  all_params = ['username', 'password', 'instance_id'] # noqa: E501
286  all_params.append('async_req')
287  all_params.append('_return_http_data_only')
288  all_params.append('_preload_content')
289  all_params.append('_request_timeout')
290 
291  params = locals()
292  for key, val in six.iteritems(params['kwargs']):
293  if key not in all_params:
294  raise TypeError(
295  "Got an unexpected keyword argument '%s'"
296  " to method cf_manager_rest_api_get_instance" % key
297  )
298  params[key] = val
299  del params['kwargs']
300  # verify the required parameter 'username' is set
301  if ('username' not in params or
302  params['username'] is None):
303  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_instance`") # noqa: E501
304  # verify the required parameter 'password' is set
305  if ('password' not in params or
306  params['password'] is None):
307  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_instance`") # noqa: E501
308  # verify the required parameter 'instance_id' is set
309  if ('instance_id' not in params or
310  params['instance_id'] is None):
311  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_get_instance`") # noqa: E501
312 
313  collection_formats = {}
314 
315  path_params = {}
316  if 'instance_id' in params:
317  path_params['instance_id'] = params['instance_id'] # noqa: E501
318 
319  query_params = []
320  if 'username' in params:
321  query_params.append(('username', params['username'])) # noqa: E501
322  if 'password' in params:
323  query_params.append(('password', params['password'])) # noqa: E501
324 
325  header_params = {}
326 
327  form_params = []
328  local_var_files = {}
329 
330  body_params = None
331  # HTTP header `Accept`
332  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
333  ['application/json']) # noqa: E501
334 
335  # Authentication setting
336  auth_settings = [] # noqa: E501
337 
338  return self.api_clientapi_client.call_api(
339  '/instances/{instance_id}', 'GET',
340  path_params,
341  query_params,
342  header_params,
343  body=body_params,
344  post_params=form_params,
345  files=local_var_files,
346  response_type='Instance', # noqa: E501
347  auth_settings=auth_settings,
348  async_req=params.get('async_req'),
349  _return_http_data_only=params.get('_return_http_data_only'),
350  _preload_content=params.get('_preload_content', True),
351  _request_timeout=params.get('_request_timeout'),
352  collection_formats=collection_formats)
353 
354  def cf_manager_rest_api_get_instances(self, username, password, **kwargs): # noqa: E501
355  """Get all instances of a user # noqa: E501
356 
357  This method makes a synchronous HTTP request by default. To make an
358  asynchronous HTTP request, please pass async_req=True
359  >>> thread = api.cf_manager_rest_api_get_instances(username, password, async_req=True)
360  >>> result = thread.get()
361 
362  :param async_req bool
363  :param str username: OpenStack username (required)
364  :param str password: OpenStack password (required)
365  :param int limit:
366  :return: list[Instance]
367  If the method is called asynchronously,
368  returns the request thread.
369  """
370  kwargs['_return_http_data_only'] = True
371  if kwargs.get('async_req'):
372  return self.cf_manager_rest_api_get_instances_with_http_infocf_manager_rest_api_get_instances_with_http_info(username, password, **kwargs) # noqa: E501
373  else:
374  (data) = self.cf_manager_rest_api_get_instances_with_http_infocf_manager_rest_api_get_instances_with_http_info(username, password, **kwargs) # noqa: E501
375  return data
376 
377  def cf_manager_rest_api_get_instances_with_http_info(self, username, password, **kwargs): # noqa: E501
378  """Get all instances of a user # noqa: E501
379 
380  This method makes a synchronous HTTP request by default. To make an
381  asynchronous HTTP request, please pass async_req=True
382  >>> thread = api.cf_manager_rest_api_get_instances_with_http_info(username, password, async_req=True)
383  >>> result = thread.get()
384 
385  :param async_req bool
386  :param str username: OpenStack username (required)
387  :param str password: OpenStack password (required)
388  :param int limit:
389  :return: list[Instance]
390  If the method is called asynchronously,
391  returns the request thread.
392  """
393 
394  all_params = ['username', 'password', 'limit'] # noqa: E501
395  all_params.append('async_req')
396  all_params.append('_return_http_data_only')
397  all_params.append('_preload_content')
398  all_params.append('_request_timeout')
399 
400  params = locals()
401  for key, val in six.iteritems(params['kwargs']):
402  if key not in all_params:
403  raise TypeError(
404  "Got an unexpected keyword argument '%s'"
405  " to method cf_manager_rest_api_get_instances" % key
406  )
407  params[key] = val
408  del params['kwargs']
409  # verify the required parameter 'username' is set
410  if ('username' not in params or
411  params['username'] is None):
412  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_get_instances`") # noqa: E501
413  # verify the required parameter 'password' is set
414  if ('password' not in params or
415  params['password'] is None):
416  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_get_instances`") # noqa: E501
417 
418  collection_formats = {}
419 
420  path_params = {}
421 
422  query_params = []
423  if 'username' in params:
424  query_params.append(('username', params['username'])) # noqa: E501
425  if 'password' in params:
426  query_params.append(('password', params['password'])) # noqa: E501
427  if 'limit' in params:
428  query_params.append(('limit', params['limit'])) # noqa: E501
429 
430  header_params = {}
431 
432  form_params = []
433  local_var_files = {}
434 
435  body_params = None
436  # HTTP header `Accept`
437  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
438  ['application/json']) # noqa: E501
439 
440  # Authentication setting
441  auth_settings = [] # noqa: E501
442 
443  return self.api_clientapi_client.call_api(
444  '/instances', 'GET',
445  path_params,
446  query_params,
447  header_params,
448  body=body_params,
449  post_params=form_params,
450  files=local_var_files,
451  response_type='list[Instance]', # noqa: E501
452  auth_settings=auth_settings,
453  async_req=params.get('async_req'),
454  _return_http_data_only=params.get('_return_http_data_only'),
455  _preload_content=params.get('_preload_content', True),
456  _request_timeout=params.get('_request_timeout'),
457  collection_formats=collection_formats)
458 
459  def cf_manager_rest_api_instance_api_gateway(self, body, username, password, instance_id, **kwargs): # noqa: E501
460  """Forwards a custom HTTP API request # noqa: E501
461 
462  Forwards a custom HTTP API request to the FMC/Middleware (management interface) and returns the answer. Before forwarding the request, a filter will be applied to block unauthorized access. # noqa: E501
463  This method makes a synchronous HTTP request by default. To make an
464  asynchronous HTTP request, please pass async_req=True
465  >>> thread = api.cf_manager_rest_api_instance_api_gateway(body, username, password, instance_id, async_req=True)
466  >>> result = thread.get()
467 
468  :param async_req bool
469  :param InstanceIdApiGatewayBody body: (required)
470  :param str username: OpenStack username (required)
471  :param str password: OpenStack password (required)
472  :param str instance_id: ROLE instance unique identifier (required)
473  :return: None
474  If the method is called asynchronously,
475  returns the request thread.
476  """
477  kwargs['_return_http_data_only'] = True
478  if kwargs.get('async_req'):
479  return self.cf_manager_rest_api_instance_api_gateway_with_http_infocf_manager_rest_api_instance_api_gateway_with_http_info(body, username, password, instance_id, **kwargs) # noqa: E501
480  else:
481  (data) = self.cf_manager_rest_api_instance_api_gateway_with_http_infocf_manager_rest_api_instance_api_gateway_with_http_info(body, username, password, instance_id, **kwargs) # noqa: E501
482  return data
483 
484  def cf_manager_rest_api_instance_api_gateway_with_http_info(self, body, username, password, instance_id, **kwargs): # noqa: E501
485  """Forwards a custom HTTP API request # noqa: E501
486 
487  Forwards a custom HTTP API request to the FMC/Middleware (management interface) and returns the answer. Before forwarding the request, a filter will be applied to block unauthorized access. # noqa: E501
488  This method makes a synchronous HTTP request by default. To make an
489  asynchronous HTTP request, please pass async_req=True
490  >>> thread = api.cf_manager_rest_api_instance_api_gateway_with_http_info(body, username, password, instance_id, async_req=True)
491  >>> result = thread.get()
492 
493  :param async_req bool
494  :param InstanceIdApiGatewayBody body: (required)
495  :param str username: OpenStack username (required)
496  :param str password: OpenStack password (required)
497  :param str instance_id: ROLE instance unique identifier (required)
498  :return: None
499  If the method is called asynchronously,
500  returns the request thread.
501  """
502 
503  all_params = ['body', 'username', 'password', 'instance_id'] # noqa: E501
504  all_params.append('async_req')
505  all_params.append('_return_http_data_only')
506  all_params.append('_preload_content')
507  all_params.append('_request_timeout')
508 
509  params = locals()
510  for key, val in six.iteritems(params['kwargs']):
511  if key not in all_params:
512  raise TypeError(
513  "Got an unexpected keyword argument '%s'"
514  " to method cf_manager_rest_api_instance_api_gateway" % key
515  )
516  params[key] = val
517  del params['kwargs']
518  # verify the required parameter 'body' is set
519  if ('body' not in params or
520  params['body'] is None):
521  raise ValueError("Missing the required parameter `body` when calling `cf_manager_rest_api_instance_api_gateway`") # noqa: E501
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_instance_api_gateway`") # 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_instance_api_gateway`") # noqa: E501
530  # verify the required parameter 'instance_id' is set
531  if ('instance_id' not in params or
532  params['instance_id'] is None):
533  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_instance_api_gateway`") # noqa: E501
534 
535  collection_formats = {}
536 
537  path_params = {}
538  if 'instance_id' in params:
539  path_params['instance_id'] = params['instance_id'] # noqa: E501
540 
541  query_params = []
542  if 'username' in params:
543  query_params.append(('username', params['username'])) # noqa: E501
544  if 'password' in params:
545  query_params.append(('password', params['password'])) # noqa: E501
546 
547  header_params = {}
548 
549  form_params = []
550  local_var_files = {}
551 
552  body_params = None
553  if 'body' in params:
554  body_params = params['body']
555  # HTTP header `Content-Type`
556  header_params['Content-Type'] = self.api_clientapi_client.select_header_content_type( # noqa: E501
557  ['application/json']) # noqa: E501
558 
559  # Authentication setting
560  auth_settings = [] # noqa: E501
561 
562  return self.api_clientapi_client.call_api(
563  '/instances/{instance_id}/api_gateway', 'POST',
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_instance_change_runlevel(self, new_runlevel, username, password, instance_id, **kwargs): # noqa: E501
579  """Changes the `runlevel` of the instance (stack developers only) # 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_instance_change_runlevel(new_runlevel, username, password, instance_id, async_req=True)
584  >>> result = thread.get()
585 
586  :param async_req bool
587  :param int new_runlevel: (required)
588  :param str username: OpenStack username (required)
589  :param str password: OpenStack password (required)
590  :param str instance_id: ROLE instance unique identifier (required)
591  :return: None
592  If the method is called asynchronously,
593  returns the request thread.
594  """
595  kwargs['_return_http_data_only'] = True
596  if kwargs.get('async_req'):
597  return self.cf_manager_rest_api_instance_change_runlevel_with_http_infocf_manager_rest_api_instance_change_runlevel_with_http_info(new_runlevel, username, password, instance_id, **kwargs) # noqa: E501
598  else:
599  (data) = self.cf_manager_rest_api_instance_change_runlevel_with_http_infocf_manager_rest_api_instance_change_runlevel_with_http_info(new_runlevel, username, password, instance_id, **kwargs) # noqa: E501
600  return data
601 
602  def cf_manager_rest_api_instance_change_runlevel_with_http_info(self, new_runlevel, username, password, instance_id, **kwargs): # noqa: E501
603  """Changes the `runlevel` of the instance (stack developers only) # noqa: E501
604 
605  This method makes a synchronous HTTP request by default. To make an
606  asynchronous HTTP request, please pass async_req=True
607  >>> thread = api.cf_manager_rest_api_instance_change_runlevel_with_http_info(new_runlevel, username, password, instance_id, async_req=True)
608  >>> result = thread.get()
609 
610  :param async_req bool
611  :param int new_runlevel: (required)
612  :param str username: OpenStack username (required)
613  :param str password: OpenStack password (required)
614  :param str instance_id: ROLE instance unique identifier (required)
615  :return: None
616  If the method is called asynchronously,
617  returns the request thread.
618  """
619 
620  all_params = ['new_runlevel', 'username', 'password', 'instance_id'] # noqa: E501
621  all_params.append('async_req')
622  all_params.append('_return_http_data_only')
623  all_params.append('_preload_content')
624  all_params.append('_request_timeout')
625 
626  params = locals()
627  for key, val in six.iteritems(params['kwargs']):
628  if key not in all_params:
629  raise TypeError(
630  "Got an unexpected keyword argument '%s'"
631  " to method cf_manager_rest_api_instance_change_runlevel" % key
632  )
633  params[key] = val
634  del params['kwargs']
635  # verify the required parameter 'new_runlevel' is set
636  if ('new_runlevel' not in params or
637  params['new_runlevel'] is None):
638  raise ValueError("Missing the required parameter `new_runlevel` when calling `cf_manager_rest_api_instance_change_runlevel`") # noqa: E501
639  # verify the required parameter 'username' is set
640  if ('username' not in params or
641  params['username'] is None):
642  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_instance_change_runlevel`") # noqa: E501
643  # verify the required parameter 'password' is set
644  if ('password' not in params or
645  params['password'] is None):
646  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_instance_change_runlevel`") # noqa: E501
647  # verify the required parameter 'instance_id' is set
648  if ('instance_id' not in params or
649  params['instance_id'] is None):
650  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_instance_change_runlevel`") # noqa: E501
651 
652  collection_formats = {}
653 
654  path_params = {}
655  if 'instance_id' in params:
656  path_params['instance_id'] = params['instance_id'] # noqa: E501
657 
658  query_params = []
659  if 'username' in params:
660  query_params.append(('username', params['username'])) # noqa: E501
661  if 'password' in params:
662  query_params.append(('password', params['password'])) # noqa: E501
663 
664  header_params = {}
665 
666  form_params = []
667  local_var_files = {}
668  if 'new_runlevel' in params:
669  form_params.append(('new_runlevel', params['new_runlevel'])) # noqa: E501
670 
671  body_params = None
672  # HTTP header `Content-Type`
673  header_params['Content-Type'] = self.api_clientapi_client.select_header_content_type( # noqa: E501
674  ['multipart/form-data']) # noqa: E501
675 
676  # Authentication setting
677  auth_settings = [] # noqa: E501
678 
679  return self.api_clientapi_client.call_api(
680  '/instances/{instance_id}/runlevel', 'POST',
681  path_params,
682  query_params,
683  header_params,
684  body=body_params,
685  post_params=form_params,
686  files=local_var_files,
687  response_type=None, # noqa: E501
688  auth_settings=auth_settings,
689  async_req=params.get('async_req'),
690  _return_http_data_only=params.get('_return_http_data_only'),
691  _preload_content=params.get('_preload_content', True),
692  _request_timeout=params.get('_request_timeout'),
693  collection_formats=collection_formats)
694 
695  def cf_manager_rest_api_instance_get_runlevel(self, username, password, instance_id, **kwargs): # noqa: E501
696  """Returns the current `runlevel` of the instance (stack developers only) # noqa: E501
697 
698  This method makes a synchronous HTTP request by default. To make an
699  asynchronous HTTP request, please pass async_req=True
700  >>> thread = api.cf_manager_rest_api_instance_get_runlevel(username, password, instance_id, async_req=True)
701  >>> result = thread.get()
702 
703  :param async_req bool
704  :param str username: OpenStack username (required)
705  :param str password: OpenStack password (required)
706  :param str instance_id: ROLE instance unique identifier (required)
707  :return: InlineResponse2005
708  If the method is called asynchronously,
709  returns the request thread.
710  """
711  kwargs['_return_http_data_only'] = True
712  if kwargs.get('async_req'):
713  return self.cf_manager_rest_api_instance_get_runlevel_with_http_infocf_manager_rest_api_instance_get_runlevel_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
714  else:
715  (data) = self.cf_manager_rest_api_instance_get_runlevel_with_http_infocf_manager_rest_api_instance_get_runlevel_with_http_info(username, password, instance_id, **kwargs) # noqa: E501
716  return data
717 
718  def cf_manager_rest_api_instance_get_runlevel_with_http_info(self, username, password, instance_id, **kwargs): # noqa: E501
719  """Returns the current `runlevel` of the instance (stack developers only) # noqa: E501
720 
721  This method makes a synchronous HTTP request by default. To make an
722  asynchronous HTTP request, please pass async_req=True
723  >>> thread = api.cf_manager_rest_api_instance_get_runlevel_with_http_info(username, password, instance_id, async_req=True)
724  >>> result = thread.get()
725 
726  :param async_req bool
727  :param str username: OpenStack username (required)
728  :param str password: OpenStack password (required)
729  :param str instance_id: ROLE instance unique identifier (required)
730  :return: InlineResponse2005
731  If the method is called asynchronously,
732  returns the request thread.
733  """
734 
735  all_params = ['username', 'password', 'instance_id'] # noqa: E501
736  all_params.append('async_req')
737  all_params.append('_return_http_data_only')
738  all_params.append('_preload_content')
739  all_params.append('_request_timeout')
740 
741  params = locals()
742  for key, val in six.iteritems(params['kwargs']):
743  if key not in all_params:
744  raise TypeError(
745  "Got an unexpected keyword argument '%s'"
746  " to method cf_manager_rest_api_instance_get_runlevel" % key
747  )
748  params[key] = val
749  del params['kwargs']
750  # verify the required parameter 'username' is set
751  if ('username' not in params or
752  params['username'] is None):
753  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_instance_get_runlevel`") # noqa: E501
754  # verify the required parameter 'password' is set
755  if ('password' not in params or
756  params['password'] is None):
757  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_instance_get_runlevel`") # noqa: E501
758  # verify the required parameter 'instance_id' is set
759  if ('instance_id' not in params or
760  params['instance_id'] is None):
761  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_instance_get_runlevel`") # noqa: E501
762 
763  collection_formats = {}
764 
765  path_params = {}
766  if 'instance_id' in params:
767  path_params['instance_id'] = params['instance_id'] # noqa: E501
768 
769  query_params = []
770  if 'username' in params:
771  query_params.append(('username', params['username'])) # noqa: E501
772  if 'password' in params:
773  query_params.append(('password', params['password'])) # noqa: E501
774 
775  header_params = {}
776 
777  form_params = []
778  local_var_files = {}
779 
780  body_params = None
781  # HTTP header `Accept`
782  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
783  ['application/json']) # noqa: E501
784 
785  # Authentication setting
786  auth_settings = [] # noqa: E501
787 
788  return self.api_clientapi_client.call_api(
789  '/instances/{instance_id}/runlevel', 'GET',
790  path_params,
791  query_params,
792  header_params,
793  body=body_params,
794  post_params=form_params,
795  files=local_var_files,
796  response_type='InlineResponse2005', # noqa: E501
797  auth_settings=auth_settings,
798  async_req=params.get('async_req'),
799  _return_http_data_only=params.get('_return_http_data_only'),
800  _preload_content=params.get('_preload_content', True),
801  _request_timeout=params.get('_request_timeout'),
802  collection_formats=collection_formats)
803 
804  def cf_manager_rest_api_post_instances(self, image_id, username, password, **kwargs): # noqa: E501
805  """Create an instance # noqa: E501
806 
807  This configures an FPGA of type `fpga_board` (from the image metadata) with the given image and sets up the network accordingly. Please contact the administrators, if this request failed several times with `500` or `507`. If a user belongs to multiple projects, the Quota of the first project (in alphabetical order) is used. If another Quota should be used, the parameter `project_name` must be set accordingly. If the given image is a partial bitstream, the partial reconfiguration flow is applied automatically (`breed` is `\"ROLE\"`). In that case, this request tries to find a resource with the corresponding `shell_type` as defined by the image. If no board with the requested `shell_type` is available, one board gets configured with the newest `shell_type` SHELL image. # noqa: E501
808  This method makes a synchronous HTTP request by default. To make an
809  asynchronous HTTP request, please pass async_req=True
810  >>> thread = api.cf_manager_rest_api_post_instances(image_id, username, password, async_req=True)
811  >>> result = thread.get()
812 
813  :param async_req bool
814  :param str image_id: (required)
815  :param str username: OpenStack username (required)
816  :param str password: OpenStack password (required)
817  :param str project_name: Name of the OpenStack project the quota should be acounted to, if a user has multiple projects.
818  :param int dont_verify_memory: If 1, don't verify the DDR4 memory during setup
819  :return: InlineResponse2001
820  If the method is called asynchronously,
821  returns the request thread.
822  """
823  kwargs['_return_http_data_only'] = True
824  if kwargs.get('async_req'):
825  return self.cf_manager_rest_api_post_instances_with_http_infocf_manager_rest_api_post_instances_with_http_info(image_id, username, password, **kwargs) # noqa: E501
826  else:
827  (data) = self.cf_manager_rest_api_post_instances_with_http_infocf_manager_rest_api_post_instances_with_http_info(image_id, username, password, **kwargs) # noqa: E501
828  return data
829 
830  def cf_manager_rest_api_post_instances_with_http_info(self, image_id, username, password, **kwargs): # noqa: E501
831  """Create an instance # noqa: E501
832 
833  This configures an FPGA of type `fpga_board` (from the image metadata) with the given image and sets up the network accordingly. Please contact the administrators, if this request failed several times with `500` or `507`. If a user belongs to multiple projects, the Quota of the first project (in alphabetical order) is used. If another Quota should be used, the parameter `project_name` must be set accordingly. If the given image is a partial bitstream, the partial reconfiguration flow is applied automatically (`breed` is `\"ROLE\"`). In that case, this request tries to find a resource with the corresponding `shell_type` as defined by the image. If no board with the requested `shell_type` is available, one board gets configured with the newest `shell_type` SHELL image. # noqa: E501
834  This method makes a synchronous HTTP request by default. To make an
835  asynchronous HTTP request, please pass async_req=True
836  >>> thread = api.cf_manager_rest_api_post_instances_with_http_info(image_id, username, password, async_req=True)
837  >>> result = thread.get()
838 
839  :param async_req bool
840  :param str image_id: (required)
841  :param str username: OpenStack username (required)
842  :param str password: OpenStack password (required)
843  :param str project_name: Name of the OpenStack project the quota should be acounted to, if a user has multiple projects.
844  :param int dont_verify_memory: If 1, don't verify the DDR4 memory during setup
845  :return: InlineResponse2001
846  If the method is called asynchronously,
847  returns the request thread.
848  """
849 
850  all_params = ['image_id', 'username', 'password', 'project_name', 'dont_verify_memory'] # noqa: E501
851  all_params.append('async_req')
852  all_params.append('_return_http_data_only')
853  all_params.append('_preload_content')
854  all_params.append('_request_timeout')
855 
856  params = locals()
857  for key, val in six.iteritems(params['kwargs']):
858  if key not in all_params:
859  raise TypeError(
860  "Got an unexpected keyword argument '%s'"
861  " to method cf_manager_rest_api_post_instances" % key
862  )
863  params[key] = val
864  del params['kwargs']
865  # verify the required parameter 'image_id' is set
866  if ('image_id' not in params or
867  params['image_id'] is None):
868  raise ValueError("Missing the required parameter `image_id` when calling `cf_manager_rest_api_post_instances`") # noqa: E501
869  # verify the required parameter 'username' is set
870  if ('username' not in params or
871  params['username'] is None):
872  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_post_instances`") # noqa: E501
873  # verify the required parameter 'password' is set
874  if ('password' not in params or
875  params['password'] is None):
876  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_post_instances`") # noqa: E501
877 
878  collection_formats = {}
879 
880  path_params = {}
881 
882  query_params = []
883  if 'username' in params:
884  query_params.append(('username', params['username'])) # noqa: E501
885  if 'password' in params:
886  query_params.append(('password', params['password'])) # noqa: E501
887  if 'project_name' in params:
888  query_params.append(('project_name', params['project_name'])) # noqa: E501
889  if 'dont_verify_memory' in params:
890  query_params.append(('dont_verify_memory', params['dont_verify_memory'])) # noqa: E501
891 
892  header_params = {}
893 
894  form_params = []
895  local_var_files = {}
896  if 'image_id' in params:
897  form_params.append(('image_id', params['image_id'])) # noqa: E501
898 
899  body_params = None
900  # HTTP header `Accept`
901  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
902  ['application/json']) # noqa: E501
903 
904  # HTTP header `Content-Type`
905  header_params['Content-Type'] = self.api_clientapi_client.select_header_content_type( # noqa: E501
906  ['multipart/form-data']) # noqa: E501
907 
908  # Authentication setting
909  auth_settings = [] # noqa: E501
910 
911  return self.api_clientapi_client.call_api(
912  '/instances', 'POST',
913  path_params,
914  query_params,
915  header_params,
916  body=body_params,
917  post_params=form_params,
918  files=local_var_files,
919  response_type='InlineResponse2001', # noqa: E501
920  auth_settings=auth_settings,
921  async_req=params.get('async_req'),
922  _return_http_data_only=params.get('_return_http_data_only'),
923  _preload_content=params.get('_preload_content', True),
924  _request_timeout=params.get('_request_timeout'),
925  collection_formats=collection_formats)
926 
927  def cf_manager_rest_api_update_instance(self, image_id, username, password, instance_id, **kwargs): # noqa: E501
928  """Reprogramm an instance # noqa: E501
929 
930  Reprogram an instance with the submitted image and configure all current settings again afterwards. Hence, this call reuses the same FPGA again (in opposition to DELETE and POST again). This is **intended only for single instances**, not to update one instance out of a cluster. **If this call fails with `507`** and the FPGA worked without any problems before, then the submitted image probably doesn't work (i.e. `507` doesn't imply a failure of the FPGA board). # noqa: E501
931  This method makes a synchronous HTTP request by default. To make an
932  asynchronous HTTP request, please pass async_req=True
933  >>> thread = api.cf_manager_rest_api_update_instance(image_id, username, password, instance_id, async_req=True)
934  >>> result = thread.get()
935 
936  :param async_req bool
937  :param str image_id: (required)
938  :param str username: OpenStack username (required)
939  :param str password: OpenStack password (required)
940  :param str instance_id: ROLE instance unique identifier (required)
941  :param int dont_verify_memory: If 1, don't verify the DDR4 memory during setup
942  :return: InlineResponse2001
943  If the method is called asynchronously,
944  returns the request thread.
945  """
946  kwargs['_return_http_data_only'] = True
947  if kwargs.get('async_req'):
948  return self.cf_manager_rest_api_update_instance_with_http_infocf_manager_rest_api_update_instance_with_http_info(image_id, username, password, instance_id, **kwargs) # noqa: E501
949  else:
950  (data) = self.cf_manager_rest_api_update_instance_with_http_infocf_manager_rest_api_update_instance_with_http_info(image_id, username, password, instance_id, **kwargs) # noqa: E501
951  return data
952 
953  def cf_manager_rest_api_update_instance_with_http_info(self, image_id, username, password, instance_id, **kwargs): # noqa: E501
954  """Reprogramm an instance # noqa: E501
955 
956  Reprogram an instance with the submitted image and configure all current settings again afterwards. Hence, this call reuses the same FPGA again (in opposition to DELETE and POST again). This is **intended only for single instances**, not to update one instance out of a cluster. **If this call fails with `507`** and the FPGA worked without any problems before, then the submitted image probably doesn't work (i.e. `507` doesn't imply a failure of the FPGA board). # noqa: E501
957  This method makes a synchronous HTTP request by default. To make an
958  asynchronous HTTP request, please pass async_req=True
959  >>> thread = api.cf_manager_rest_api_update_instance_with_http_info(image_id, username, password, instance_id, async_req=True)
960  >>> result = thread.get()
961 
962  :param async_req bool
963  :param str image_id: (required)
964  :param str username: OpenStack username (required)
965  :param str password: OpenStack password (required)
966  :param str instance_id: ROLE instance unique identifier (required)
967  :param int dont_verify_memory: If 1, don't verify the DDR4 memory during setup
968  :return: InlineResponse2001
969  If the method is called asynchronously,
970  returns the request thread.
971  """
972 
973  all_params = ['image_id', 'username', 'password', 'instance_id', 'dont_verify_memory'] # noqa: E501
974  all_params.append('async_req')
975  all_params.append('_return_http_data_only')
976  all_params.append('_preload_content')
977  all_params.append('_request_timeout')
978 
979  params = locals()
980  for key, val in six.iteritems(params['kwargs']):
981  if key not in all_params:
982  raise TypeError(
983  "Got an unexpected keyword argument '%s'"
984  " to method cf_manager_rest_api_update_instance" % key
985  )
986  params[key] = val
987  del params['kwargs']
988  # verify the required parameter 'image_id' is set
989  if ('image_id' not in params or
990  params['image_id'] is None):
991  raise ValueError("Missing the required parameter `image_id` when calling `cf_manager_rest_api_update_instance`") # noqa: E501
992  # verify the required parameter 'username' is set
993  if ('username' not in params or
994  params['username'] is None):
995  raise ValueError("Missing the required parameter `username` when calling `cf_manager_rest_api_update_instance`") # noqa: E501
996  # verify the required parameter 'password' is set
997  if ('password' not in params or
998  params['password'] is None):
999  raise ValueError("Missing the required parameter `password` when calling `cf_manager_rest_api_update_instance`") # noqa: E501
1000  # verify the required parameter 'instance_id' is set
1001  if ('instance_id' not in params or
1002  params['instance_id'] is None):
1003  raise ValueError("Missing the required parameter `instance_id` when calling `cf_manager_rest_api_update_instance`") # noqa: E501
1004 
1005  collection_formats = {}
1006 
1007  path_params = {}
1008  if 'instance_id' in params:
1009  path_params['instance_id'] = params['instance_id'] # noqa: E501
1010 
1011  query_params = []
1012  if 'username' in params:
1013  query_params.append(('username', params['username'])) # noqa: E501
1014  if 'password' in params:
1015  query_params.append(('password', params['password'])) # noqa: E501
1016  if 'dont_verify_memory' in params:
1017  query_params.append(('dont_verify_memory', params['dont_verify_memory'])) # noqa: E501
1018 
1019  header_params = {}
1020 
1021  form_params = []
1022  local_var_files = {}
1023  if 'image_id' in params:
1024  form_params.append(('image_id', params['image_id'])) # noqa: E501
1025 
1026  body_params = None
1027  # HTTP header `Accept`
1028  header_params['Accept'] = self.api_clientapi_client.select_header_accept(
1029  ['application/json']) # noqa: E501
1030 
1031  # HTTP header `Content-Type`
1032  header_params['Content-Type'] = self.api_clientapi_client.select_header_content_type( # noqa: E501
1033  ['multipart/form-data']) # noqa: E501
1034 
1035  # Authentication setting
1036  auth_settings = [] # noqa: E501
1037 
1038  return self.api_clientapi_client.call_api(
1039  '/instances/{instance_id}', 'PUT',
1040  path_params,
1041  query_params,
1042  header_params,
1043  body=body_params,
1044  post_params=form_params,
1045  files=local_var_files,
1046  response_type='InlineResponse2001', # noqa: E501
1047  auth_settings=auth_settings,
1048  async_req=params.get('async_req'),
1049  _return_http_data_only=params.get('_return_http_data_only'),
1050  _preload_content=params.get('_preload_content', True),
1051  _request_timeout=params.get('_request_timeout'),
1052  collection_formats=collection_formats)
def cf_manager_rest_api_update_instance_with_http_info(self, image_id, username, password, instance_id, **kwargs)
def cf_manager_rest_api_app_restart_instance_with_http_info(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_app_restart_instance(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_instance_change_runlevel_with_http_info(self, new_runlevel, username, password, instance_id, **kwargs)
def cf_manager_rest_api_instance_change_runlevel(self, new_runlevel, username, password, instance_id, **kwargs)
def cf_manager_rest_api_delete_instance_with_http_info(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_post_instances_with_http_info(self, image_id, username, password, **kwargs)
def cf_manager_rest_api_instance_get_runlevel(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_get_instances(self, username, password, **kwargs)
def cf_manager_rest_api_delete_instance(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_get_instance_with_http_info(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_instance_api_gateway_with_http_info(self, body, username, password, instance_id, **kwargs)
def cf_manager_rest_api_get_instance(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_post_instances(self, image_id, username, password, **kwargs)
def cf_manager_rest_api_update_instance(self, image_id, username, password, instance_id, **kwargs)
def cf_manager_rest_api_instance_get_runlevel_with_http_info(self, username, password, instance_id, **kwargs)
def cf_manager_rest_api_instance_api_gateway(self, body, username, password, instance_id, **kwargs)
def cf_manager_rest_api_get_instances_with_http_info(self, username, password, **kwargs)