Sample API Scripts Overview
The Network Director API software package includes sample Python API scripts with examples of API requests. To run the sample scripts, you must have the Python 3 programming language software installed on your server.
The Python scripts are available at:
/usr/share/doc/jmp-ndos-1.5/sampleScripts.zip
The scripts are organized in separate directories by the type of NaaS service. The scripts include the promptUser method that provides user prompts for all interactions by displaying available options and applicable input fields.
Table 1 lists the available sample API scripts:
Table 1: Sample API Scripts
Script Directory and Filename | Description |
|---|---|
| Contains API methods used to perform the create, read, update, and delete (CRUD) HTTP operations on connectivity group objects. |
| Contains API methods used to read and import the topology file and create the topology in the NaaS service repository. |
| Contains API methods used to perform CRUD operations on Layer 2 connectivity NaaS service objects. |
| Contains API methods used to create the Layer 2 connectivity service using the Facade implementation. This script uses the topology file in the same directory to create the service. |
| Contains API methods used to perform CRUD operations on Layer 3 connectivity NaaS service objects. |
| Contains API methods used to create the Layer 3 connectivity service using the Facade implementation. This script uses the topology file in the same directory to create the service. |
| Contains API methods used to perform CRUD operations on all NaaS service objects. |
| Contains API methods used to perform CRUD operations on port objects. |
| Contains API methods used to perform CRUD operations on all security policy objects. |
| Contains the API method used to obtain the service catalog object by the NaaS domain ID. |
| Contains API methods used to perform CRUD operations on all security policy rule objects. |
| Contains API methods used to perform CRUD operations on all tenant objects. |

