Skip to content

telstra/Programmable-Network-SDK-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TelstraTPN

Telstra Programmable Network is a self-provisioning platform that allows its users to create on-demand connectivity services between multiple end-points and add various network functions to those services. Programmable Network enables to connectivity to a global ecosystem of networking services as well as public and private cloud services. Once you are connected to the platform on one or more POPs (points of presence), you can start creating those services based on the use case that you want to accomplish. The Programmable Network API is available to all customers who have registered to use the Programmable Network. To register, please contact your account representative.

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

pip install git+https://github.com/Telstra/Programmable-Network-SDK-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/Telstra/Programmable-Network-SDK-python.git)

import TelstraTPN 

Setuptools

Install via Setuptools.

python setup.py install --user
import TelstraTPN

Getting Started

Please follow the installation procedure and then run the following:

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

# create an instance of the API class

api_instance = TelstraTPN.AuthenticationApi(TelstraTPN.ApiClient(configuration))
grant_type = 'password' # str |  (default to 'password')
username = 'username_example' # str | 
password = 'password_example' # str | 

try:
    # Create an authentication token
    api_response = api_instance.generate_token(grant_type, username, password)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticationApi->generate_token: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://penapi.pacnetconnect.com

Class Method HTTP request Description
AuthenticationApi generate_token POST /1.0.0/auth/generatetoken Create an authentication token
AuthenticationApi validate_token GET /1.0.0/auth/validatetoken Validate authentication token
ContractsApi inventory_links_contract POST /1.0.0/inventory/links/{linkid}/contract Create new Contract on specified link
ContractsApi inventory_links_contract_get GET /1.0.0/inventory/links/{linkid}/contract/{contractid} Get active Contract by ContractID
ContractsApi inventory_links_contract_put PUT /1.0.0/inventory/links/{linkid}/contract/{contractid} Update active Contract by ContractID
CustomersApi account GET /1.0.0/account/{customeruuid} Get account information details
CustomersApi account_user GET /1.0.0/account/{customeruuid}/user List users
DatacentresApi inventory_datacentres GET /1.0.0/inventory/datacenters Get list of all the data centers
EndpointsApi endpoint_endpointuuid_get GET /eis/1.0.0/endpoint/endpointuuid/{endpointuuid} Get Endpoint name and status
EndpointsApi endpoint_endpointuuid_put PUT /eis/1.0.0/endpoint/endpointuuid/{endpointuuid} Update Endpoint name
EndpointsApi endpoints_assign_topology_tag POST /eis/1.0.0/endpoints/{endpointuuid}/assign_topology_tag Assign an Endpoint to a Topology
EndpointsApi endpoints_topology_tag_uuid GET /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid} List Endpoints for Topology
EndpointsApi endpoints_topology_tag_uuid_endpoint DELETE /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid}/endpoint/{endpointuuid} Remove Endpoint from a Topology
EndpointsApi inventory_endpoint GET /1.0.0/inventory/endpoint/{endpointuuid} Get information about the specified endpoint
EndpointsApi inventory_endpoints_customeruuid GET /1.0.0/inventory/endpoints/customeruuid/{customeruuid} Get list of endpoints for a customer
EndpointsApi inventory_links_stats_endpoint GET /1.0.0/inventory/links-stats/endpoint/{endpointuuid}/{startdate}/{enddate} Get statistics for endpoint
EndpointsApi inventory_links_stats_endpointstate GET /1.0.0/inventory/links-stats/endpointstate/{endpointuuid}/{startdate}/{enddate} Get state statistics for endpoint
EndpointsApi inventory_regularendpoint POST /1.0.0/inventory/regularendpoint Create Physical (Port) Endpoint
EndpointsApi inventory_regularvport POST /1.0.0/inventory/regularvport Create VPort for physical endpoint
EndpointsApi inventory_vnfendpoint POST /1.0.0/inventory/vnfendpoint Instantiate Virtual Network Function
EndpointsApi vnfendpoint_vnfuuid GET /eis/1.0.0/vnfendpoint/vnfuuid/{vnfuuid} Get details of a specific VNF
ExchangeApi account_profile_exchange GET /1.0.0/account/profile/exchange Get the current account's Exchange profile
ExchangeApi exchange GET /1.0.0/exchange List all Exchange providers, with POPs
ExchangeApi exchange_exprovuuid GET /1.0.0/exchange/{exprovuuid} Exchange provider details
ExchangeApi visitcard GET /1.0.0/visitcard Get list of Visit Cards
ExchangeApi visitcard_uuid_get GET /1.0.0/visitcard/{visitcarduuid} View details of the specified Visit Card
ExchangeApi visitcard_uuid_put PUT /1.0.0/visitcard/{visitcarduuid} Update details of the specified Visit Card
LinksApi inventory_link POST /1.0.0/inventory/link Create Link and initial Contract
LinksApi inventory_links GET /1.0.0/inventory/links/{linkid} Get details of specified link
LinksApi inventory_links_customer GET /1.0.0/inventory/links/customer/{customeruuid} Get active Links
LinksApi inventory_links_history GET /1.0.0/inventory/links/history/{linkid} Get Link history
LinksApi inventory_links_stats_flow GET /1.0.0/inventory/links-stats/flow/{linkid}/{startdate}/{enddate} Get statistics for flow
StatisticsApi inventory_links_stats_endpoint GET /1.0.0/inventory/links-stats/endpoint/{endpointuuid}/{startdate}/{enddate} Get statistics for endpoint
StatisticsApi inventory_links_stats_endpointstate GET /1.0.0/inventory/links-stats/endpointstate/{endpointuuid}/{startdate}/{enddate} Get state statistics for endpoint
StatisticsApi inventory_links_stats_flow GET /1.0.0/inventory/links-stats/flow/{linkid}/{startdate}/{enddate} Get statistics for flow
TopologiesApi endpoints_assign_topology_tag POST /eis/1.0.0/endpoints/{endpointuuid}/assign_topology_tag Assign an Endpoint to a Topology
TopologiesApi endpoints_topology_tag_uuid GET /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid} List Endpoints for Topology
TopologiesApi endpoints_topology_tag_uuid_endpoint DELETE /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid}/endpoint/{endpointuuid} Remove Endpoint from a Topology
TopologiesApi topology_tag_get GET /ttms/1.0.0/topology_tag List all topology tags
TopologiesApi topology_tag_objects GET /ttms/1.0.0/topology_tag/{topotaguuid}/objects/ List objects for Topology
TopologiesApi topology_tag_post POST /ttms/1.0.0/topology_tag Create a named topology tag
TopologiesApi topology_tag_uuid_delete DELETE /ttms/1.0.0/topology_tag/{topotaguuid}/ Delete a topology tag
TopologiesApi topology_tag_uuid_get GET /ttms/1.0.0/topology_tag/{topotaguuid}/ Get information about the specified topology tag
TopologiesApi topology_tag_uuid_put PUT /ttms/1.0.0/topology_tag/{topotaguuid}/ Update a topology tag's name and/or description
UsersApi account_user GET /1.0.0/account/{customeruuid}/user List users
VnfsApi bms_backup POST /bms/1.0.0/backup Create backup of specified VNF
VnfsApi bms_backup_delete DELETE /bms/1.0.0/backup/{backupuuid} Delete specified backup
VnfsApi bms_backup_get GET /bms/1.0.0/backup/{backupuuid} Get information about the specified backup
VnfsApi bms_backup_restore POST /bms/1.0.0/backup/{backupuuid}/restore Restore VNF from backup
VnfsApi bms_backup_vnf GET /bms/1.0.0/backup/vnf/{vnfuuid} List backups
VnfsApi bms_backup_vnf_delete POST /bms/1.0.0/backup/vnf/{vnfuuid}/delete Delete multiple backups
VnfsApi inventory_vnf_vport POST /1.0.0/inventory/vnf/vport Create VNF VPort
VnfsApi inventory_vnfendpoint POST /1.0.0/inventory/vnfendpoint Instantiate Virtual Network Function
VnfsApi marketplace_image GET /1.0.0/marketplace/image List images in the Marketplace
VnfsApi marketplace_image_add POST /1.0.0/marketplace/image/{imageid}/add_to_my_images/ Add specified image to "My Images"
VnfsApi marketplace_image_imageid GET /1.0.0/marketplace/image/{imageid}/ Get information about the specified image
VnfsApi marketplace_image_my_images GET /1.0.0/marketplace/image/my_images/ List images in "My Images"
VnfsApi marketplace_image_remove POST /1.0.0/marketplace/image/{imageid}/remove_from_my_images/ Remove specified image from "My Images"
VnfsApi vnf GET /vnfds/1.0.0/vnf/{vnfuuid}/ Get status information about the specified VNF
VnfsApi vnf_reboot POST /vnfds/1.0.0/vnf/{vnfuuid}/reboot Reboot the specified VNF
VnfsApi vnf_resume POST /vnfds/1.0.0/vnf/{vnfuuid}/resume Resume the specified VNF
VnfsApi vnf_suspend POST /vnfds/1.0.0/vnf/{vnfuuid}/suspend Suspend the specified VNF
VnfsApi vnfendpoint_vnfuuid GET /eis/1.0.0/vnfendpoint/vnfuuid/{vnfuuid} Get details of a specific VNF
VportsApi inventory_regularvport POST /1.0.0/inventory/regularvport Create VPort for physical endpoint
VportsApi inventory_vnf_vport POST /1.0.0/inventory/vnf/vport Create VNF VPort
VportsApi inventory_vport GET /1.0.0/inventory/vport/{vportuuid} Get information about the specified VPort

Documentation For Models

Documentation For Authorisation

oAuth2

  • Type: OAuth
  • Flow: password
  • Authorisation URL:
  • Scopes: N/A

Author

pnapi-support@team.telstra.com