This repository provides an SDK for python to be used for the ElasTest Platform Manager.
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/tub-elastest/epm-client-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/tub-elastest/epm-client-python.git
)
Then import the package:
import epm_client
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 epm_client
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import epm_client
from epm_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = epm_client.NetworkApi()
body = epm_client.Network() # Network | Defintion of a Network which has to be created on a certain PoP
try:
# Creates a new network.
api_response = api_instance.create_network(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling NetworkApi->create_network: %s\n" % e)
All URIs are relative to https://localhost:8180/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AdapterApi | get_all_adapters | GET /adapters | Returns all registered adapters |
KeyApi | add_key | POST /keys | Uploads a key to the EPM. |
KeyApi | delete_key | DELETE /keys/{id} | Deletes a Key. |
KeyApi | get_all_keys | GET /keys | Returns all available Keys |
NetworkApi | create_network | POST /network | Creates a new network. |
NetworkApi | delete_network | DELETE /network/{id} | Deletes a network. |
NetworkApi | get_all_networks | GET /network | Returns all existing networks. |
NetworkApi | get_network_by_id | GET /network/{id} | Returns a network. |
NetworkApi | update_network | PATCH /network/{id} | Updates a Network. |
PackageApi | delete_package | DELETE /packages/{id} | Deletes a package. |
PackageApi | receive_package | POST /packages | Receives a package. |
PoPApi | get_all_po_ps | GET /pop | Returns all PoPs. |
PoPApi | get_po_p_by_id | GET /pop/{id} | Returns a PoP. |
PoPApi | register_po_p | POST /pop | Registers a new PoP |
PoPApi | unregister_po_p | DELETE /pop/{id} | Unregisters a PoP. |
PoPApi | update_po_p | PATCH /pop/{id} | Updates a PoP. |
ResourceGroupApi | create_resource_group | POST /resourceGroup | Creates a new Resource Group. |
ResourceGroupApi | delete_resource_group | DELETE /resourceGroup/{id} | Deletes a Resource Group. |
ResourceGroupApi | get_all_resource_groups | GET /resourceGroup | Returns all Resource Groups. |
ResourceGroupApi | get_resource_group_by_id | GET /resourceGroup/{id} | Returns a Resource Group. |
ResourceGroupApi | update_resource_group | PATCH /resourceGroup/{id} | Updates a ResourceGroup. |
RuntimeApi | download_file_from_instance | GET /runtime/{id}/file | Downloads a file from a VDU. |
RuntimeApi | execute_on_instance | PUT /runtime/{id}/action/execute | Executes given command on the given VDU. |
RuntimeApi | start_instance | PUT /runtime/{id}/action/start | Starts the given VDU. |
RuntimeApi | stop_instance | PUT /runtime/{id}/action/stop | Stops the given VDU. |
RuntimeApi | upload_file_to_instance_by_file | POST /runtime/{id}/file | Uploads a file to a VDU. |
RuntimeApi | upload_file_to_instance_by_path | POST /runtime/{id}/path | Uploads a file to a VDU. |
TOSCAApi | deploy_tosca_template | POST /tosca | Deploys a Tosca template. |
VDUApi | delete_vdu | DELETE /vdu/{id} | Terminates a VDU. |
VDUApi | deploy_vdu | POST /vdu | Allocates resources in the target cloud. |
VDUApi | get_all_vdus | GET /vdu | Returns all VDUs. |
VDUApi | get_vdu_by_id | GET /vdu/{id} | Returns a VDU. |
VDUApi | update_vdu | PATCH /vdu/{id} | Updates a VDU. |
WorkerApi | delete_worker | DELETE /workers/{id} | Deletes a Resource Group. |
WorkerApi | get_all_workers | GET /workers | Returns all registered workers |
WorkerApi | install_adapter | GET /workers/{id}/{type} | Sets up the specified worker to install the specified type of adapter. |
WorkerApi | register_worker | POST /workers | Registers the worker and saves the information. |
- Adapter
- CommandExecutionBody
- Event
- FileDownloadBody
- FileUploadBody
- Key
- KeyValuePair
- Network
- PoP
- ResourceGroup
- VDU
- Worker
All endpoints do not require authorization.