{
    "id": "lsp.json",
    "title": "te-lsp API",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$ref": "#/definitions/lsp",
    "links": [
        {
            "title": "get all LSPs",
            "href": "/",
            "method": "GET",
            "rel": "instances",
            "schema": {
                "$ref": "#/definitions/lspList"
            }
        },
        {
            "title": "get lsp based on filter",
            "href": "/search?name={nameFilter}&from={fromIpV4}&operStatus={operationalStatus}&queryType=OR",
            "description": "do a server-side lookup on the LSP, by default the AND from all the attributes is done, unless queryType is set to OR",

            "method": "GET",
            "rel": "search",
            "schema": {
                "$ref": "#/definitions/lspList"
            }
        },
        {
            "title": "get an LSP",
            "href": "/{lspIndex}",
            "method": "GET",
            "rel": "self",
            "schema": {
                "$ref": "#/definitions/lsp"
            }
        },
        {
            "title": "get SSE notification stream",
            "href": "/stream",
            "method": "GET"
        },
        {
            "title": "get a LSP event history",
            "href": "/{lspIndex}/history?start={startTimeStamp}&end={endTimeStamp}",
            "description": "Provide the history of NorthStar action for the LSP, it can be optionally filtered by start (inclusive) and end (exclusive) timestamp",

            "method": "GET",
            "rel": "self",
            "schema": {
                "$ref": "#/definitions/lspHistoryEventList"
            }
        },
        {
            "title": "create a new LSP",
            "description": "Create a new LSP schema on request is #/definitions/createLsp",
            "href": "/",
            "method": "POST",
            "rel": "create",
            "schema": {
                "$ref": "#/definitions/createLsp"
            },
            "targetSchema": {
                "$ref": "#/definitions/createLSPOrResponse"
            }
        },
        {
            "title": "update an LSP",
            "href": "/{lspIndex}",
            "description": "Update an existing te-lsp, schema on request is #/definitions/updateLsp",
            "method": "PUT",
            "rel": "self",
            "schema": {
                "$ref": "#/definitions/updateLsp"
            },
            "targetSchema": {
                "$ref": "#/definitions/lsp"
            }

        },
        {
            "title": "PATCH an LSP",
            "href": "/{lspIndex}",
            "description": "Update an existing te-lsp, accepting a RFC6902 document producing a  #/definitions/updateLsp ",

            "method": "PATCH",
            "rel": "self",
            "schema": {
                "$ref": "json-patch.json"
            },
            "targetSchema": {
                "$ref": "#/definitions/lsp"
            }
        },
        {
            "title": "delete an LSP",
            "href": "/{lspIndex}",
            "method": "DELETE"
        },
        {
            "title": "Create a set of  new LSP",
            "description": "Create a set of new LSP, return code only indicate the acceptance of the request, response contains a list of lsp indexes",

            "href": "/bulk/",
            "method": "POST",
            "rel": "create",
            "schema": {
                "$ref": "#/definitions/createLSPList"
            }
        },
        {
            "title": "update a set of LSP",
            "description": "update a set of LSP, return code only indicate the acceptance of the request",
            "href": "/bulk",
            "method": "PUT",
            "schema": {
                "$ref": "#/definitions/lspListUpdate"
            }
        },
        {
            "title": "Patch  a set of LSP",
            "description": "update a set of LSP, return code only indicate the acceptance of the request",
            "href": "/bulk",
            "method": "PATCH",
            "schema": {
                "$ref": "#/definitions/lspListPatch"
            }
        },
        {
            "title": "Patch  a set of LSP",
            "description": "update a set of LSP, return code only indicate the acceptance of the request",
            "href": "/bulkPatch",
            "method": "PUT",
            "schema": {
                "$ref": "#/definitions/lspListPatch"
            }
        },
        {
            "title": "delete a set of LSPs",
            "description": "delete a set of LSPs, return code only indicate the acceptance of the request",
            "href": "/bulk",
            "method": "DELETE",
            "schema": {
                "$ref": "#/definitions/lspListDelete"
            }
        }
    ],
    "definitions": {
        "lspListPatch": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10000,
            "items": {
                "type": "object",
                "required": ["lspIndex", "patch"],
                "properties": {
                    "lspIndex": {
                        "description": "Program ID for lsp",
                        "$ref": "common.json#/definitions/index"
                    },
                    "patch": {
                        "$ref": "json-patch.json"
                    }
                }
            }
        },
        "createLSPList": {
            "description": "schema for bulk LSP creation, the number of entries that can be modified at a time is limited",

            "type": "array",
            "minItems": 1,
            "maxItems": 10000,
            "items": {
                "$ref": "#/definitions/createLsp"
            }
        },
        "lspListUpdate": {
            "description": "schema for bulk LSP update, the number of entries that can be modified at a time is limited",

            "type": "array",
            "minItems": 1,
            "maxItems": 10000,
            "items": {
                "$ref": "#/definitions/lsp"
            }
        },
        "lspReferenceIndex": {
            "description": "Object containing the minimum required information to reference an LSP .",
            "type": "object",
            "additionalProperties": true,
            "required": ["lspIndex"],
            "properties": {
                "lspIndex": {
                    "description": "Program ID for lsp",
                    "$ref": "common.json#/definitions/index"
                }
            }
        },

        "lspListDelete": {
            "description": "schema for bulk LSP delete, the number of entries that can be modified at a time is limited",

            "type": "array",
            "minItems": 1,
            "maxItems": 10000,
            "items": {
                "$ref": "#/definitions/lspReferenceIndex"
            }
        },
        "createLSPOrResponse": {
            "anyOf": [
                {
                    "$ref": "#/definitions/lsp",
                    "required": ["from", "to", "name"]
                },
                {
                    "type": "object",
                    "properties": {
                        "error": {
                            "description": "error string, either free text or defined error",
                            "oneOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "string",
                                    "enum": [
                                        "Bad request : the provided lspIndex does not match the addressed resource"
                                    ]
                                }
                            ]
                        }
                    }
                }
            ]
        },
        
        "lspHistoryEvent": {
            "description": "entry in the history of an LSP, which consists of the actions made by NorthStar",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "controlType": {
                    "descriptions": "indicates who controls the LSP, PCC controlled LSPs are completly under PCC control and delegated LSPs are created by the PCC and controlled by the PCE, while PCEInitiated are created and controlled by the PCE",

                    "type": "string",
                    "enum": ["Transport", "PCC", "Delegated", "PCEInitiated"]
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",

                    "additionalProperties": false,
                    "$ref": "#/definitions/lspPlannedPathProperties"
                },
                "eventStatusString": {
                    "description": "A description of the event",
                    "type": "string"
                },
                "timestamp": {
                    "description": "Event Timestamp.",
                    "type": "integer"
                },
                "operation": {
                    "description": "Type of operation.",
                    "type": "string",
                    "enum": ["Add", "Remove", "Update", "Query", "State Change", "Failed"]
                },
                "initiator": {
                    "descriptions": "indicates which entity created the LSP, Only PCE created LSPs and under NorthStar control can be deleted from NorthStar.",

                    "type": "string"
                },
                "controller": {
                    "descriptions": "Current controller, .",
                    "type": "string",
                    "enum": ["NorthStar", "External"]
                },
                "pathType": {
                    "description": "path role",
                    "type": "string",
                    "enum": ["primary", "secondary", "standby"],
                    "default": "primary"
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["RSVP", "SR"],
                    "default": "RSVP"
                }
            }

        },
        "lspHistoryEventList": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/lspHistoryEvent"
            }
        },
        "lspList": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/lsp"
            }
        },
        "adminGroups": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "attributeIncludeAll": {
                    "description": "TE-Color Include all mask",
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                },
                "attributeIncludeAny": {
                    "description": "TE-Color Include any mask",
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                },
                "attributeExclude": {
                    "description": "TE-Color exclude  mask",
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295
                }
            }
        },
        "adminGroupsReq": {
            "allOf" : [
                {"type" :"object",  "required": ["attributeIncludeAll", "attributeIncludeAny", "attributeExclude"]},
                {"$ref" : "#/definitions/adminGroups"}
            ]
        },
        "CalculatedHop": {
            "description": "Calculated path hop. ",
            "properties": {
                "sourceNodes": {
                    "description" : "Set of source nodes for that hop (Due to Anycast support)",
                    "type" : "array", "items" : {"$ref" : "node_v2.json#/definitions/nodeReferenceTyped"}
                },
                "destinationNodes": {
                    "description" : "Set of destination nodes for that hop (Due to Anycast support)",
                    "type" : "array", "items" : {"$ref" : "node_v2.json#/definitions/nodeReferenceTyped"}
                },
                "usedLinks": {
                    "description" : "list of links used by that hop between the source node(s) and destination node(s).",                    
                    "type" : "array", "items" : {
                        "description" : "Directed link information (with bandwidth allocation for that link)",
                        "type" : "object",                        
                        "properties" : {
                            "bandwidth" : {
                                "description": "bandwidth allocation for that link",
                                "$ref": "common.json#/definitions/Bandwidth"
                            }
                        },
                        "oneOf" : [
                            {
                                "description" : "Link end (link index and source node)",
                                "$ref" : "link_v2.json#/definitions/scopedLinkReference"
                            }
                        ]                        
                    }
                },
                "signaling" : {
                    "description" : "Data used in signaling",
                    "oneOf" : [
                        {"$ref": "#/definitions/SREROHop", "description": "SR Signaling information"}
                    ]                    
                }
            },
            "anyOf": [               
                {"$ref": "#/definitions/PlannedEROHop", "description": "correlated index, loose information"},
                {"$ref": "#/definitions/SREROHop", "description": "SR Signaling information"}
                
            ]
        },
        "PlannedEROHop": {
            "description": "Hop information used in path constraints. Since NS6.1.0 the correlation information is present on the interface. ",
            "properties": {
                "loose": {
                    "description": "indicates if the Hop is a loose Hop",
                    "type": "boolean",
                    "default": "false"
                },
                "correlated" : {
                    "description" : "For uncorrelated hops, the correlated information is provided. For already correlated hops the correlated information is already present, thus not repeated. This is ignore on request",
                    "$ref": "#/definitions/correlatedHop"
                }
            },
            "oneOf": [               
                {"$ref": "#/definitions/EROHop", "description": "Existing uncorellated IDs are still allowed for backward compatibility. NorthStar will provide the correlated information in the correlated attribute."},
                {"$ref": "#/definitions/correlatedHop", "description": "Correlated hop ids."}
            ]
        },
        "correlatedHop" : {
            "description" : "hop containing correlated (NS API indexes) information.",
            "oneOf" : [
                {"$ref": "link_v2.json#/definitions/scopedLinkReferenceTyped"},
                {"$ref": "link_v2.json#/definitions/linkReferenceTyped"},
                {"$ref": "node_v2.json#/definitions/nodeReferenceTyped"},
                {"$ref": "anycast.json#/definitions/anycastGroupReference"},
                {"$ref": "#/definitions/lspReferenceIndex"}
            ]
        },
        "PlannedXROHop" : {
            "description": "Hop information used in path exclusion constraints. Since NS6.1.0 the correlation information is present on the interface. ",
            "properties": {
                "correlated" : {
                    "description" : "For uncorrelated hops, the correlated information is provided. For already correlated hops the correlated information is already present, thus not repeated.",
                    "$ref": "#/definitions/correlatedHopXRO"
                }
            },
            "oneOf": [               
                {"$ref": "#/definitions/EROHop", "description": "Existing uncorellated IDs are still allowed for backward compatibility. They are replaced by their correlated equivalent."},
                {"$ref": "#/definitions/correlatedHopXRO", "description": "Correlated hop ids."}
            ]
        },
        "correlatedHopXRO" : {
            "description" : "XRO hop containing correlated (NS API indexes) information.",
            "oneOf" : [                
                {"$ref": "link_v2.json#/definitions/linkReferenceTyped", "description": "Both link direction are excluded."},
                {"$ref": "node_v2.json#/definitions/nodeReferenceTyped"},
                {"$ref": "anycast.json#/definitions/anycastGroupReference"},
                {"$ref": "#/definitions/lspReferenceIndex"},
                {"$ref": "facilities.json#/definitions/facilityReference"},
                {"type" : "object", "additionalProperties": false, "properties": {"AutonomousSystem":{"$ref" : "common.json#/definitions/ASNumber"}}}
            ]
        },
        "EROHop": {
            "description": "an LSP ERO Hop, not correlated",
            "properties": {
                "loose": {
                    "description": "indicates if the Hop is a loose Hop",
                    "type": "boolean",
                    "default": "false"
                }
            },
            "oneOf": [
                {
                    "$ref": "link.json#/definitions/ipv4Reference"
                },
                {
                    "$ref": "link.json#/definitions/unnumberedIfReference"
                },
                {
                    "$ref": "#/definitions/hopWithId"
                }
            ]
        },
        "hopWithId": {
            "type": "object",
            "description": "a numbered reference, not correlated to any object type",
            "required": ["id", "topoObjectType"],
            "properties": {
                "topoObjectType": {
                    "type": "string",
                    "enum": ["hopId"]
                },
                "id": {
                    "type": "string",
                    "description": "object id"
                }
            }
        },
        "SRAdjacencyNetworkAddress": {
            "type": "object",
            "description": "Network address in SR ERO",
            "properties": {
                "topoObjectType": {
                    "type": "string",
                    "enum": ["ipv4AdjacencyNAI", "ipv6AdjacencyNAI"]
                },
                "localAddress": {
                    "type": "string"
                },
                "remoteAddress": {
                    "type": "string"
                }
            }
        },
        "SRNodeNetworkAddress": {
            "type": "object",
            "description": "Network address in SR ERO",
            "properties": {
                "topoObjectType": {
                    "type": "string",
                    "enum": ["ipv4NodeNAI", "ipv6NodeNAI"]
                },
                "address": {
                    "type": "string"
                }
            }
        },
        "SREROHop": {
            "type": "object",
            "description": "An Segment Routing (SR) Hop",
            "required": ["topoObjectType"],
            "properties": {
                "topoObjectType": {
                    "type": "string",
                    "enum": ["SID", "adjacencySID", "nodeSID"]
                },
                "sid": {
                    "type": "integer",
                    "description": "the adjacency SID"
                },
                "nai": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/SRAdjacencyNetworkAddress"
                        }, {
                            "$ref": "#/definitions/SRNodeNetworkAddress"
                        }
                    ]
                },
                "loose": {
                    "description": "indicates if the Hop is a loose Hop",
                    "type": "boolean",
                    "default": "false"
                }
            }
        },
        "RROHop": {
            "description": "An LSP RRO Hop",
            "type": "object",
            "properties": {
                "protectionInUse": {
                    "description": "for RRO Hops only, indicate if the protection is active",
                    "type": "boolean",
                    "default": "false"
                },
                "protectionAvailable": {
                    "description": "for RRO Hops only, indicate if the protection is available",
                    "type": "boolean",
                    "default": "false"
                }
            },
            "oneOf": [
                {
                    "$ref": "link.json#/definitions/ipv4Reference"
                },
                {
                    "$ref": "link.json#/definitions/unnumberedIfReference"
                }
            ]
        },
        "pcepMetric" : {
            "type" : "object",
            "additionalProperties" : false,
            "description" : "A metric reported by PCEP, reference: https://www.iana.org/assignments/pcep/pcep.xhtml#metric-object-ni-field",
            "$comment" : "Introduced by POC-3747",
            "properties" : {
                "type" : {"type" : "string" , "enum": ["IGP", "TE", "hopCounts","aggregateBandwidthConsumption",
                                                       "loadOfTheMostLoadedLink", "cumulativeIGPCost", "cumulativeTECost",
                                                       "P2MPIGP", "P2MPTE", "P2MPHopCount",
                                                       "SIDDepth","PathDelay","pathDelayVariation",
                                                       "pathLoss","P2MPPathDelay",
                                                       "P2MPPathDelayVariation","P2MPPathLossMetric",
                                                       "MLAdaptationsCount","MLLayers",
                                                       "domainCount",
                                                       "borderNodeCount"], "$comment" : "keep aligned with LSPMetricType"},
                "value" : {"type" : "number", "description" : "the metric value"},
                "bound" : {"type" : "boolean", "description" : "Indicates if the value is a constraint."},
                "computed" : {"type" : "boolean", "description" : "Indicates if the value is a computed value."}
            }
        },        
        "lspLivePathProperties": {
            "description": "define the live-only tunnel properties, some properties are duplicated on purpose with plannedProperties, because of schema limitation (additionalProperties not expressed well with oneOf",

            "type": "object",
            "additionalProperties": false,
            "properties": {
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "pathName": {
                    "description": "Optional path name, fixed once LSP created",
                    "$ref": "common.json#/definitions/name"
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "metricList" : {
                    "type" : "array",
                    "description" : "List of metric reported by the PCC",
                    "items" : {"$ref" : "#/definitions/pcepMetric"}
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/EROHop"
                            }, {
                                "$ref": "#/definitions/SREROHop"
                            }
                        ]
                    }
                },
                "rro": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/RROHop"
                    }
                },
                "options": {
                    "type": "object",
                    "description": "the object carries a set of optional properties",
                    "additionalProperties": false,
                    "properties": {
                        "autoBandwidth": {
                            "type": "boolean",
                            "description": "Read-only parameter, indicates if auto-bandwidth is activated on the LSP. Valid only on Juniper Routers. When set the bandwidth is controlled by the PCC, bandwidth set from REST or UI is ignored."

                        },
                        "TEPlusPlusId": {
                            "type": "integer",
                            "description": "Read-only parameter, indicates if the TE-LSP is part of a TE++ LSp setup. All TE-LSPs in the same TE++Group share the same TE++Id"

                        }
                    }
                },
                "operationalStatus": {
                    "oneOf": [
                        {
                            "$ref": "common.json#/definitions/operStatus"
                        },
                        {
                            "$ref": "#/definitions/lspExtendedOperStatus"
                        }
                    ]
                },
                "frrLocalProtection": {
                    "type": "object",
                    "description": "Indicates if a tunnel is FRR-protected or not",
                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "description": "indicate if local protection is requested for the LSP."
                        }
                    }
                },
                "bindingSID": {
                    "description": "Binding SID assigned to the LSP",
                    "$ref": "common.json#/definitions/SID"
                },
                "adminGroups": { "$ref" : "#/definitions/adminGroups"},
                "srPolicy" : {
                    "type" : "object",
                    "description" : "SR Policy parameters, as defined in draft-ietf-spring-segment-routing-policy-08",
                    "additionalProperties": false,
                    "required" : ["color", "endpoint", "protocolOrigin", "originatorAS", "originatorAddress", "discriminator"], 
                    "properties": {
                        "color"    : {"description": "SR policy color", "$ref": "common.json#/definitions/lspColor"},
                        "endpoint" : {"description": "SR policy endpoint","$ref": "link.json#/definitions/ipv4Reference"},
                        "protocolOrigin" : {
                            "type" : "string",
                            "description" : "Protocol that configured that srPolicy candidate path segment list.See draft-ietf-spring-segment-routing-policy-08, Section 2.3",
                            "enum": ["PCEP", "BGP", "Configuration"]
                        },
                        "originatorAS" : {
                            "description" : "ASN of the entity that configured that srPolicy candidate path segment list.See draft-ietf-spring-segment-routing-policy-08, Section 2.4",
                            "$ref": "common.json#/definitions/ASNumber"
                        },
                        "originatorAddress" : {
                            "description" : "Address of the entity that configured that srPolicy candidate path segment list.See draft-ietf-spring-segment-routing-policy-08, Section 2.4",
                            "$ref": "link.json#/definitions/ipv4Reference"
                        },
                        "discriminator" : {
                            "description" : "Entity Discriminator.See draft-ietf-spring-segment-routing-policy-08, Section 2.5",
                            "type": "integer",
                            "minimum": 0
                        },
                        "preference" : {
                            "description" : "Preference of the policy.See draft-ietf-spring-segment-routing-policy-08, Section 2.7",
                            "type": "integer",
                            "minimum": 0,
                            "default" : 100
                        }
                    }
                }
            }
        },
        "p2mpGroupCommonDesignParameters": {
            "description": " Design parameters for p2mp common properties, same as designParameters but the required properties will be set (according to the defaults if not present) to model the fact that those MUST be common on all the P2MP leafs.",

            "type": "object",
            "additionalProperties": false,
            "$comment": "keep in sync in commonP2MPProperties",
            "required": ["adminGroups"],
            "properties": {
                "routingMethod": {
                    "description": "If the routingMethod is set to routeByDevice, no routing will be performed, the ero will be sent to the PCC",

                    "type": "string",
                    "enum": [
                        "default", "adminWeight", "delay", "constant", "distance", "ISIS", "OSPF", "routeByDevice"
                    ],
                    "default": "default"
                },
                "maxHop": {
                    "description": "Maximum Hop Count",
                    "type": "integer",
                    "minimum": 0
                },
                "maxDelay": {
                    "description": "Maximum Delay, unit :millisecond",
                    "type": "integer",
                    "minimum": 0
                },
                "maxCost": {
                    "description": "Maximum Cost",
                    "type": "integer",
                    "minimum": 0
                },
                "diversityLevel": {
                    "description": "Level of diversity",
                    "type": "string",
                    "enum": ["site", "srlg", "link"]
                },
                "minimumDiversityLevel": {
                    "description": "This is the minimum level of diversity NorthStar will consider. If not set, NorthStar will find the best achievable diversity based on the diversityLevel. If set, and if no path is found with minimumDiversityLevel, the LSP is considered as not routed. If two LSP in the same diversity group have different minimumDiversityLevel, the higher is used none < link < srlg < site",

                    "type": "string",
                    "enum": ["site", "srlg", "link"]
                },
                "diversityGroup": {
                    "description": "Diversity group",
                    "type": "string"
                },
                "useProtectedLinks": {
                    "description": "If set, the path will prefer protected links",
                    "type": "string",
                    "enum": ["Protected"]
                },
                "adminGroups": {
                    "$ref" : "#/definitions/adminGroupsReq"
                },
                "coroutedPairId": {
                    "description": "Id to associate two unidirectional co-routed LSPs",
                    "type": "string"
                }
            }
        },
        "p2mpGroupCommonDesignParametersPCEP": {
            "description": " Design parameters for p2mp common properties, same as designParameters but the required properties will be set (according to the defaults if not present) to model the fact that those MUST be common on all the P2MP leafs.",

            "type": "object",
            "additionalProperties": false,
            "$comment": "keep in sync in commonP2MPProperties",
            "required": ["adminGroups"],
            "properties": {
                "routingMethod": {
                    "description": "If the routingMethod is set to routeByDevice, no routing will be performed, the ero will be sent to the PCC",

                    "type": "string",
                    "enum": ["default", "adminWeight", "delay", "constant", "distance", "ISIS", "OSPF"],
                    "default": "default"
                },
                "maxHop": {
                    "description": "Maximum Hop Count",
                    "type": "integer",
                    "minimum": 0
                },
                "maxDelay": {
                    "description": "Maximum Delay, unit :millisecond",
                    "type": "integer",
                    "minimum": 0
                },
                "maxCost": {
                    "description": "Maximum Cost",
                    "type": "integer",
                    "minimum": 0
                },
                "diversityLevel": {
                    "description": "Level of diversity",
                    "type": "string",
                    "enum": ["site", "srlg", "link"]
                },
                "minimumDiversityLevel": {
                    "description": "This is the minimum level of diversity NorthStar will consider. If not set, NorthStar will find the best achievable diversity based on the diversityLevel. If set, and if no path is found with minimumDiversityLevel, the LSP is considered as not routed. If two LSP in the same diversity group have different minimumDiversityLevel, the higher is used none < link < srlg < site",

                    "type": "string",
                    "enum": ["site", "srlg", "link"]
                },

                "diversityGroup": {
                    "description": "Diversity group",
                    "type": "string"
                },
                "useProtectedLinks": {
                    "description": "If set, the path will prefer protected links",
                    "type": "string",
                    "enum": ["Protected"]
                },
                "adminGroups": {
                    "$ref" : "#/definitions/adminGroupsReq"
                },
                "coroutedPairId": {
                    "description": "Id to associate two unidirectional co-routed LSPs",
                    "type": "string"
                }
            }
        },
        "designParameters": {
            "type": "object",
            "additionalProperties": false,
            "description": " Design parameters",
            "properties": {
                "routingMethod": {
                    "description": "If the routingMethod is set to routeByDevice, no routing will be performed, the ero will be sent to the PCC",

                    "type": "string",
                    "enum": [
                        "default", "adminWeight", "delay", "constant", "distance", "ISIS", "OSPF", "routeByDevice"
                    ],
                    "default": "default"
                },
                "maxHop": {
                    "description": "Maximum Hop Count",
                    "type": "integer",
                    "minimum": 0
                },
                "maxDelay": {
                    "description": "Maximum Delay, unit :millisecond",
                    "type": "integer",
                    "minimum": 0
                },
                "maxCost": {
                    "description": "Maximum Cost",
                    "type": "integer",
                    "minimum": 0
                },
                "diversityLevel": {
                    "description": "Level of diversity",
                    "type": "string",
                    "enum": ["site", "srlg", "link"]
                },
                "minimumDiversityLevel": {
                    "description": "This is the minimum level of diversity NorthStar will consider. If not set, NorthStar will find the best achievable diversity based on the diversityLevel. If set, and if no path is found with minimumDiversityLevel, the LSP is considered as not routed. If two LSP in the same diversity group have different minimumDiversityLevel, the higher is used none < link < srlg < site",

                    "type": "string",
                    "enum": ["site", "srlg", "link"]
                },

                "diversityGroup": {
                    "description": "Diversity group",
                    "type": "string"
                },
                "useProtectedLinks": {
                    "description": "If set, the path will prefer protected links",
                    "type": "string",
                    "enum": ["Protected"]
                },
                "adminGroups": { "$ref" : "#/definitions/adminGroups"},
                "coroutedPairId": {
                    "description": "Id to associate two unidirectional co-routed LSPs",
                    "type": "string"
                },
                "useNodeSIDs": {
                    "type": "boolean",
                    "description": "For SR LSPs, if enabled in northstar.cfg (PCServer_routeOverLogicalSRLink=1) the path computation will try to use Node SIDs (following IGP ECMP shortest path route) when possible.",
                    "default": false
                },
                "reroutingBehavior" : {
                    "description": "If not set NorthStar will reroute the LSPs, if set the specific rerouting behavior will be used.",
                    "type": "string",
                    "enum": ["noRerouting"]                    
                },
                "diversityGroupRoutingPriority" : {
                    "description": "Force the routing order of LSPs in a diverse group.",
                    "type": "integer",
                    "minimum": 0
                }
                
            }
        },
        "plannedPolicies": {
            "type": "object",
            "additionalProperties": false,
            "description": "LSP routing policies",
            "properties": {
                "delayBasedMetrics": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "LSP delay-based metric policies",
                    "required": ["highDelayThreshold", "lowDelayThreshold", "highDelayMetric"],
                    "properties": {
                        "highDelayThreshold": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "High delay Threshold: when the calculated delay is greater than the threshold, the LSP is configured using the highDelayMetric"

                        },
                        "lowDelayThreshold": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "Low delay Threshold: when the calculated delay is lower than the threshold, the LSP is configured using the metric if set (otherwise the LSP live metric)"

                        },
                        "highDelayMetric": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "High metric value"
                        },
                        "lowDelayMetric": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "Low metric value"
                        }
                    }
                },
                "bandwidthSizing": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "LSP auto-bandwidth adjustment policies",
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "description": "indicates if auto bandwidth is enabled",
                            "default": false
                        },
                        "adjustmentThreshold": {
                            "description": "sensitivity of the bandwidth adjustment. The new planned bandwidth is compared with the current planned bandwidth. The new planned bandwidth is considered only if the percentage difference in bandwidth is greater than or equal to the specified adjustment threshold percentage",
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100,
                            "default": 10
                        },
                        "minBandwidth": {
                            "description": "maintain the LSP bandwidth between minimum and maximum bounds by specifying values for the min bandwidth",

                            "$ref": "common.json#/definitions/Bandwidth",
                            "default": 0
                        },
                        "maxBandwidth": {
                            "description": "maintain the LSP bandwidth between minimum and maximum bounds by specifying values for the max bandwidth",

                            "$ref": "common.json#/definitions/Bandwidth"
                        },
                        "minVariation": {
                            "description": "LSP bandwidth sizing to be done only if the new planned bandwidth is above the min variation threshold",

                            "$ref": "common.json#/definitions/Bandwidth",
                            "default": 0
                        }
                    }
                }
            }
        },
        "lspPlannedPathPropertiesSecondary": {
            "description": "define the non-tunnel attributes of an secondary or standby TE-LSP, the one that may be modified. ",

            "type": "object",
            "additionalProperties": false,
            "required": ["pathName"],
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "pathName": {
                    "description": "For secondary and standby LSPs, required path name, fixed once LSP created",
                    "$ref": "common.json#/definitions/name64"
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found.",
                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "the path calculated by NorthStar.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "the desired explicit path--if the path is not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "last status for the LSP",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP.",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests",
                    "type": "integer",
                    "minimum": 0
                },
                "requestedProtectionCommand": {
                    "type": "string",
                    "description": "Protection switch command, for netconf LSPs only",
                    "enum": ["manualSwitchToProtecting"]
                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "usePenultimateHopAsSignalingAddress": {
                    "description": "Valid for SR LSP only. If set, the penultimate hop will be used as the destination of the tunnel, as seen by the PCC, while the Traffic engineering destination is the to. For instance in EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution. The address used by default is the te-router id of the penultimate hop. If a routing constraint (ero) does match that penultimate hop, the address specified in the routing constraint will be used.",

                    "type": "boolean",
                    "default": false
                }
            }
        },
        "lspCollectedPathProperties": {
            "description": "Defines the attributes collected via deviceCollection.",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "explicitPathName": {
                    "description": "Explicit path name",
                    "$ref": "common.json#/definitions/name64"
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found. Not valid on POST/PUT ",

                    "$ref": "common.json#/definitions/operStatus"
                },
                "lastStatusString": {
                    "description": "last status for the LSP",
                    "type": "string"
                },
                "rro": {
                    "type": "array",
                    "description": "Operational Path, please note that its reported as an ERO hop list from parser.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/PlannedEROHop"
                            }, {
                                "$ref": "#/definitions/SREROHop"
                            }
                        ]
                    }
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "the path calculated by NorthStar, it does not include node ids",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/CalculatedHop"
                            }, {
                                "$ref": "#/definitions/SREROHop"
                            }
                        ]
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/PlannedEROHop"
                            }, {
                                "$ref": "#/definitions/SREROHop"
                            }
                        ]
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",

                    "type": "integer",
                    "minimum": 0
                },
                "timestamp": {
                    "description": "Describe when the collection took place",
                    "type": "integer"
                },
                "frrLocalProtection": {
                    "type": "object",
                    "description": "Read-only, Indicates if a LSP is FRR-protected or not. This is for the Protected LSP.",

                    "additionalProperties": false,
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "description": "indicate if FRR local protection is requested for the LSP."
                        },
                        "localProtectionType": {
                            "type": "string",
                            "description": "The type of local protection requested. NHOP Bypass is link-level protection, NNHOP is link-node-level protection (Please refer to RFC4090#section-2).",

                            "enum": ["Detour", "NHOP Bypass", "NNHOP Bypass"]
                        }
                    }
                },
                "frrProtectingAttributes": {
                    "type": "object",
                    "description": "Read-only, Indicates if a LSP a bypass. This is for the Protecting LSP.",
                    "properties": {
                        "localProtectionType": {
                            "type": "string",
                            "description": "The type of local protection configured. NHOP Bypass is link-level protection, NNHOP is link-node-level protection (Please refer to RFC4090#section-2).",

                            "enum": ["NHOP Bypass", "NNHOP Bypass"]
                        }
                    }
                },
                "protectionCommand": {
                    "type": "string",
                    "description": "Protection switch command, for netconf LSPs only",
                    "enum": ["manualSwitchToProtecting", "manualSwitchToWorking"]
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP. In the context of collected Properties this reflects the NETCONF status of the controller",

                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "bindingSID": {
                    "description": "Binding SID assigned to the LSP",
                    "$ref": "common.json#/definitions/SID"
                },
                "color": {
                    "$ref": "common.json#/definitions/lspColor"
                },
                "lastUpdate": {
                    "type": "string",
                    "description": "ISO 8101 timestamp",
                    "format": "datetime"
                }

            }
        },
        "lspPlannedPathPropertiesPrimarySR": {
            "$comment": "used by createLSPPrimarySR",
            "description": "define the non-tunnel attributes of an TE-LSP, the one that may be modified",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found.",
                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "path calculated by NorthStar, it does not include node ids. ignored/Not valid on POST/PUT.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "The last status for the LS. Not valid on POST/PUT.P",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP. Not valid on POST/PUT.",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",
                    "type": "integer",
                    "minimum": 0
                },
                "pathDefinitionUsed": {
                    "type": "string",
                    "description": "For SR-Tunnel there is no secondary LSP, the live status of the tunnel is mapped into the primary LSP definition. In order to evaluate correctly which path is currently in use this attribute indicate the pathName of the secondary LSP used. This attribute is not present for RSVP-LSPs. This attribute is not present if the primary definition is used. Not valid on POST/PUT."
                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "bindingSID": {
                    "description": "Binding SID assigned to the LSP",
                    "$ref": "common.json#/definitions/SID"
                },
                "color": {
                    "$ref": "common.json#/definitions/lspColor"
                },
                "usePenultimateHopAsSignalingAddress": {
                    "description": "Valid for SR LSP only. If set, the penultimate hop will be used as the destination of the tunnel, as seen by the PCC, while the Traffic engineering destination is the to. For instance in EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution. The address used by default is the te-router id of the penultimate hop. If a routing constraint (ero) does match that penultimate hop, the address specified in the routing constraint will be used.",

                    "type": "boolean",
                    "default": false
                }
            }
        },
        "p2mpGroupCommonPlannedProperties": {
            "anyOf": [
                {
                    "$ref": "#/definitions/p2mpGroupCommonPlannedPropertiesPCEP"
                },
                {
                    "$ref": "#/definitions/p2mpGroupCommonPlannedPropertiesNETCONF"
                }
            ]
        },
        "p2mpGroupCommonPlannedPropertiesPCEP": {
            "description": "define theLSP attributes that can be set for a P2MP group. The required attributes are checked *AFTER* the defaults have been applied ",
            "type": "object",
            "additionalProperties": false,
            "$comment": "keep in sync in commonP2MPProperties",
            "required": ["bandwidth", "setupPriority", "holdingPriority", "design"],
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/p2mpGroupCommonDesignParametersPCEP"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "flows": {
                    "description": "Traffic flow specifications used to push flow mappings to steer traffic to an LSP. Supported for P2MP LSPs provisioned via PCEP",
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/flowspecFlow"
                    }
                }
            }
        },
        "p2mpGroupCommonPlannedPropertiesNETCONF": {
            "description": "define theLSP attributes that can be set for a P2MP group. The required attributes are checked *AFTER* the defaults have been applied ",
            "type": "object",
            "additionalProperties": false,
            "$comment": "keep in sync in commonP2MPProperties",
            "required": ["bandwidth", "setupPriority", "holdingPriority", "design"],
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/p2mpGroupCommonDesignParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "flows": {
                    "description": "Traffic flow specifications used to push flow mappings to steer traffic to an LSP. Supported for P2MP LSPs provisioned via PCEP",
                    "type": "array",
                    "minItems": 0,
                    "items": {
                        "$ref": "#/definitions/flowspecFlow"
                    }
                }
            }
        },

        "flowspecFlow": {
            "description": "Flow entry, pushed via PCEP to PCCs. Flow entries follow the format specified in BGP FLOWSPEC which are encapsulated in PCEP messages and used to steer traffic to an LSP",
            "type": "object",
            "additionalProperties": false,
            "required": ["vpn", "topoObjectType"],
            "properties": {
                "topoObjectType": {
                    "type": "string",
                    "enum": ["flow"]
                },
                "source": {
                    "$ref": "common.json#/definitions/ipv4Prefix"
                },
                "group": {
                    "$ref": "common.json#/definitions/ipv4Prefix"
                },
                "vpn": {
                    "$ref": "common.json#/definitions/vpnIdentifier"
                },
                "id": {
                    "$ref": "common.json#/definitions/index"
                }
            }
        },

        "lspPlannedPathPropertiesNoSwitchCommand": {
            "$comment": "Restricted planned property without switch commands, used in createP2MPMember, createLSPPrimaryRSVP, updateLSPPrimaryRSVP",
            "description": "define the non-tunnel attributes of an TE-LSP, the one that may be modified",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "pathName": {
                    "description": "Optional path name, fixed once LSP created",
                    "$ref": "common.json#/definitions/name64"
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found. Not valid on POST/PUT ",


                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "path calculated by NorthStar, it does not include node ids. Not valid on POST/PUT ",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",


                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "The last status for the LSP, Not valid on POST/PUT ",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP., Not valid on POST/PUT ",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",

                    "type": "integer",
                    "minimum": 0
                },
                "pathDefinitionUsed": {
                    "type": "string",
                    "description": "For SR-Tunnel there is no secondary LSP, the live status of the tunnel is mapped into the primary LSP definition. In order to evaluate correctly which path is currently in use this attribute indicate the pathName of the secondary LSP used. This attribute is not present for RSVP-LSPs. This attribute is not present if the primary definition is used. Not valid on POST/PUT "

                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                }
            }
        },
        "lspPlannedPathPropertiesNoSwitchCommandSR": {
            "$comment": "Restricted planned property without switch commands, binding SID allowed updateLSPPrimarySR",
            "description": "define the non-tunnel attributes of an TE-LSP, the one that may be modified",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found. Not valid on POST/PUT ",

                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "path calculated by NorthStar, it does not include node ids. Not valid on POST/PUT ",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "The last status for the LSP, Not valid on POST/PUT ",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP., Not valid on POST/PUT ",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",

                    "type": "integer",
                    "minimum": 0
                },
                "pathDefinitionUsed": {
                    "type": "string",
                    "description": "For SR-Tunnel there is no secondary LSP, the live status of the tunnel is mapped into the primary LSP definition. In order to evaluate correctly which path is currently in use this attribute indicate the pathName of the secondary LSP used. This attribute is not present for RSVP-LSPs. This attribute is not present if the primary definition is used. Not valid on POST/PUT "

                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "bindingSID": {
                    "description": "Binding SID assigned to the LSP",
                    "$ref": "common.json#/definitions/SID"
                },
                "color": {
                    "$ref": "common.json#/definitions/lspColor"
                },
                "usePenultimateHopAsSignalingAddress": {
                    "description": "Valid for SR LSP only. If set, the penultimate hop will be used as the destination of the tunnel, as seen by the PCC, while the Traffic engineering destination is the to. For instance in EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution. The address used by default is the te-router id of the penultimate hop. If a routing constraint (ero) does match that penultimate hop, the address specified in the routing constraint will be used.",

                    "type": "boolean",
                    "default": false
                },
                "pathName": {
                    "description": "Optional path name, fixed once LSP created",
                    "$ref": "common.json#/definitions/name64"
                }
            }
        },
        "lspPlannedPathPropertiesSwitchCommandPrimary": {
            "$comment": "Restricted planned property with switch command,  used in createLSPPrimaryRSVP, updateLSPPrimaryRSVP",

            "description": "define the non-tunnel attributes of an TE-LSP, the one that may be modified",
            "type": "object",
            "required": ["pathName", "requestedProtectionCommand"],
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "pathName": {
                    "description": "Optional path name, fixed once LSP created",
                    "$ref": "common.json#/definitions/name64"
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found. Not valid on POST/PUT ",

                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "path calculated by NorthStar, it does not include node ids. Not valid on POST/PUT ",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "The last status for the LSP, Not valid on POST/PUT ",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP., Not valid on POST/PUT ",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",

                    "type": "integer",
                    "minimum": 0
                },
                "pathDefinitionUsed": {
                    "type": "string",
                    "description": "For SR-Tunnel there is no secondary LSP, the live status of the tunnel is mapped into the primary LSP definition. In order to evaluate correctly which path is currently in use this attribute indicate the pathName of the secondary LSP used. This attribute is not present for RSVP-LSPs. This attribute is not present if the primary definition is used. Not valid on POST/PUT "

                },
                "requestedProtectionCommand": {
                    "type": "string",
                    "description": "Protection switch command, for netconf LSPs only",
                    "enum": ["manualSwitchToWorking"]
                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                }
            }
        },
        "lspPlannedPathPropertiesSwitchCommandPrimarySR": {
            "$comment": "Restricted planned property with switch command,  used in updateLSPPrimarySR, differ from lspPlannedPathPropertiesSwitchCommandPrimary that binding SID is allowed",

            "description": "define the non-tunnel attributes of an TE-LSP, the one that may be modified",
            "type": "object",
            "required": ["pathName", "requestedProtectionCommand"],
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found. Not valid on POST/PUT ",

                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "path calculated by NorthStar, it does not include node ids. Not valid on POST/PUT ",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "The last status for the LSP, Not valid on POST/PUT ",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP., Not valid on POST/PUT ",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-lsps path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",

                    "type": "integer",
                    "minimum": 0
                },
                "pathDefinitionUsed": {
                    "type": "string",
                    "description": "For SR-Tunnel there is no secondary LSP, the live status of the tunnel is mapped into the primary LSP definition. In order to evaluate correctly which path is currently in use this attribute indicate the pathName of the secondary LSP used. This attribute is not present for RSVP-LSPs. This attribute is not present if the primary definition is used. Not valid on POST/PUT "

                },
                "requestedProtectionCommand": {
                    "type": "string",
                    "description": "Protection switch command, for netconf LSPs only",
                    "enum": ["manualSwitchToWorking"]
                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "bindingSID": {
                    "description": "Binding SID assigned to the LSP",
                    "$ref": "common.json#/definitions/SID"
                },
                "color": {
                    "$ref": "common.json#/definitions/lspColor"
                },
                "usePenultimateHopAsSignalingAddress": {
                    "description": "Valid for SR LSP only. If set, the penultimate hop will be used as the destination of the tunnel, as seen by the PCC, while the Traffic engineering destination is the to. For instance in EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution. The address used by default is the te-router id of the penultimate hop. If a routing constraint (ero) does match that penultimate hop, the address specified in the routing constraint will be used.",

                    "type": "boolean",
                    "default": false
                }
            }
        },

        "lspPlannedPathProperties": {
            "$comment": "All possible planned properties, used by LSP",
            "description": "define the non-tunnel attributes of an TE-LSP, the one that may be modified",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "comment": {
                    "description": "Comment",
                    "type": "string"
                },
                "setupPriority": {
                    "description": "Setup priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "holdingPriority": {
                    "description": "Holding priority",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 7
                },
                "pathName": {
                    "description": "Optional path name, fixed once LSP created",
                    "$ref": "common.json#/definitions/name64"
                },
                "bandwidth": {
                    "$ref": "common.json#/definitions/Bandwidth"
                },
                "adminStatus": {
                    "$ref": "common.json#/definitions/adminStatus"
                },
                "metric": {
                    "type": "integer",
                    "description": "resulting IGP metric of the tunnel"
                },
                "bandwidthCalendar": {
                    "$ref": "common.json#/definitions/calendarSchema"
                },
                "design": {
                    "$ref": "#/definitions/designParameters"
                },
                "policy": {
                    "$ref": "#/definitions/plannedPolicies"
                },
                "routingStatus": {
                    "description": "routing operational status, when Down it means that no route has been found. Not valid on POST/PUT ",

                    "$ref": "common.json#/definitions/operStatus"
                },
                "calculatedEro": {
                    "type": "array",
                    "description": "path calculated by NorthStar, it does not include node ids. Not valid on POST/PUT ",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/CalculatedHop"
                    }
                },
                "ero": {
                    "type": "array",
                    "description": "required explicit path",
                    "minItems": 1,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "preferredEro": {
                    "description": "desired explicit path--if not feasible NorthStar will calculate another path",
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedEROHop"
                    }
                },
                "xro": {
                    "type": "array",
                    "description": "Exclusions as ERO HOP list. The loose flag not considered.",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "preferredXro": {
                    "description": "Desired exclusions path, as ERO HOP list. The loose flag not considered. --if not feasible NorthStar will calculate another path",

                    "type": "array",
                    "minItems": 0,
                    "maxItems": 255,
                    "items": {
                        "$ref": "#/definitions/PlannedXROHop"
                    }
                },
                "lastStatusString": {
                    "description": "The last status for the LSP, Not valid on POST/PUT ",
                    "type": "string"
                },
                "controllerStatus": {
                    "type": "object",
                    "description": "current controller status for the LSP., Not valid on POST/PUT ",
                    "attributes": {
                        "status": {
                            "type": "string",
                            "description": "String representing the Path Computation Server status"
                        },
                        "time": {
                            "type": "string",
                            "description": "Indication when the next action will be done"
                        },
                        "trigger": {
                            "type": "string",
                            "description": "Optional indication of which event triggered the current status"
                        }
                    }
                },
                "preference": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 10,
                    "description": "parameter indicates the order (lowest first) in which secondary/standby te-LSPs path are tried in case of active LSP failure, active LSPs before down LSPs"

                },
                "correlatedRROHopCount": {
                    "description": "Hop count derived from RRO correlated to topology information. If the RRO contains a mix of node and link IP address, NorthStar is using its correlation to provide this number. This attribute is ignored on PUT or POST requests. Not valid on POST/PUT.",

                    "type": "integer",
                    "minimum": 0
                },
                "pathDefinitionUsed": {
                    "type": "string",
                    "description": "For SR-Tunnel there is no secondary LSP, the live status of the tunnel is mapped into the primary LSP definition. In order to evaluate correctly which path is currently in use this attribute indicate the pathName of the secondary LSP used. This attribute is not present for RSVP-LSPs. This attribute is not present if the primary definition is used. Not valid on POST/PUT "

                },
                "requestedProtectionCommand": {
                    "type": "string",
                    "description": "Protection switch command, for netconf LSPs only",
                    "enum": ["manualSwitchToProtecting", "manualSwitchToWorking"]
                },
                "userProperties": {
                    "$ref": "userProperties.json#/definitions/lspUserProperties"
                },
                "bindingSID": {
                    "description": "Binding SID assigned to the LSP",
                    "$ref": "common.json#/definitions/SID"
                },
                "color": {
                    "$ref": "common.json#/definitions/lspColor"
                },
                "usePenultimateHopAsSignalingAddress": {
                    "description": "Valid for SR LSP only. If set, the penultimate hop will be used as the destination of the tunnel, as seen by the PCC, while the Traffic engineering destination is the to. For instance in EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution. The address used by default is the te-router id of the penultimate hop. If a routing constraint (ero) does match that penultimate hop, the address specified in the routing constraint will be used.",

                    "type": "boolean",
                    "default": false
                },
                "lastUpdate": {
                    "type": "string",
                    "description": "ISO 8101 timestamp",
                    "format": "datetime"
                },
                "flows": {
                    "description": "Traffic flow specifications used to push flow mappings to steer traffic to an LSP",
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/flowspecFlow"
                    }
                }
            }
        },

        "lspExtendedOperStatus": {
            "description": "Lsp additional operation status",
            "type": "string",
            "enum": ["GoingUp", "GoingDown", "Active"]
        },
        "createLSPPrimarySR": {
            "description": "defines the set of attributes that can be provided on lsp Create (POST) message",
            "type": "object",
            "additionalProperties": false,
            "required": ["name", "from", "to", "provisioningType"],
            "properties": {
                "name": {
                    "description": "tunnel name, several TE-LSP may have the same name, they are part of the same tunnel",

                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel",

                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel",

                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "pathType": {
                    "description": "The role of the path",
                    "type": "string",
                    "enum": ["primary"],
                    "default": "primary"
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["SR"]
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP.",
                    "type": "string",
                    "enum": ["PCEP", "NETCONF"],
                    "default": "PCEP"
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",

                    "$ref": "#/definitions/lspPlannedPathPropertiesPrimarySR"
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                }
            }
        },
        "createP2MPMember": {
            "description": "defines the set of attributes that can be provided on P2MP leaf Create (POST/PATCH)",
            "type": "object",
            "additionalProperties": false,
            "required": ["to"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp, only valid for PUT",
                    "$ref": "common.json#/definitions/index"
                },
                "from": {
                    "description": "Ignored, the from of the P2MP group is used. Allowed for compatibility with te-LSPs",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update on the P2MP object. The Bandwidth is ignored, it must be specified ",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesNoSwitchCommand"
                        }
                    ]
                }
            }
        },
        "createP2MPMemberNETCONF": {
            "description": "defines the set of attributes that can be provided on P2MP lsp Create (POST) or update  (PUT) message for NETCONF LSPs",
            "type": "object",
            "additionalProperties": false,
            "required": ["to"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp, only valid for PUT",
                    "$ref": "common.json#/definitions/index"
                },
                "name": {
                    "description": "tunnel name, several TE-LSP may have the same name, they are part of the same tunnel",
                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "Ignored, the from of the P2MP group is used. Allowed for compatibility with te-LSPs",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP. For P2MP members, only NETCONF is supported",
                    "type": "string",
                    "enum": ["NETCONF"],
                    "default": "NETCONF"
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update on the P2MP object. The Bandwidth is ignored, it must be specified ",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesNoSwitchCommand"
                        }
                    ]
                }
            }
        },
        "createP2MPMemberPCEP": {
            "description": "defines the set of attributes that can be provided on P2MP lsp Create (POST) or update  (PUT) message, for PCEP provisioning. The LSP name is fixed : <tree name>_<destination>",
            "type": "object",
            "additionalProperties": false,
            "required": ["to"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp, only valid for PUT",
                    "$ref": "common.json#/definitions/index"
                },
                "from": {
                    "description": "Ignored, the from of the P2MP group is used. Allowed for compatibility with te-LSPs",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP. For P2MP members, only NETCONF is supported",
                    "type": "string",
                    "enum": ["PCEP"]
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update on the P2MP object. The Bandwidth is ignored, it must be specified ",

                    "oneOf": [
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesNoSwitchCommand"
                        }
                    ]
                }
            }
        },
        "createLSPPrimaryRSVP": {
            "description": "defines the set of attributes that can be provided on lsp Create (POST) message",
            "type": "object",
            "additionalProperties": false,
            "required": ["name", "from", "to"],
            "properties": {
                "name": {
                    "description": "tunnel name, several TE-LSP may have the same name, they are part of the same tunnel",

                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel",

                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel",

                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "pathType": {
                    "description": "The role of the path",
                    "type": "string",
                    "enum": ["primary"],
                    "default": "primary"
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["RSVP"],
                    "default": "RSVP"
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP.",
                    "type": "string",
                    "enum": ["NETCONF", "PCEP"],
                    "default": "PCEP"
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",

                    "oneOf": [
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesNoSwitchCommand"
                        },
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesSwitchCommandPrimary"
                        }
                    ]
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                }
            }
        },

        "createLSPSecondary": {
            "description": "defines the attribute set that can be provided on lsp Create (POST) message",
            "type": "object",
            "additionalProperties": false,
            "required": ["name", "from", "to", "pathType"],
            "properties": {
                "name": {
                    "description": "tunnel name, several TE-LSP may have the same name, they are part of the same tunnel",

                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel",

                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "tunnel destination, should reference an interface or a node, same for all TE-LSP of a tunnel",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "pathType": {
                    "description": "The role of the path",
                    "type": "string",
                    "enum": ["secondary", "standby"]
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["RSVP", "SR"],
                    "default": "RSVP"
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP. For SR LSP, it MUST be PCEP. It MUST be the same for the primary, secondary and standby LSPs of the same Tunnel.",
                    "type": "string",
                    "enum": ["PCEP", "NETCONF"],
                    "default": "PCEP"
                },

                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",
                    "$ref": "#/definitions/lspPlannedPathPropertiesSecondary"
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                }
            }
        },
        "PCEP-RSVP-NoRouteByDevice": {
            "description": "PCEP RSVP LSP do not support routeByDevice routingMethod. This schema is validating all the cases (and only those) that will be rejected",
            "type": "object",
            "required": ["plannedProperties"],
            "properties": {
                "provisioningType": {
                    "type": "string",
                    "enum": ["RSVP"]
                },
                "creationConfigurationMethod": {
                    "type": "string",
                    "enum": ["PCEP"]
                },
                "controlType": {
                    "type": "string",
                    "enum": ["PCEInitiated"]
                },
                "plannedProperties": {
                    "type": "object",
                    "required": ["design"],
                    "properties": {
                        "design": {
                            "type": "object",
                            "required": ["routingMethod"],
                            "properties": {
                                "routingMethod": {
                                    "type": "string",
                                    "enum": ["routeByDevice"]
                                }
                            }
                        }
                    }
                }
            }
        },
        "PCC-Controlled-NoBwSizing": {
            "description": "NETCONF- LSP must not allow bwSizing parameters (feature restriction), The following sub-schema are used in a not condition and are matching NETCONF LSPs with bandwidth sizing set to true",
            "anyOf": [
                {
                    "description": "PCC-Controlled LSPs (or NETCONF-created) should not allow bwSizing parameters (NETCONF provisioning)",
                    "type": "object",
                    "required": ["plannedProperties", "creationConfigurationMethod"],
                    "properties": {
                        "creationConfigurationMethod": {
                            "type": "string",
                            "enum": ["NETCONF"]
                        },
                        "controlType": {
                            "type": "string",
                            "enum": ["PCC"]
                        },
                        "plannedProperties": {
                            "type": "object",
                            "required": ["policy"],
                            "properties": {
                                "policy": {
                                    "type": "object",
                                    "required": ["bandwidthSizing"],
                                    "properties": {
                                        "bandwidthSizing": {
                                            "type": "object",
                                            "required": ["enabled"],
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean",
                                                    "enum": [true]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "description": "PCC-Controlled LSPs (or NETCONF-created) should not allow bwSizing parameters (NETCONF provisioning)",
                    "type": "object",
                    "required": ["plannedProperties", "controlType"],
                    "properties": {
                        "creationConfigurationMethod": {
                            "type": "string",
                            "enum": ["NETCONF"]
                        },
                        "controlType": {
                            "type": "string",
                            "enum": ["PCC"]
                        },
                        "plannedProperties": {
                            "type": "object",
                            "required": ["policy"],
                            "properties": {
                                "policy": {
                                    "type": "object",
                                    "required": ["bandwidthSizing"],
                                    "properties": {
                                        "bandwidthSizing": {
                                            "type": "object",
                                            "required": ["enabled"],
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean",
                                                    "enum": [true]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "description": "PCC-Controlled LSPs (or NETCONF-created) should not allow bwSizing parameters (NETCONF provisioning)",
                    "type": "object",
                    "required": ["plannedProperties", "creationConfigurationMethod"],
                    "properties": {
                        "creationConfigurationMethod": {
                            "type": "string",
                            "enum": ["NETCONF"]
                        },
                        "controlType": {
                            "type": "string",
                            "enum": ["PCC"]
                        },
                        "plannedProperties": {
                            "type": "object",
                            "required": ["policy"],
                            "properties": {
                                "policy": {
                                    "type": "object",
                                    "required": ["bandwidthSizing"],
                                    "properties": {
                                        "bandwidthSizing": {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {}
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                {
                    "description": "PCC-Controlled LSPs (or NETCONF-created) should not allow bwSizing parameters (NETCONF provisioning)",
                    "type": "object",
                    "required": ["plannedProperties", "controlType"],
                    "properties": {
                        "creationConfigurationMethod": {
                            "type": "string",
                            "enum": ["NETCONF"]
                        },
                        "controlType": {
                            "type": "string",
                            "enum": ["PCC"]
                        },
                        "plannedProperties": {
                            "type": "object",
                            "required": ["policy"],
                            "properties": {
                                "policy": {
                                    "type": "object",
                                    "required": ["bandwidthSizing"],
                                    "properties": {
                                        "bandwidthSizing": {
                                            "type": "object",
                                            "additionalProperties": false,
                                            "properties": {}
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

            ]
        },
        "createLsp": {
            "oneOf": [
                {
                    "$ref": "#/definitions/createLSPPrimarySR"
                },
                {
                    "$ref": "#/definitions/createLSPPrimaryRSVP"
                },
                {
                    "$ref": "#/definitions/createLSPSecondary"
                }
            ],
            "not": {
                "anyOf": [
                    {
                        "$ref": "#/definitions/PCEP-RSVP-NoRouteByDevice"
                    },
                    {
                        "$ref": "#/definitions/PCC-Controlled-NoBwSizing"
                    }

                ]
            }
        },
        "updateLSPPrimary": {
            "oneOf": [
                {
                    "$ref": "#/definitions/updateLSPPrimarySR"
                },
                {
                    "$ref": "#/definitions/updateLSPPrimaryRSVP"
                }
            ]
        },
        "updateLSPPrimaryRSVP": {
            "description": "define the set of attributes that can be provided on lsp update (PUT) message for RSVP LSPs (no binding SID allowed) ",
            "type": "object",
            "additionalProperties": false,
            "required": ["lspIndex", "pathType"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp",
                    "$ref": "common.json#/definitions/index"
                },
                "name": {
                    "description": "tunnel name--several TE-LSP may have the same name, they are part of the same tunnel. This cannot be changed once the path has been created",
                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel. This cannot be changed once the path has been created",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel. This cannot be changed once the path has been created",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "pathType": {
                    "description": "path role, which cannot be changed once the path is created",
                    "type": "string",
                    "enum": ["primary"],
                    "default": "primary"
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["RSVP"],
                    "default": "RSVP"
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesNoSwitchCommand"
                        },
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesSwitchCommandPrimary"
                        }
                    ]
                },
                "p2mpName": {
                    "description": "node configured P2MP name",
                    "type": "string"
                },
                "controller": {
                    "descriptions": "Current controller, .",
                    "type": "string",
                    "enum": ["NorthStar", "External"]
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                },
                "controlType": {
                    "descriptions": "Ignored, but allowed for type checks (see PCC-Controlled-NoBwSizing) ",
                    "type": "string",
                    "enum": ["Transport", "PCC", "Delegated", "PCEInitiated"]
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP.",
                    "type": "string",
                    "enum": ["PCEP", "NETCONF"],
                    "default": "PCEP"
                }
            }
        },
        "updateLSPPrimarySR": {
            "description": "define the set of attributes that can be provided on lsp update (PUT) message for RSVP LSPs (no binding SID allowed) ",
            "type": "object",
            "additionalProperties": false,
            "required": ["lspIndex", "pathType", "provisioningType"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp",
                    "$ref": "common.json#/definitions/index"
                },
                "name": {
                    "description": "tunnel name--several TE-LSP may have the same name, they are part of the same tunnel. This cannot be changed once the path has been created",
                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel. This cannot be changed once the path has been created",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "destination of the tunnel, should reference an interface or a node, same for all TE-LSP of a tunnel. This cannot be changed once the path has been created",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "toSignalingAddress": {
                    "description": "Destination of the tunnel, as seen by the PCC, for EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution  ",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "pathType": {
                    "description": "path role, which cannot be changed once the path is created",
                    "type": "string",
                    "enum": ["primary"],
                    "default": "primary"
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["SR"]
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesNoSwitchCommandSR"
                        },
                        {
                            "$ref": "#/definitions/lspPlannedPathPropertiesSwitchCommandPrimarySR"
                        }
                    ]
                },
                "p2mpName": {
                    "description": "node configured P2MP name",
                    "type": "string"
                },
                "controller": {
                    "descriptions": "Current controller, .",
                    "type": "string",
                    "enum": ["NorthStar", "External"]
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                },
                "controlType": {
                    "descriptions": "Ignored, but allowed for type checks (see PCC-Controlled-NoBwSizing) ",
                    "type": "string",
                    "enum": ["Transport", "PCC", "Delegated", "PCEInitiated"]
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP.",
                    "type": "string",
                    "enum": ["PCEP", "NETCONF"],
                    "default": "PCEP"
                }
            }
        },
        "updateLSPSecondary": {
            "description": "define the set of attributes that can be provided on lsp update (PUT) message.",
            "type": "object",
            "additionalProperties": false,
            "required": ["lspIndex", "pathType"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp",
                    "$ref": "common.json#/definitions/index"
                },
                "name": {
                    "description": "tunnel name, several TE-LSP may have the same name, they are part of the same tunnel. This cannot be changed once the path has been created",
                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel. This cannot be changed once the path has been created",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "tunnel destination, should reference an interface or a node, same for all TE-LSP of a tunnel. This cannot be changed once the path has been created",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "pathType": {
                    "description": "path role, which cannot be changed once the path has been created",
                    "type": "string",
                    "enum": ["secondary", "standby"]
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["RSVP", "SR"],
                    "default": "RSVP"
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, those attributes can be modified in an update",
                    "$ref": "#/definitions/lspPlannedPathPropertiesSecondary"
                },
                "controller": {
                    "descriptions": "Current controller, .",
                    "type": "string",
                    "enum": ["NorthStar", "External"]
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                },
                "controlType": {
                    "descriptions": "Ignored, but allowed for type checks (see PCC-Controlled-NoBwSizing) ",
                    "type": "string",
                    "enum": ["Transport", "PCC", "Delegated", "PCEInitiated"]
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP.",
                    "type": "string",
                    "enum": ["PCEP", "NETCONF"],
                    "default": "PCEP"
                }
            }
        },
        "updateLsp": {
            "oneOf": [
                {
                    "$ref": "#/definitions/updateLSPPrimary"
                },
                {
                    "$ref": "#/definitions/updateLSPSecondary"
                }
            ],
            "not": {
                "anyOf": [
                    {
                        "$ref": "#/definitions/PCEP-RSVP-NoRouteByDevice"
                    },
                    {
                        "$ref": "#/definitions/PCC-Controlled-NoBwSizing"
                    }
                ]
            }
        },

        "lsp": {
            "description": "define a te-lsp of a tunnel",
            "type": "object",
            "additionalProperties": false,
            "required": ["lspIndex"],
            "properties": {
                "lspIndex": {
                    "description": " Program ID for lsp",
                    "$ref": "common.json#/definitions/index"
                },
                "layer": {
                    "type": "string",
                    "enum": ["IP", "Transport"],
                    "default": "IP",
                    "description": "indicate if the LSP is a real LSP or the representation of a transport path"
                },
                "name": {
                    "description": "tunnel name, several TE-LSP may have the same name, they are part of the same tunnel",
                    "$ref": "common.json#/definitions/name64"
                },
                "from": {
                    "description": "tunnel source address, should reference an interface or a node, same for all TE-LSP of a tunnel",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "to": {
                    "description": "tunnel destination, should reference an interface or a node, same for all TE-LSP of a tunnel",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "toSignalingAddress": {
                    "description": "Read-Only. Destination of the tunnel, as seen by the PCC, for EPE TE engineering the real destination is in to (For instance ASBR in next AS), while the PCC should see the ASBR in the same AS for BGP route resolution. This is the result of the  plannedProperties/usePenultimateHopAsSignalingAddress.",
                    "oneOf": [
                        {
                            "$ref": "link.json#/definitions/ipv4Reference"
                        }
                    ]
                },
                "tunnelId": {
                    "description": "signaling protocol tunnel id, can be left empty, same for all TE-LSP of a tunnel",
                    "type": "integer"
                },
                "p2mpIndex": {
                    "description": "signaling protocol p2mp tunnel id, may be empty, same for all TE-LSP of a p2mp tree",
                    "type": "integer"
                },
                "p2mpName": {
                    "description": "node configured P2MP name",
                    "type": "string"
                },
                "operationalStatus": {
                    "oneOf": [
                        {
                            "$ref": "common.json#/definitions/operStatus"
                        },
                        {
                            "$ref": "#/definitions/lspExtendedOperStatus"
                        }
                    ]
                },
                "controlType": {
                    "descriptions": "indicates who controls the LSP, PCC controlled LSPs are completly under PCC control, Delegated LSPs are created by the PCC and controlled by the PCE, PCEInitiated are created and controlled by the PCE.",
                    "type": "string",
                    "enum": ["Transport", "PCC", "Delegated", "PCEInitiated"]
                },
                "initiator": {
                    "descriptions": "indicates which entity created the LSP, Only PCE created LSPs and under NorthStar control can be deleted from NorthStar.",
                    "type": "string"
                },
                "controller": {
                    "descriptions": "Current controller, .",
                    "type": "string",
                    "enum": ["NorthStar", "External"]
                },
                "pathType": {
                    "description": "path role",
                    "type": "string",
                    "enum": ["primary", "secondary", "standby"],
                    "default": "primary"
                },
                "provisioningType": {
                    "description": "Indicate the type of TE Path",
                    "type": "string",
                    "enum": ["RSVP", "SR"],
                    "default": "RSVP"
                },
                "creationConfigurationMethod": {
                    "description": "This is the SouthBound protocol/interface used by NorthStar to create the LSP.",
                    "type": "string",
                    "enum": ["PCEP", "NETCONF"],
                    "default": "PCEP"
                },

                "liveProperties": {
                    "description": "state of the path in the PCC, which is read-only",
                    "$ref": "#/definitions/lspLivePathProperties"
                },
                "plannedProperties": {
                    "description": "planned path state, this attribute is read-write, can be modified in an update",
                    "additionalProperties": false,
                    "$ref": "#/definitions/lspPlannedPathProperties"
                },
                "collectedProperties": {
                    "description": "Path State (config and operationalState) from device Collection. Read-only and ignored on PUT/POST",
                    "additionalProperties": false,
                    "$ref": "#/definitions/lspCollectedPathProperties"
                },
                "teContainer": {
                    "description": "Read-only, if the LSP is a sub-LSP part of TE-Container, this attribute is set an points to the TE-Container",
                    "anyOf": [
                        {
                            "$ref": "lsp-containers.json#/definitions/containerReferenceIndex"
                        },
                        {
                            "$ref": "common.json#/definitions/APILink"
                        }
                    ]
                },
                "epeProperties": {
                    "$ref": "epeProperties.json#/definitions/epeProperties"
                },
                "lastUpdate": {
                    "type": "string",
                    "description": "ISO 8101 timestamp",
                    "format": "datetime"
                }
            }
        },
        "tunnelProperties": {
            "type": "object",
            "properties": {
            }
        }
    }
}
