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

    Setting Up the Network Director API

    After you install the Network Director API, invoke the API for importing the physical network topology of the NaaS domain. Before you can use the full set of NaaS service resources with the API, you must initialize the NaaS domain and import static configurations to your managed devices.

    After you initialize the NaaS service, you can enable features on the devices in the NaaS domain by importing (pushing) static configurations of each feature to the devices.

    Initializing the NaaS Domain

    As the network administrator, you initialize the NaaS domain by importing the physical topology. The Network Director API then performs a discovery of the devices in the NaaS domain. When the device discovery is complete, all devices in the topology are ready for configuration.

    Before you begin, make sure that:

    • The network and devices are running.
    • Network Director API is installed.

    To initialize the Network Director API by importing the NaaS domain topology:

    1. Prepare an XML file containing the physical topology of your network. This topology has the same components and devices as the NaaS domain. Include the required information such as system name (for each device), revenue port interface names, and linked interface information.

      For more information, see Network Director API Setup Sample Files.

    2. In your REST API client, send an HTTP POST request by using the following input:
      • Content-Type = application/vnd.juniper.nd.import-topology-xml-request+xml;version=2;charset=UTF-8
      • URL=https://host-ip/api/juniper/nd/orchestration/import-topology-xml
      • Include the content of your topology file in the POST content.

    Importing a topology results in one of three conditions:

    • SUCCESS—All the details in topology are valid, and the corresponding components are added and updated successfully in the Network Director API repository. A NaaS domain is created and its ID returned. You may proceed to the next task of pushing configuration files to devices.
    • PARTIAL_SUCCESS—The topology file contains errors for one or more systems. Issues might include an invalid revenue port name or number, or an unreachable device. A NaaS domain is created and its ID returned.

      Note: If the return condition is PARTIAL_SUCCESS, you may proceed to the next task of pushing configuration files to devices. However, if the topology contains an error for a device or port, you might not be able to configure that component in the future. We recommend that you correct or remove the error and reimport the topology file.

    • FAILURE—The topology file contains severe errors, resulting in cancellation of the topology import. A NaaS domain is not created. You must correct the errors and reimport the topology file.

    Preparing a Physical Topology File

    After you install the Network Director API software, the only NaaS service that is available for use is the service for importing the physical network topology of the NaaS domain. Before you can use the full set of NaaS service resources with the API, you must initialize the NaaS service and import static configurations to your managed devices.

    Before you import the NaaS domain physical topology to devices, prepare a topology file.

    The following output shows a sample physical topology file in XML format.


    <NaasDomains> <NaasDomain name="Naas-Domain-Name"> <topology> <systems> <system name="ex4-host-name" mgmtIp="192.168.1.0" userId="root" password="SecretPassword"> <capabilities> <capability name="SWITCHING" /> </capabilities> <revenueport_ifds> <revenueport_ifd name="ge-0/0/3"/> <revenueport_ifd name="ge-0/0/22"/> <revenueport_ifd name="ge-0/0/23"/> <revenueport_ifd name="ge-0/0/24"/> </revenueport_ifds> </system> <system name="srx-host-name" mgmtIp="10.94.45.185" userId="root" password="password"> <capabilities> <capability name="SECURITY" /> </capabilities> <revenueport_ifds> <revenueport_ifd name="ge-0/0/1"/> <revenueport_ifd name="ge-0/0/2"/> <revenueport_ifd name="ge-1/0/3"/> <revenueport_ifd name="ge-0/0/4"/> <revenueport_ifd name="ge-0/0/5"/> <revenueport_ifd name="ge-0/0/6"/> </revenueport_ifds> </system> </systems> <linked_interfaces> <ifd name="ge-1/0/3"> <peer name="ge-0/0/23"> <hostedOn name="ex4-host-name"/> </peer> <hostedOn name="srx-host-name"/> </ifd> </linked_interfaces> </topology> </NaasDomain> </NaasDomains>

    Table 1 describes the NaaS domain physical topology information that you must provide in the topology file.

    Table 1: Physical Topology Input Fields

    Field Name

    Description

    NaasDomain name

    Name of the NaaS domain in the topology. Only one NaaS domain is supported.

    NaaS Domain Components

    system name

    System name of each device managed by the NaaS domain. For each system name, provide the following system information:

    • Management IP address (mgmtIp)
    • User ID (userId) of the system administrator
    • Password (password) for the user ID

    Note: Only one device with switching capability is supported in each NaaS domain.

    System Components

    capability name

    Capability you enable for each system (managed device).

    Valid values are:

    • ROUTING
    • SECURITY
    • SWITCHING

    Note: Only one device with switching capability is supported in each NaaS domain.

    revenueport_ifd name

    Interface name that identifies a revenue port in a system; for example, ge-0/0/3. Revenue ports are attachment points that connect to physical servers.

    Linked Interfaces Components

    (Optional for topologies with a single device)

    ifd name

    Name of an interface that is connected to a peer interface. An ifd name must be paired with a peer name.

    peer name

    Name of the peer interface.

    hostedOn name

    Hostname of an interface. Each linked interface must have a hostname.

    Enabling Endpoint Discovery

    The Naas domain defines the topology of the networking devices, how each of the devices are connected together, and which endpoints (also known as interfaces or ports) are used to connect them and the revenue ports on the networking device.

    You can enable endpoint discovery on the networking device or statically import endpoints.

    To enable endpoint discovery on the networking device:

    1. Enable SNMP on the networking device.
    2. Enable LLDP on the networking device and the host.
    3. Select the SNMP settings in Network Director UI to discover the networking device.
    4. Import the topology file.

      The topology file needs to have SNMP and endpoint discovery enabled.

      For example:

                          <capabilities> 
                                  <capability name="SWITCHING" /> 
                          </capabilities> 
                          <discovery> 
                              <snmp discoverEndpoints="true"> 
                                  <v2settings community="public"/> 
                              </snmp> 
                          </discovery> 
                          <revenueport_ifds> 

    To statically import the endpoints:

    1. Specify endpoints in the XML topology file.

      For example:

      …
                          <revenueport_ifds>
                              <revenueport_ifd name="ge-0/0/0">
      				<endpoint name="hostname"/>
           </revenueport_ifd>
      …
    2. Import the XML topology file.

    Create the endpoints in the endpoint API:

    1. Create an endpoint with an endPointType of “SWITCH_PORT”.

      For example:

      {
          "endpoint": {
              "endpointType": "SWITCH_PORT",
              "name": "10.94.45.171:ge-0/0/0"
          }
      }

    Using an endpoint:

    1. Create an endpoint with an endPointType of “HOST_PORT”.

      For example:

      {
          "endpoint": {
              "endpointType": "HOST_PORT",
              "name": "hostname"
          }
      }

    Initial Setup Using Static Configuration Files

    After the physical topology is imported into the Network Director API repository and the NaaS domain is initialized, all managed devices specified in the topology must be configured. We recommend that you push the static configuration files of supported features to the devices at this time. Static configurations are typically stable configurations, but they might be updated in future. For example, to enable BGP on a device, you must push the static configuration file for BGP to the device. Pushing static configuration files to your devices enables them to be managed and configured by using the Network Director API.

    To push a static configuration file to your devices:

    1. Prepare a static configuration file for each feature, for example, BGP.

      For more information, see Network Director API Setup Sample Files.

    2. In your REST API client, send an HTTP POST request by using the following input:
      • Content-Type= application/vnd.juniper.nd.configuration-push+xml;version=2;charset=UTF-8
      • URL=https://server-ip/api/juniper/nd/orchestration/configuration-push/device host name
      • Include the content of your static configuration file in the POST content.
    3. Repeat Step 2 for each device in your topology.

    Modified: 2017-09-13