Skip to content

Latest commit

 

History

History
369 lines (311 loc) · 26.4 KB

README.md

File metadata and controls

369 lines (311 loc) · 26.4 KB

swagger-client

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 0.8
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
instance_id = 'instance_id_example' # str | ROLE instance unique identifier
image_id = 'image_id_example' # str | Image unique identifier
dont_verify_memory = 0 # int | If 1, don't verify the DDR4 memory during setup (optional) (default to 0)

try:
    # Test the instance **if not used**
    api_response = api_instance.cf_manager_rest_api_admin_test_instance(username, password, instance_id, image_id, dont_verify_memory=dont_verify_memory)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_admin_test_instance: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
resource_id = 'resource_id_example' # str | cloudFPGA resource unique identifier
pl_id = 'pl_id_example' # str | Platform logic unique identifier

try:
    # Update the flash of a resource **if not used**
    api_response = api_instance.cf_manager_rest_api_admin_update_flash(username, password, resource_id, pl_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_admin_update_flash: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
subnet_string = 'subnet_string_example' # str | A /24 subnet

try:
    # Remove a /24 subnet
    api_instance.cf_manager_rest_api_delete_ippool(username, password, subnet_string)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_delete_ippool: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Get list of all composable logic
    api_instance.cf_manager_rest_api_get_all_composable_logic(username, password)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_all_composable_logic: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Get all registered build script versions
    api_response = api_instance.cf_manager_rest_api_get_buildscripts_all(username, password)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_buildscripts_all: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Get all ip addresses in the current pool
    api_response = api_instance.cf_manager_rest_api_get_ippool(username, password)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_ippool: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Get all mantle logics
    api_instance.cf_manager_rest_api_get_mantle_logic_all(username, password)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_mantle_logic_all: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Get all platform logics
    api_instance.cf_manager_rest_api_get_platform_logic_all(username, password)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_platform_logic_all: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
bs_id = 56 # int | ID of a registered build script

try:
    # Get details of one registered build script
    api_response = api_instance.cf_manager_rest_api_get_single_buildscript(username, password, bs_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_single_buildscript: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
cl_id = 56 # int | ID of a composable logic (Static Shell or Mantles)

try:
    # Get details of one composable logic
    api_instance.cf_manager_rest_api_get_single_composable_logic(username, password, cl_id)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_get_single_composable_logic: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
body = swagger_client.BuildScript() # BuildScript |  (optional)

try:
    # Register a new build script version
    api_response = api_instance.cf_manager_rest_api_post_buildscript(username, password, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_post_buildscript: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
subnet_string = 'subnet_string_example' # str | A /24 subnet
gateway_string = 'gateway_string_example' # str | The gateway for this subnet
mask_string = 'mask_string_example' # str | The subnetmask for this subnet

try:
    # Post a new `/24` ip pool (subnet)
    api_instance.cf_manager_rest_api_post_ippool(username, password, subnet_string, gateway_string, mask_string)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_post_ippool: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
image_details = 'image_details_example' # str | 
bin_file = 'bin_file_example' # str | 
sig_file = 'sig_file_example' # str | 
pr_verify_rpt = 'pr_verify_rpt_example' # str | 
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Upload a new dynamic platform logic
    api_instance.cf_manager_rest_api_post_mantle_logic(image_details, bin_file, sig_file, pr_verify_rpt, username, password)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_post_mantle_logic: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
image_details = 'image_details_example' # str | 
dcp_file = 'dcp_file_example' # str | 
bit_file = 'bit_file_example' # str | 
mcs_file = 'mcs_file_example' # str | 
sig_file = 'sig_file_example' # str | 
pr_verify_rpt = 'pr_verify_rpt_example' # str | 
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password

try:
    # Upload a new platform logic
    api_instance.cf_manager_rest_api_post_platform_logic(image_details, dcp_file, bit_file, mcs_file, sig_file, pr_verify_rpt, username, password)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_post_platform_logic: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
bs_id = 56 # int | ID of a registered build script
body = swagger_client.BuildScript() # BuildScript |  (optional)

try:
    # Update a registered build script
    api_instance.cf_manager_rest_api_put_buildscript(username, password, bs_id, body=body)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_put_buildscript: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AdministrationAdminOnlyApi(swagger_client.ApiClient(configuration))
username = 'username_example' # str | OpenStack username
password = 'password_example' # str | OpenStack password
cl_id = 56 # int | ID of a composable logic (Static Shell or Mantles)
new_status = 'new_status_example' # str | New status of the composable logic

try:
    # Update status of a composable logic
    api_instance.cf_manager_rest_api_put_composable_logic_status(username, password, cl_id, new_status)
except ApiException as e:
    print("Exception when calling AdministrationAdminOnlyApi->cf_manager_rest_api_put_composable_logic_status: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
AdministrationAdminOnlyApi cf_manager_rest_api_admin_test_instance PUT /administration/test_instance/{instance_id} Test the instance if not used
AdministrationAdminOnlyApi cf_manager_rest_api_admin_update_flash PUT /administration/update_flash/{resource_id} Update the flash of a resource if not used
AdministrationAdminOnlyApi cf_manager_rest_api_delete_ippool DELETE /administration/ippool/ Remove a /24 subnet
AdministrationAdminOnlyApi cf_manager_rest_api_get_all_composable_logic GET /administration/composablelogic/all/ Get list of all composable logic
AdministrationAdminOnlyApi cf_manager_rest_api_get_buildscripts_all GET /administration/buildscripts Get all registered build script versions
AdministrationAdminOnlyApi cf_manager_rest_api_get_ippool GET /administration/ippool/ Get all ip addresses in the current pool
AdministrationAdminOnlyApi cf_manager_rest_api_get_mantle_logic_all GET /administration/mantle_logic Get all mantle logics
AdministrationAdminOnlyApi cf_manager_rest_api_get_platform_logic_all GET /administration/platform_logic Get all platform logics
AdministrationAdminOnlyApi cf_manager_rest_api_get_single_buildscript GET /administration/buildscripts/{bs_id} Get details of one registered build script
AdministrationAdminOnlyApi cf_manager_rest_api_get_single_composable_logic GET /administration/composablelogic/{cl_id}/ Get details of one composable logic
AdministrationAdminOnlyApi cf_manager_rest_api_post_buildscript POST /administration/buildscripts Register a new build script version
AdministrationAdminOnlyApi cf_manager_rest_api_post_ippool POST /administration/ippool/ Post a new `/24` ip pool (subnet)
AdministrationAdminOnlyApi cf_manager_rest_api_post_mantle_logic POST /administration/mantle_logic Upload a new dynamic platform logic
AdministrationAdminOnlyApi cf_manager_rest_api_post_platform_logic POST /administration/platform_logic Upload a new platform logic
AdministrationAdminOnlyApi cf_manager_rest_api_put_buildscript PUT /administration/buildscripts/{bs_id} Update a registered build script
AdministrationAdminOnlyApi cf_manager_rest_api_put_composable_logic_status PUT /administration/composablelogic/{cl_id}/status/ Update status of a composable logic
ClustersApi cf_manager_rest_api_delete_cluster DELETE /clusters/{cluster_id} Delete a cluster
ClustersApi cf_manager_rest_api_extend_cluster PUT /clusters/{cluster_id}/extend Add nodes to an existing cluster
ClustersApi cf_manager_rest_api_get_cluster_single GET /clusters/{cluster_id} Get a cluster
ClustersApi cf_manager_rest_api_get_clusters GET /clusters Get all clusters of a user
ClustersApi cf_manager_rest_api_post_clusters POST /clusters Request a cluster
ClustersApi cf_manager_rest_api_reduce_cluster PUT /clusters/{cluster_id}/reduce Remove nodes from an existing cluster
ClustersApi cf_manager_rest_api_restart_cluster PATCH /clusters/{cluster_id}/restart Restart all application on FPGAs in this cluster
ClustersApi cf_manager_rest_api_update_node_of_cluster PUT /clusters/{cluster_id}/{node_id} Reconfigure one FPGA node of an existing cluster
DebugApi cf_manager_rest_api_delete_debug_connection DELETE /debug/ila_connection/{instance_id} Deletes an existing connection to the `hw_server` of this instance
DebugApi cf_manager_rest_api_get_all_debug_connections GET /debug/open_ila_connections Requests a list of running `hw_server`s on all instances (admin only)
DebugApi cf_manager_rest_api_get_all_debug_connections_of_user GET /debug/ila_connections Returns all open `hw_server` of a user
DebugApi cf_manager_rest_api_get_debug_connection GET /debug/ila_connection/{instance_id} Requests a connection to the `hw_server` of this instance
DebugApi cf_manager_rest_api_get_flight_recorder_cluster GET /clusters/{cluster_id}/flight_recorder_data Requests network runtime information of all instances
DebugApi cf_manager_rest_api_get_flight_recorder_instance GET /instances/{instance_id}/flight_recorder_data Requests network runtime information
ImagesApi cf_manager_rest_api_delete_image DELETE /images/{image_id} Delete an image
ImagesApi cf_manager_rest_api_get_image_single GET /images/{image_id} Get an image
ImagesApi cf_manager_rest_api_get_images GET /images Get all images of a user
ImagesApi cf_manager_rest_api_post_app_logic POST /images/app_logic Upload an image of type `app logic`
ImagesApi cf_manager_rest_api_post_images POST /images Upload an image
InstancesApi cf_manager_rest_api_app_restart_instance PATCH /instances/{instance_id}/app_restart Triggers app restart of this instance
InstancesApi cf_manager_rest_api_delete_instance DELETE /instances/{instance_id} Remove an instance
InstancesApi cf_manager_rest_api_get_instance GET /instances/{instance_id} Get a single instance
InstancesApi cf_manager_rest_api_get_instances GET /instances Get all instances of a user
InstancesApi cf_manager_rest_api_instance_api_gateway POST /instances/{instance_id}/api_gateway Forwards a custom HTTP API request
InstancesApi cf_manager_rest_api_instance_change_runlevel POST /instances/{instance_id}/runlevel Changes the `runlevel` of the instance (stack developers only)
InstancesApi cf_manager_rest_api_instance_get_runlevel GET /instances/{instance_id}/runlevel Returns the current `runlevel` of the instance (stack developers only)
InstancesApi cf_manager_rest_api_post_instances POST /instances Create an instance
InstancesApi cf_manager_rest_api_update_instance PUT /instances/{instance_id} Reprogramm an instance
MantleArchitectureApi cf_manager_rest_api_get_composable_logic_all_part GET /composablelogic/by_part/{part} Returns all composable logics of the given part that are `IN_USE`
MantleArchitectureApi cf_manager_rest_api_get_composable_logic_all_prp GET /composablelogic/by_prp/{prp} Returns all composable logics of the given prp-type that are `IN_USE`
MantleArchitectureApi cf_manager_rest_api_get_composable_logic_all_shell_type GET /composablelogic/by_shell/{shell_type} Returns all composable logics of the given shell-type that are `IN_USE`
MantleArchitectureApi cf_manager_rest_api_get_composable_logic_dcp GET /composablelogic/{cl_id}/dcp Get the dcp file of a composable logic
MantleArchitectureApi cf_manager_rest_api_get_composable_logic_meta GET /composablelogic/{cl_id}/meta Get the meta data of a composable logic
ProjectsApi cf_manager_rest_api_get_project_quota GET /projects/{project_name}/quota/ Get the current quota of a project
ProjectsApi cf_manager_rest_api_list_projects GET /projects/ List the projects the user belongs to
ProjectsApi cf_manager_rest_api_post_project_quota POST /projects/{project_name}/quota/ Post a new (or update existent) quota of a project (admin only)
ResourcesAdminOnlyApi cf_manager_rest_api_delete_resource DELETE /resources/{resource_id} Remove a resource
ResourcesAdminOnlyApi cf_manager_rest_api_get_available_resources GET /resources/status/{status} Get all cloudFPGA resources in state `{status}`
ResourcesAdminOnlyApi cf_manager_rest_api_get_resources GET /resources Get all cloudFPGA resources
ResourcesAdminOnlyApi cf_manager_rest_api_get_resources_of_sled_status GET /resources/sled/{sled_ip}/status/ Get status of all resources from a specific sled
ResourcesAdminOnlyApi cf_manager_rest_api_get_resources_of_sled_status_in_state GET /resources/sled/{sled_ip}/{status}/ Get status of all resources from a specific sled in a specific `{status}`
ResourcesAdminOnlyApi cf_manager_rest_api_get_single_resource GET /resources/{resource_id} Get details of one resource
ResourcesAdminOnlyApi cf_manager_rest_api_get_single_resource_status GET /resources/{resource_id}/status/ Get status of one resource
ResourcesAdminOnlyApi cf_manager_rest_api_post_resources POST /resources Create a cloudFPGA resource
ResourcesAdminOnlyApi cf_manager_rest_api_put_resource PUT /resources/{resource_id} Update a resource
ResourcesAdminOnlyApi cf_manager_rest_api_put_resource_status PUT /resources/{resource_id}/status/ Update status of a resource
ResourcesAdminOnlyApi cf_manager_rest_api_put_resources_of_sled_status PUT /resources/sled/{sled_ip}/status/ Update status of all resources from a specific sled
ResourcesAdminOnlyApi cf_manager_rest_api_put_resources_of_sled_status_in_state PUT /resources/sled/{sled_ip}/{status}/ Update status of all resources from a specific sled in a specific `{status}`

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author