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

    Installing Licenses with the API

    Installing licenses with the API required the use of HTTP requests to APIs on the central or regional microservices hosts, which may be a server or a virtual machine (VM), depending on the type of installation. Consequently, you use on of the following variables in the HTTP requests.

    • central-ms-ip-address—IP address of the central microservice host
    • regional-ms-ip-address—IP address of the regional microservice host

    Working with the APIs requires frequent use of Universal Unique Identifiers (UUIDs) to specify particular objects in the code. You many need to retrieve a UUID to obtain another UUID or to provide a UUID as input for an HTTP request.

    Obtaining the Device UUID

    Obtaining the device UUID is a multistep process that requires the retrieval of several other UUIDs. You need the device identifier to perform API license operations for a single device, such as:

    • Installing a license on a single device
    • Verifying the installation of a license on a device

    To obtain a device identifier:

    1. Send an HTTP GET request with an AUTH token to the following endpoint to get the network service UUID:

      http://central-ms-ip-address/tssm/nfv-service-instance/1fc7e31b-3642-46d8-94a9-eb33878eaad7

      The operation returns information about the network service, including its UUID:

      ...
      "nfv_nsid": "a267f9fb-4329-47d1-a477-4061f5767ea4"
      ...

      You use the network service UUID value to obtain the VNF UUID.

    2. Get the VNF UUID for the network service.
      1. Send an HTTP GET request with an AUTH token to the following endpoint to get a list of VNF instances.

        http://centralms-ip-address/restconf/data/maestro/nfv-instances/vnf-instance

      2. Search the output for the network service UUID that you found in Step

        The search returns two lines. The first line contains the network service UUID and the second line contains the vnfm-id value.

        For example:

        "parent_ns": "a267f9fb-4329-47d1-a477-4061f5767ea4”,
        "vnfm-id": "694a7ee4-a5ab-4e3b-9e74-0c3a233ac783”,
        

        You use the vnfm-id value to obtain the device UUID.

    3. Using the vnfm-id value, send an HTTP GET request with an AUTH token to the following endpoint to get the device UUID:

      http://centralms-ip-address/restconf/data/maestro/nf-instances/vnf-instance/vnfm-id

      The operation returns information about the device, including the device UUID, which is the is the vnf-id value.

      "family": "juniper-srx",
      "state": “active",
      "vnf-id": "694a7ee4-a5ab-4e3b-9e74-0c3a233ac783”, >>>>>>>>device id
      "vnfd-id": "9F6F880F-769D-45A0-813E-85DC1A1B33CA"
    4. Using the values that you obtained, collate the input data required to install the license on a single device.

      For example:

      {
      "input" : {
      "license_id": "JUNOS,00001"5
      "file_url": "/v1/AUTH_cafbcfa238a84a9b8ef177154a3c55a3/iamcentral/license.txt",
      "device_id": "7684e0ab-b3e2-48c2-b92d-6acfdd1232d2",
      "component_name": "JUNOS"
      }
      }
      
    5. Send an HTTP POST request with an AUTH token and the input data to the following endpoint to install the license the device:

      http://centralms-ip-address/dms - central/install_license_single_device

      centralms-ip-address—IP address of the central microservices server

      The license is installed on all devices.

    Installing a License on One Device with API Calls

    To install a license on one device:

    1. Open the license file and look for the license identifier, which precedes the serial number.

      In the example below, the license identifier is JUNOS00001.

      JUNOS00001aeaqic agajb4 fu6eie fq4ojr g4ztaq jqgazd...
    2. Send an HTTP GET request with an AUTH token to the following endpoint to get the file_url value.

      http://centralms-ip-address/ems-central/image/uuid

      where:

      • centralms-ip-address—IP address of the central microservices host
      • uuid—Identifier that is used as the license file name.

        For example: 6e3dbdf0-0741-4592-9b89-07fa88434615

      The operation returns information about the image, including the file_url value.

      For example:

      ...
      "uuid": "6e3dbdf0-0741-4592-9b89-07fa88434615",
      "image_type": "SRX_LICENSE_FILE",
      "file_uri": "/v1/AUTH_349b6e5e29e448c98ffc20901036e54d/iamcentral/license.txt",
      "description": "vsrx license upload",
      ...
    3. Obtain the device UUID.
    4. Obtain the component name, which is JUNOS for all Juniper devices.
    5. Using the values that you obtained, collate the input data required to install the license on a single device.

      For example:

      {
      "input" : {
      "license_id": "JUNOS,00001"5
      "file_url": "/v1/AUTH_cafbcfa238a84a9b8ef177154a3c55a3/iamcentral/license.txt",
      "device_id": "7684e0ab-b3e2-48c2-b92d-6acfdd1232d2",
      "component_name": "JUNOS"
      }
      }
      
    6. Send an HTTP POST request with an AUTH token and the input data to the following endpoint to install the license the device:

      http://centralms-ip-address/dms - central/install_license_single_device

      centralms-ip-address—IP address of the central microservices server

      The license is installed on all devices.

    Installing a License on All Devices with the API

    To install a license on all devices, send an HTTP POST request with an AUTH token to the following endpoint:

    http://centralms-ip-address/dms-central/install_license_all_devices

    centralms-ip-address—IP address of the central microservices server

    The license is installed on all devices.

    Verifying Installation of a License on a Device

    The regional server associated with a device stores information about installation of a license on that device. You send an HTTP request to the regional microservices host when you want to verify installation of a license.

    To verify the installation of a license on a device:

    1. Obtain the device UUID (see .
    2. Send an HTTP GET request with an AUTH token to the following endpoint:

      http://regional-ms-ip-address/ems-regional/device /device_uuid

    The operation returns information about the device, including the status of the license information.

    For example:

    ...
    "license_info": {
    "license": [
    {
    "license_id": "JUNOS00001",
    "install_status": success
    }
    ]
    ...
    

    Modified: 2017-02-07