Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    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

    CGCRUDScripts/CGCRUD.py

    Contains API methods used to perform the create, read, update, and delete (CRUD) HTTP operations on connectivity group objects.

    ImportTopologyCRUDScripts/ImportTopology.py

    Contains API methods used to read and import the topology file and create the topology in the NaaS service repository.

    L2CRUDScripts/L2CRUD.py

    Contains API methods used to perform CRUD operations on Layer 2 connectivity NaaS service objects.

    L2FacadeScripts/L2Facade.py

    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.

    L3CRUDScripts/L3CRUD.py

    Contains API methods used to perform CRUD operations on Layer 3 connectivity NaaS service objects.

    L3FacadeScripts/L3Facade.py

    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.

    NaasCRUDScripts/NaasCRUD.py

    Contains API methods used to perform CRUD operations on all NaaS service objects.

    PortCRUDScripts/PortCRUD.py

    Contains API methods used to perform CRUD operations on port objects.

    SecurityPoliciesCRUDScripts/SecurityPoliciesCRUD.py

    Contains API methods used to perform CRUD operations on all security policy objects.

    ServiceCatalog/ServiceCatalog.py

    Contains the API method used to obtain the service catalog object by the NaaS domain ID.

    SPRuleCRUDScripts/SPRuleCRUDScripts.py

    Contains API methods used to perform CRUD operations on all security policy rule objects.

    TenantCRUDScripts/TenantCRUD.py

    Contains API methods used to perform CRUD operations on all tenant objects.

    Published: 2013-10-15