4 cloudFPGA Resource Manager API
6 No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
8 OpenAPI spec version: 0.8
10 Generated by: https://github.com/swagger-api/swagger-codegen.git
13 from __future__
import absolute_import
20 from swagger_client.api_client
import ApiClient
24 """NOTE: This class is auto generated by the swagger code generator program.
26 Do not edit the class manually.
27 Ref: https://github.com/swagger-api/swagger-codegen
31 if api_client
is None:
36 """Get the current quota of a project # noqa: E501
38 With this call a user can check how many FPGAs of his project are available for usage. # 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_get_project_quota(username, password, project_name, async_req=True)
42 >>> result = thread.get()
45 :param str username: OpenStack username (required)
46 :param str password: OpenStack password (required)
47 :param str project_name: Name of a OpenStack project (required)
49 If the method is called asynchronously,
50 returns the request thread.
52 kwargs[
'_return_http_data_only'] =
True
53 if kwargs.get(
'async_req'):
60 """Get the current quota of a project # noqa: E501
62 With this call a user can check how many FPGAs of his project are available for usage. # 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_get_project_quota_with_http_info(username, password, project_name, async_req=True)
66 >>> result = thread.get()
69 :param str username: OpenStack username (required)
70 :param str password: OpenStack password (required)
71 :param str project_name: Name of a OpenStack project (required)
73 If the method is called asynchronously,
74 returns the request thread.
77 all_params = [
'username',
'password',
'project_name']
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')
84 for key, val
in six.iteritems(params[
'kwargs']):
85 if key
not in all_params:
87 "Got an unexpected keyword argument '%s'"
88 " to method cf_manager_rest_api_get_project_quota" % key
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_get_project_quota`")
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_get_project_quota`")
101 if (
'project_name' not in params
or
102 params[
'project_name']
is None):
103 raise ValueError(
"Missing the required parameter `project_name` when calling `cf_manager_rest_api_get_project_quota`")
105 collection_formats = {}
108 if 'project_name' in params:
109 path_params[
'project_name'] = params[
'project_name']
112 if 'username' in params:
113 query_params.append((
'username', params[
'username']))
114 if 'password' in params:
115 query_params.append((
'password', params[
'password']))
124 header_params[
'Accept'] = self.
api_clientapi_client.select_header_accept(
125 [
'application/json'])
131 '/projects/{project_name}/quota/',
'GET',
136 post_params=form_params,
137 files=local_var_files,
138 response_type=
'Quota',
139 auth_settings=auth_settings,
140 async_req=params.get(
'async_req'),
141 _return_http_data_only=params.get(
'_return_http_data_only'),
142 _preload_content=params.get(
'_preload_content',
True),
143 _request_timeout=params.get(
'_request_timeout'),
144 collection_formats=collection_formats)
147 """List the projects the user belongs to # noqa: E501
149 This method makes a synchronous HTTP request by default. To make an
150 asynchronous HTTP request, please pass async_req=True
151 >>> thread = api.cf_manager_rest_api_list_projects(username, password, async_req=True)
152 >>> result = thread.get()
154 :param async_req bool
155 :param str username: OpenStack username (required)
156 :param str password: OpenStack password (required)
158 If the method is called asynchronously,
159 returns the request thread.
161 kwargs[
'_return_http_data_only'] =
True
162 if kwargs.get(
'async_req'):
169 """List the projects the user belongs to # noqa: E501
171 This method makes a synchronous HTTP request by default. To make an
172 asynchronous HTTP request, please pass async_req=True
173 >>> thread = api.cf_manager_rest_api_list_projects_with_http_info(username, password, async_req=True)
174 >>> result = thread.get()
176 :param async_req bool
177 :param str username: OpenStack username (required)
178 :param str password: OpenStack password (required)
180 If the method is called asynchronously,
181 returns the request thread.
184 all_params = [
'username',
'password']
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')
191 for key, val
in six.iteritems(params[
'kwargs']):
192 if key
not in all_params:
194 "Got an unexpected keyword argument '%s'"
195 " to method cf_manager_rest_api_list_projects" % key
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_list_projects`")
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_list_projects`")
208 collection_formats = {}
213 if 'username' in params:
214 query_params.append((
'username', params[
'username']))
215 if 'password' in params:
216 query_params.append((
'password', params[
'password']))
225 header_params[
'Accept'] = self.
api_clientapi_client.select_header_accept(
226 [
'application/json'])
237 post_params=form_params,
238 files=local_var_files,
239 response_type=
'list[str]',
240 auth_settings=auth_settings,
241 async_req=params.get(
'async_req'),
242 _return_http_data_only=params.get(
'_return_http_data_only'),
243 _preload_content=params.get(
'_preload_content',
True),
244 _request_timeout=params.get(
'_request_timeout'),
245 collection_formats=collection_formats)
248 """Post a new (or update existent) quota of a project (admin only) # noqa: E501
250 This method makes a synchronous HTTP request by default. To make an
251 asynchronous HTTP request, please pass async_req=True
252 >>> thread = api.cf_manager_rest_api_post_project_quota(username, password, project_name, async_req=True)
253 >>> result = thread.get()
255 :param async_req bool
256 :param str username: OpenStack username (required)
257 :param str password: OpenStack password (required)
258 :param str project_name: Name of a OpenStack project (required)
261 If the method is called asynchronously,
262 returns the request thread.
264 kwargs[
'_return_http_data_only'] =
True
265 if kwargs.get(
'async_req'):
272 """Post a new (or update existent) quota of a project (admin only) # noqa: E501
274 This method makes a synchronous HTTP request by default. To make an
275 asynchronous HTTP request, please pass async_req=True
276 >>> thread = api.cf_manager_rest_api_post_project_quota_with_http_info(username, password, project_name, async_req=True)
277 >>> result = thread.get()
279 :param async_req bool
280 :param str username: OpenStack username (required)
281 :param str password: OpenStack password (required)
282 :param str project_name: Name of a OpenStack project (required)
285 If the method is called asynchronously,
286 returns the request thread.
289 all_params = [
'username',
'password',
'project_name',
'body']
290 all_params.append(
'async_req')
291 all_params.append(
'_return_http_data_only')
292 all_params.append(
'_preload_content')
293 all_params.append(
'_request_timeout')
296 for key, val
in six.iteritems(params[
'kwargs']):
297 if key
not in all_params:
299 "Got an unexpected keyword argument '%s'"
300 " to method cf_manager_rest_api_post_project_quota" % key
305 if (
'username' not in params
or
306 params[
'username']
is None):
307 raise ValueError(
"Missing the required parameter `username` when calling `cf_manager_rest_api_post_project_quota`")
309 if (
'password' not in params
or
310 params[
'password']
is None):
311 raise ValueError(
"Missing the required parameter `password` when calling `cf_manager_rest_api_post_project_quota`")
313 if (
'project_name' not in params
or
314 params[
'project_name']
is None):
315 raise ValueError(
"Missing the required parameter `project_name` when calling `cf_manager_rest_api_post_project_quota`")
317 collection_formats = {}
320 if 'project_name' in params:
321 path_params[
'project_name'] = params[
'project_name']
324 if 'username' in params:
325 query_params.append((
'username', params[
'username']))
326 if 'password' in params:
327 query_params.append((
'password', params[
'password']))
336 body_params = params[
'body']
338 header_params[
'Content-Type'] = self.
api_clientapi_client.select_header_content_type(
339 [
'application/json'])
345 '/projects/{project_name}/quota/',
'POST',
350 post_params=form_params,
351 files=local_var_files,
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)
def cf_manager_rest_api_get_project_quota_with_http_info(self, username, password, project_name, **kwargs)
def __init__(self, api_client=None)
def cf_manager_rest_api_post_project_quota(self, username, password, project_name, **kwargs)
def cf_manager_rest_api_post_project_quota_with_http_info(self, username, password, project_name, **kwargs)
def cf_manager_rest_api_get_project_quota(self, username, password, project_name, **kwargs)
def cf_manager_rest_api_list_projects_with_http_info(self, username, password, **kwargs)
def cf_manager_rest_api_list_projects(self, username, password, **kwargs)