/Programmable-Network-SDK-ruby

Telstra Programmable Network SDK - ruby Library

Primary LanguageRubyApache License 2.0Apache-2.0

TelstraTPN

TelstraTPN - the Ruby gem for the Telstra Programmable Network API

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.

This SDK is automatically generated by the OpenAPI Generator project:

Installation

Build a gem

To build the Ruby code into a gem:

gem build TelstraTPN.gemspec

Then either install the gem locally:

gem install ./TelstraTPN-1.0.3.gem

(for development, run gem install --dev ./TelstraTPN-1.0.3.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'TelstraTPN', '~> 1.0.3'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/Telstra/Programmable-Network-SDK-ruby, then add the following in the Gemfile:

gem 'TelstraTPN', :git => 'https://github.com/Telstra/Programmable-Network-SDK-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'TelstraTPN'

api_instance = TelstraTPN::AuthenticationApi.new
grant_type = 'password' # String | 
username = 'username_example' # String | 
password = 'password_example' # String | 

begin
  #Create an authentication token
  result = api_instance.generate_token(grant_type, username, password)
  p result
rescue TelstraTPN::ApiError => e
  puts "Exception when calling AuthenticationApi->generate_token: #{e}"
end

Documentation for API Endpoints

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

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