Create ODU Optical Service

Create an ODU optical service with two ODU ports retrieved previously. ODU or OCH service type create will depend on source and destination ports used. This same example can be used to create OCH service if the ports specified are of type OCH. This request will also create the underlying OCH service if there is not already one available.

POST https://<NSP Server>:8543/sdn/api/v3/services/optical

Request:

{
  "data": {
    "readOnly": false,
    "appId": "0",
    "bidirectional": "SYMMETRIC_LOOSE",
    "objective": "HOPS",
    "maxHops": 0,
    "maxLatency": 0,
    "maxCost": 0,
    "bw": 9953280,
    "reverseBW": 0,
    "action": "TRAVERSE",
    "monitorBandwidth": "false",
    "tenantId": "0",
    "encryption": "false",
    "name": "ReST API Optical Service",
    "sources": [
      "1315-95916183-8ba2-43ac-b83b-30257faf9bce"
    ],
    "destinations": [
      "907-4c635607-acbd-4064-8a67-19829dda9147"
    ]
  }
}

Response:

{
  "status": 0,
  "startRow": 0,
  "endRow": 1,
  "totalRows": 1,
  "data": {
    "id": "2183-8a48745b-3da3-45ef-83ab-b6ed6deb6d8c",
    "appId": "0",
    "operationalState": null,
    "adminState": "UP",
    "neDeploymentState": null,
    "externalIds": null,
    "name": "ReST API Optical Service",
    "serviceType": "ODU",
    "connectionState": "DISCONNECTED",
    "tenants": [
      {
        "id": "0",
        "tenantName": "admin",
        "contactName": null,
        "phoneNumber": null,
        "address": null
      }
    ],
    "topology": null,
    "objective": "HOPS",
    "bidirectional": "SYMMETRIC_LOOSE",
    "bw": 9953280,
    "reverseBW": null,
    "maxLatency": 0,
    "maxCost": 0,
    "maxHops": 0,
    "lifeCycle": {
      "phase": "Planning",
      "state": "Planned",
      "reason": ""
    },
    "templateId": null,
    "tunnelSelectionId": null,
    "pathProfileId": null,
    "groupId": null,
    "endpoints": [
      {
        "id": "1317-5e9a8801-8c49-4b56-b80e-f43cb9a7e13a",
        "appId": null,
        "operationalState": "DOWN",
        "adminState": "DOWN",
        "neDeploymentState": "UNKNOWN",
        "externalIds": [
          {
            "context": "OMS",
            "location": [
              "135.121.20.91",
              ""
            ],
            "id": "CloudSim_183_004_PSS:130SNX10-1-14-C5@OCH@ODU@"
          }
        ],
        "neId": "55-eb96cac6-c91e-48a5-83c2-c60647114070",
        "neName": "CloudSim_183_004_PSS",
        "portId": "1315-95916183-8ba2-43ac-b83b-30257faf9bce",
        "serviceId": "2183-8a48745b-3da3-45ef-83ab-b6ed6deb6d8c",
        "name": "130SNX10-1-14-C5",
        "innerTag": null,
        "outerTag": null,
        "siteServiceQosProfile": {
          "qosProfile": 0,
          "ingressOverrideQueues": null,
          "egressOverrideQueues": null,
          "ingressParam": null,
          "egressParam": null
        },
        "isHub": null,
        "@class": "com.alu.wsc.api.generated.v3.L2ServiceEndpoint"
      },
      {
        "id": "909-7f7ab199-8493-45bd-8c7c-1f68f56f59ba",
        "appId": null,
        "operationalState": "DOWN",
        "adminState": "DOWN",
        "neDeploymentState": "UNKNOWN",
        "externalIds": [
          {
            "context": "OMS",
            "location": [
              "135.121.20.91",
              ""
            ],
            "id": "CloudSim_183_003_PSS:130SNX10-1-12-C5@OCH@ODU@"
          }
        ],
        "neId": "37-78979225-9da9-466c-a72e-175c885b37f0",
        "neName": "CloudSim_183_003_PSS",
        "portId": "907-4c635607-acbd-4064-8a67-19829dda9147",
        "serviceId": "2183-8a48745b-3da3-45ef-83ab-b6ed6deb6d8c",
        "name": "130SNX10-1-12-C5",
        "innerTag": null,
        "outerTag": null,
        "siteServiceQosProfile": {
          "qosProfile": 0,
          "ingressOverrideQueues": null,
          "egressOverrideQueues": null,
          "ingressParam": null,
          "egressParam": null
        },
        "isHub": null,
        "@class": "com.alu.wsc.api.generated.v3.L2ServiceEndpoint"
      }
    ],
    "opticalServiceRoute": {
      "routes": []
    },
    "switchTab": null,
    "restoration": "SBR",
    "reversionMode": "auto",
    "protectionType": "UNPROTECTED",
    "routingState": "normal",
    "readyToRevert": true,
    "availableBw": null,
    "lambda": 0,
    "facility": 1,
    "modulation": "SYSTEM_ASSIGNED",
    "phaseEncoding": "system_assigned",
    "waveshape": "system_assigned",
    "servicePlaneType": "managementPlane",
    "nfmtTypeOfService": "TRAIL",
    "@class": "com.alu.wsc.api.generated.v3.OpticalService"
  }
}