{       
    "id" : "node_v2.json",
    "title" : "API to access the nodes",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$ref" : "#/definitions/node",
    "links" : [
	{
	    "title" : "get all nodes",
	    "href" : "/",
	    "method" : "GET",
	    "rel" : "instances",
	    "schema" : {"$ref" : "#/definitions/nodeList"}
	},
	{
	    "title" : "get node based on filter",
	    "href" : "/search?name={nameFilter}&AS={ASNumber}&queryType=OR&q=jsonpath",
	    "method" : "GET",
	    "rel" : "search",
	    "schema" : {"$ref" : "#/definitions/nodeList"}
	},
	{
	    "title" : "get a node",
	    "href" : "/{nodeIndex}",
	    "method" : "GET",
	    "rel" : "self",
	    "schema" : {"$ref" : "#/definitions/node"}
	},
        {"title" : "get SSE notification stream", "href" : "/stream","method" : "GET"},
	{
	    "title" : "get a node event history",
	    "href" : "/{nodeIndex}/history?start={startTimeStamp}&end={endTimeStamp}",
	    "description" : "Provide the history of events for the Node, it can be optionally filtered by start (inclusive) and end (exclusive) timestamp",
	    "method" : "GET",
	    "rel" : "self",
	    "schema" : {"$ref" : "#/definitions/nodeHistoryEventList"}
	},
        {
	    "title" : "get the information retrieved from device collection or ML ",
	    "href" : "/{nodeIndex}/device",
	    "method" : "GET",
	    "rel" : "self",
	    "schema" : {"$ref" : "#/definitions/node"}
	},
        {
	    "title" : "get the information retrieved from bgp-ls collection ",
	    "href" : "/{nodeIndex}/bgp-ls",
	    "method" : "GET",
	    "rel" : "self",
	    "schema" : {"$ref" : "#/definitions/node"}
	},
        {
	    "title" : "get the information defined by the user (i.e set from REST interface)",
	    "href" : "/{nodeIndex}/user",
	    "method" : "GET",
	    "rel" : "self",
	    "schema" : {"$ref" : "#/definitions/node"}
	},
	{
	    "title" : "create a new node",
	    "description" : "Create a new node, schema on request is #/definitions/createNode",
	    "href" : "/",
	    "method" : "POST",
	    "rel" : "create",
	    "schema" : { "$ref" : "#/definitions/createNode"},
            "targetSchema" : {"$ref" : "#/definitions/node"}
	},
	{
	    "title" : "update a node",
	    "href" : "/{nodeIndex}",
	    "description" : "Update an existing node, schema on request is #/definitions/updateNode",
	    "method" : "PUT",
	    "rel" : "self",	    
	    "schema" : {"$ref" : "#/definitions/updateNode"},
            "targetSchema" : {"$ref" : "#/definitions/node"}
	},
        {
	    "title" : "PATCH a Node",
	    "href" : "/{nodeIndex}",
	    "description" : "Update an existing node, accepting a RFC6902 document producing a  #/definitions/updateNode ",
	    "method" : "PATCH",
	    "rel" : "self",
            "schema" : {"$ref" : "json-patch.json"},
	    "targetSchema" : {"$ref" : "#/definitions/node"}
	},
	{
	    "title" : "delete a node",
	    "href" : "/{nodeIndex}",	    
	    "method" : "DELETE"
	},
        {
	    "title" : "Create a set of nodes",
	    "description" : "Create a set of new Nodes, return code only indicate the acceptance of the request, response contains a list of node indexes",
	    "href" : "/bulk/",
	    "method" : "POST",
	    "rel" : "create",
            "schema" : {
		"$ref" : "#/definitions/createNodeList"
	    },
            "targetSchema" : {"$ref" : "#/definitions/nodeList"}

	},
	{
	    "title" : "update a set of Node",
	    "description" : "update a set of Nodes, return code only indicate the acceptance of the request",
	    "href" : "/bulk",
	    "method" : "PUT",
            "schema" : {"$ref" : "#/definitions/nodeListUpdate"},
            "targetSchema" : {"$ref" : "#/definitions/nodeList"}
	},
        {
	    "title" : "Patch  a set of Nodes",
	    "description" : "update a set of LSP, return code only indicate the acceptance of the request",
	    "href" : "/bulk",
	    "method" : "PATCH",
            "schema" : {"$ref" : "#/definitions/nodeListPatch"},
            "targetSchema" : {"$ref" : "#/definitions/nodeList"}
	},        
	{
	    "title" : "delete a set of Nodes",
	    "description" : "delete a set of Nodes, return code only indicate the acceptance of the request",
	    "href" : "/bulk",
	    "method" : "DELETE",
            "schema" : {"$ref" : "#/definitions/nodeListDelete"}
	}       

        
    ],
    "definitions" : {
	"nodeHistoryEventList" : {
	    "type" : "array",
	    "items" : { "$ref" : "#/definitions/nodeHistoryEvent"}	    
	},
	"nodeHistoryEvent" : {
	    "description" : "An entry in the node history, which consists of the information received from Topology acquisition",
            "type" :"object",
            "properties" : {
		"timestamp" : {
		    "description" :"Event Timestamp.",
		    "type" : "integer"
		}		
            },
	    "oneOf" : [
		{"$ref" :"#/definitions/node"}
            ]
	},        
        "prefixWithRole" :{
            "type" : "object",
            "description" : "Prefix with address, SR information if present and role indicating what is the relation with the node.",
            "properties" :{
                "role"    : {"type" : "string", "description" : "indicate the role of the address when its derived from a particular protocol, for instance routerID, teRouterID, ipv6address,..etc "}
            },
            "allOf" : [
                "common.json#/definitions/prefixWithSR"
            ]
        },
        "mgmtProtocols" : {            
            "description" : "Management Protocol information schema",
            "type" : "object",
            "properties" : {
                "address" : {
                    "description" : "management IP address",
                    "type" : "string",
                    "format" : "ipv4"
                },
                "operatingSystem" :  {
                    "type" : "string",
                    "maxLength" : 31,
                    "description" : "operating system information"
                },
                "vendor" :  {
                    "type" : "string",
                    "maxLength" : 31,
                    "description" : "Vendor",
                    "description" : "Device vendor. This is a free text with the following special values that influence NorthStar behavior: JUNIPER, CISCO (legacy cisco devices), Alcatel, HUAWEI, IOS-XR, SITE, CE. This parameter is inherited from device profile and also can be discovered by device collection. SITE and CE Nodes vendor type influence the LSP signaling: those nodes are pruned from the signaled path. Nodes with CE/SITE vendor are used for path computation but not signaling, allowing NorthStar to include routing constraints behond the PE node."
                },
                "operatingSystemVersion" :  {
                    "type" : "string",
                    "description" : "operating system Version"
                }
            }                  
        },
	"updateNode" : {
	    "description" : "properties set that can used to update a planned Node--other properties can be set, but they will be ignored.",
	    "type" : "object",
            "additionalProperties" : true,
	    "required" : ["topologyIndex","topoObjectType","nodeIndex"],
            "properties": {
		"topoObjectType" : {"type" : "string","enum" : ["node"]},
		"topologyIndex" : { "$ref" : "topology.json#/definitions/topologyIndex"},
                "nodeIndex": { 
                    "description": "Program ID for node",
		    "$ref" : "common.json#/definitions/index"
                },
                "id": {
                    "description": "node identifier, which is fixed on creation and cannot be updated--default for Nodes created from BGP-LS is the node router-id, for user-created nodes it is the name",
                    "$ref" : "common.json#/definitions/name255"},
                "name": {
                    "description": "node name, which can be modified",
                    "$ref" : "common.json#/definitions/name255"},
                "hostName": {
                    "description": "node hostname",
                    "type": "string",
                    "maxLength" : 255,
                    "minLength" : 1
                },
		"pseudoNode" : {
		    "description" : "indicates if the node is a pseudo node created by the underlying IGP protocol",
		    "type" : "boolean",
		    "default" : false
		},
                "nodeType": {
                    "description": "hardware node type (any user string)",
                    "type": "string"
                },
                "ipRole": {
                    "description": "Determines the function of a node in the topology. Access nodes cannot act as transit, while core nodes can be transit but cannot terminate LSPs from access nodes directly",
                    "type":        "string",
                    "enum":  ["Regular", "Access", "Core"]

                },
                "protocols": {
                    "description" : "protocols configuration and information on the node",
                    "type" : "object",
                    "properties" : {
			"management" : {"$ref" : "#/definitions/mgmtProtocols"},
                        "OSPF": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
                                "routerId"   : {"type" : "string","format" : "ipv4"},
                                "TERouterId" : {"type" : "string","format" : "ipv4"}
                            }
                        },
                        "ISIS": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
				"isoAddress" : {"type" :"string"},
                                "routerId": {"type" :"string","format" : "ipv6"},
                                "TERouterId": {"type" :"string","format" : "ipv6"},
                                "area": {"type" :"string"}
                            }
                        },
                        "PCEP": {
                            "type": "object",
                            "additionalProperties" : false,
                            "properties" : {                                
                                "extensions" : {
                                    "type" : "object",
                                    "description" : "forces NorthStar support of specific extensions",
                                    "properties" : {
                                        "lsp-association-protection"         : {"type" :"boolean", "description" : "Support for Primary/Secondary LSP using draft-ananthakrishnan-pce-stateful-path-protection-00. "}
                                    }
                                }
                            }
                        },
                        "SR" : {
                            "type" : "object",
                            "description" : "Represent the node Segment Routing (SR) parameters",
                            "properties" : {
                                "nodeCapabilities" : {"type":"integer","description" : "The Node capabilities, as defined in draft-ietf-isis-segment-routing-extensions-07#section-3, draft-ietf-ospf-ospfv3-segment-routing-extensions-05#section-3.3 "},
                                "capabilities"  : {"$ref" : "#/definition/nodeSRPathComputationOptions"},
                                "SRGBs"            : {
                                    "description" : "List of SRG Ranges",
                                    "type" : "array",
	                            "items" : {
                                        "type" : "object",
                                        "description" : "One range",
                                        "properties" : {
                                            "start":{"type":"integer"},
                                            "range":{"type":"integer"}
                                        }                                        
                                    }
                                },
                                "enabled" : {"type" :"boolean","description" : "Ignored on update, If true the node can be used to route SR Tunnels. This flag is set to true if the node has SRGB and a node index (Prefix with routerId role and SR properties)"}
                            }
                        }
                    }
                },
                "topology": {
                    "type": "object",
                    "additionalProperties" :false,
                    "properties" : {
                        "coordinates": { 
                            "description" : "A GeoJSON Point, allowing crs and bbox",
                            "type" : "object",
                            "required": [ "type" ],
                            "properties": {"type": { "enum": [ "Point" ] }},
			    "$ref" : "geojson.json#"
                       }
                    }
                },            
                "layer" : {
                    "description": "node layer",
                    "type" : "string"
                },
                "AutonomousSystem": {
		    "description": "correlated AS Number, may be present even if the node is not a BGP speaker",
		    "$ref" : "common.json#/definitions/ASNumber"
		},
                "site": {
                    "description" : "Site ID of the node",
                    "type"        : "string"
                }, 
                "design": {                
                    "description": "user-defined design properties",
                    "type" : "object",
                    "properties" : {
                        "simulation": {
                            "type":"object",
                            "properties" : {
                                "canFail": {"type" :"boolean" }
                            }
                        },
                        "delay" : {
                            "description" : "node delay in millisecond",
                            "type" : "integer"
                        }
                    }                                      
                },
                "comment"           : {"description" : "Comment" , "type" : "string"},
                "extraIpAddresses" : {
                    "type":"array",
                    "items":{"$ref" : "link.json#/definitions/ipv4TaggedAddress"}
                },
                "switchingCapabilities" : {"type":"array","items":{"$ref" : "link_v2.json#/definitions/interfaceSwCap"}},
                "prefixes" : {
                    "type" : "array",
	            "items" : {"$ref" : "#/definitions/prefixWithRole"}
                },
                "userProperties" : {"$ref" : "userProperties.json#/definitions/nodeUserProperties"},
		"epeProperties": {"$ref": "epeProperties.json#/definitions/epeProperties"}
            }             
	},        
        "createNodeList" : {
            "description" : "schema for bulk NODE creation, the number of entries that can be modified at a time is limited",
            "type" : "array",
            "minItems" : 1,
            "maxItems" : 1000,
	    "items" :{"$ref" : "#/definitions/createNode"}
        },
        "nodeListUpdate" : {
            "description" : "schema for bulk NODE modification, the number of entries that can be modified at a time is limited",
            "type" : "array",
            "minItems" : 1,
            "maxItems" : 1000,
	    "items" :{"$ref" : "#/definitions/updateNode"}
        },
        "nodeListDelete" : {
            "description" : "schema for bulk node delete, the number of entries that can be modified at a time is limited",
	    "type" : "array",
            "minItems" : 1,
            "maxItems" : 1000,
	    "items" : {"$ref" : "#/definitions/nodeReference"}
        },
        "nodeListPatch" : {
            "type" : "array",
            "minItems" : 1,
            "maxItems" : 1000,
	    "items" :{
                "type" : "object",
                "required" : ["nodeIndex","patch"],
                "properties" : {
                    "nodeIndex": {
                        "description": "Program ID for node",
                        "$ref" : "common.json#/definitions/index"                    
                    },
                    "patch" : {"$ref" : "json-patch.json"}
                }
            }
        },
        "nodeReference" : {
            "description" : "Minimal reference to a node. Only the nodeIndex is processed unless explicitely mentioned by the refering schema.",
            "type" :"object",
	    "additionalProperties" : true,
	    "required" : ["nodeIndex"],
            "properties" : {
		"nodeIndex": {
                    "description": "Program ID for node",
                    "$ref" : "common.json#/definitions/index"                    
                }
            }            
        },
        "nodeReferenceTyped" : {
            "description" : "Minimal reference to a node. Only the nodeIndex is processed unless explicitely mentioned by the refering schema.",
            "type" :"object",
	    "additionalProperties" : true,
	    "required" : ["topoObjectType", "nodeIndex"],
            "properties" : {
                "topoObjectType" : {"type" : "string","enum" : ["node"]},
		"nodeIndex": {
                    "description": "Program ID for node",
                    "$ref" : "common.json#/definitions/index"                    
                }
            }            
        },
	"createNode" : {
	    "description" : "properties set that can used for planned node creation",
	    "type" : "object",
            "additionalProperties" : false,
	    "required" : ["topologyIndex","topoObjectType","name"],
            "properties": {
		"topoObjectType" : {"type" : "string","enum" : ["node"]},
		"topologyIndex" : { "$ref" : "topology.json#/definitions/topologyIndex"},
                "name": {
                    "description": "node name, which can be modified",
                    "$ref" : "common.json#/definitions/name255"},
                "hostName": {
                    "description": "node hostname",
                    "type": "string",
                    "maxLength" : 255,
                    "minLength" : 1
                },
                "nodeType": {
                    "description": "node hardware type (any user string)",
                    "type": "string"
                },
                "ipRole": {
                    "description": "Determines the function of a node in the topology. Access nodes cannot act as transit, while core nodes can be transit but cannot terminate LSPs from access nodes directly",
                    "type":        "string",
                    "enum":  ["Regular", "Access", "Core"]

                },
                "protocols": {
                    "description" : "protocols configuration and information on the node",
                    "type" : "object",
                    "properties" : {
			"management" : {"$ref" : "#/definitions/mgmtProtocols"},
                        "OSPF": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
                                "routerId"   : {"type" : "string","format" : "ipv4"},
                                "TERouterId" : {"type" : "string","format" : "ipv4"}
                            }
                        },
                        "ISIS": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
				"isoAddress" : {"type" :"string"},
                                "routerId": {"type" :"string","format" : "ipv6"},
                                "TERouterId": {"type" :"string","format" : "ipv6"},
                                "area": {"type" :"string"}
                            }
                        },
                        "PCEP": {
                            "type": "object",
                            "additionalProperties" : false,
                            "properties" : {                                
                                "extensions" : {
                                    "type" : "object",
                                    "description" : "forces NorthStar support of specific extensions",
                                    "properties" : {
                                        "lsp-association-protection"         : {"type" :"boolean", "description" : "Support for Primary/Secondary LSP using draft-ananthakrishnan-pce-stateful-path-protection-00. "}
                                    }
                                }
                            }
                        },
                        "SR" : {
                            "type" : "object",
                            "description" : "Represent the node Segment Routing (SR) parameters",
                            "properties" : {
                                "nodeCapabilities" : {"type":"integer","description" : "The Node capabilities, as defined in draft-ietf-isis-segment-routing-extensions-07#section-3, draft-ietf-ospf-ospfv3-segment-routing-extensions-05#section-3.3 "},
                                "capabilities"  : {"$ref" : "#/definition/nodeSRPathComputationOptions"},
                                "SRGBs"            : {
                                    "description" : "List of SRG Ranges",
                                    "type" : "array",
	                            "items" : {
                                        "type" : "object",
                                        "description" : "One range",
                                        "properties" : {
                                            "start":{"type":"integer"},
                                            "range":{"type":"integer"}
                                        }                                        
                                    }
                                },
                                "enabled" : {"type" :"boolean","description" : "Ignored on create, If true the node can be used to route SR Tunnels. This flag is set to true if the node has SRGB and a node index (Prefix with routerId role and SR properties)"}
                            }
                        }                                                            
                    }
                },
		"pseudoNode" : {
		    "description" : "indicates if the node is a pseudo node created by the underlying IGP protocol",
		    "type" : "boolean",
		    "default" : false
		},
                "topology": {
                    "type": "object",
                    "additionalProperties" :false,
                    "properties" : {
                        "coordinates": { 
                            "description" : "A GeoJSON Point, allowing crs and bbox",
                            "type" : "object",
                            "required": [ "type" ],
                            "properties": {"type": { "enum": [ "Point" ] }},
			    "$ref" : "geojson.json#"
                       }
                    }
                },            
                "layer" : {
                    "description": "node layer",
                    "type" : "string"
                },
                "AutonomousSystem": {
		    "description": "correlated AS Number, may be present even if the node is not a BGP speaker",
		    "$ref" : "common.json#/definitions/ASNumber"
		},
                "site": {
                    "description" : "Site ID of the node",
                    "type"        : "string"
                }, 
                "design": {                
                    "description": "user defined design properties",
                    "type" : "object",
                    "properties" : {
                        "simulation": {
                            "type":"object",
                            "properties" : {
                                "canFail": {"type" :"boolean" }
                            }
                        },
                        "delay" : {
                            "description" : "node delay in millisecond",
                            "type" : "integer"
                        },
                        "userCost" : {"type" : "number","description" : "User metric"}
                    }
                },
                "comment"           : {"description" : "Comment" , "type" : "string"},
                "extraIpAddresses" : {
                    "type":"array",
                    "items":{"$ref" : "link.json#/definitions/ipv4TaggedAddress"}
                },
                "switchingCapabilities" : {"type":"array","items":{"$ref" : "link_v2.json#/definitions/interfaceSwCap"}},
                "prefixes" : {
                    "type" : "array",
	            "items" : {"$ref" : "#/definitions/prefixWithRole"}
                },
                "userProperties" : {"$ref" : "userProperties.json#/definitions/nodeUserProperties"},
		"epeProperties": {"$ref": "epeProperties.json#/definitions/epeProperties"}

            }	    
	},
        "node" : {
            "description" : "represents a single node",
	    "name" : "node",
            "type" : "object",
	    "required" : ["topologyIndex","topoObjectType","id"],
            "properties": {
		"topoObjectType" : {"type" : "string","enum" : ["node"]},
		"topologyIndex" : { "$ref" : "topology.json#/definitions/topologyIndex"},
                "id": {
                    "description": "nose identifier, which is fixed on creation and cannot be updated. For Nodes created from BGP-LS, this defaults to the node router-id, for user-created nodes this default from the name",
                    "$ref" : "common.json#/definitions/name255"},
                "name": {
                    "description": "node name, which can be modified",
                    "$ref" : "common.json#/definitions/name255"},
                "hostName": {
                    "description": "node hostname",
                    "type": "string",
                    "maxLength" : 255,
                    "minLength" : 1
                },
                "nodeIndex": { 
                    "description": "node program ID",
		    "$ref" : "common.json#/definitions/index"
                },                              
                "nodeType": {
                    "description": "node hardware type (any user string)",
                    "type": "string"
                },
		"pseudoNode" : {
		    "description" : "indicates if the node is a pseudo node created by the underlying IGP protocol",
		    "type" : "boolean",
		    "default" : false
		},
                "routerId"     : {"type" : "string","format" : "ipv4","description":"router ID derived from protocols or device collection, read only"},
                "routerIdIPv6" : {"type" : "string","format" : "ipv6","description":"IPv6 router ID derived from  device collection, read only"},
                "protocols": {
                    "description" : "protocols configuration and information on the node",
                    "type" : "object",
                    "properties" : {
			"management" : {"$ref" : "#/definitions/mgmtProtocols"},
                        "OSPF": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
                                "routerId"   : {"type" : "string","format" : "ipv4"},
                                "TERouterId" : {"type" : "string","format" : "ipv4"},
                                "overloadBit"   : {"type" :"boolean", "description" : "OSPF overload bit set (from device collection)"},
                                "referenceBw": {"type" :"number", "description" : "OSPF reference bandwidth (read-only,from device collection)"} 
                            }
                        },
                        "ISIS": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
				"isoAddress" : {"type" :"string"},
                                "routerId": {"type" :"string","format" : "ipv6"},
                                "TERouterId": {"type" :"string","format" : "ipv6"},
                                "area": {"type" :"string"},
                                "overloadBit"   : {"type" :"boolean", "description" : "ISIS overload bit set (from device collection)"}
                            }
                        },    
                        "BGP": {
                            "type" : "object",
                            "additionalProperties" : false,
                            "properties": {
                                "id": {"type" :"string"},
                                "AutonomousSystem": {
				    "description" : "default AS",
				    "$ref" : "common.json#/definitions/ASNumber"
				}
                            }
                        },
                        "PCEP": {
                            "type": "object",
                            "additionalProperties" : false,
                            "properties" : {
                                "operationalStatus" : {
                                    "description" : "PCEP protocol operational status, Either Up or Down",
		                    "$ref" : "common.json#/definitions/operStatus"
                                },
                                "peerStatefullCapabilities" : {
                                    "type" : "object",
                                    "description" : "represents the remote peer advertised capabilites",
                                    "properties" : {
                                        "lspUpdate"         : {"type" :"boolean", "description" : "Stateful PCE LSP Update "},
                                        "lspInstantiation"  : {"type" :"boolean", "description" : "Stateful PCE LSP Create"},
                                        "p2mp"              : {"type" :"boolean", "description" : "Stateful PCE P2MP LSP reporting"},
                                        "p2mpUpdate"        : {"type" :"boolean", "description" : "Stateful PCE P2MP LSP Update"},
                                        "p2mpInstantiation" : {"type" :"boolean", "description" : "Stateful PCE P2MP LSP Create"},
                                        "SRCapability"      : {"type" :"boolean", "description" : "Segment Routing capability"}
                                    }
                                },
                                "sessionParameters" : {
                                    "type" : "object",
                                    "description" : "remote peer pcep session parameters",
                                    "properties" : {
                                        "keepalive"  : {"type" :"integer", "description" : "PCEP session keepalive time, in seconds"},
                                        "deadtimer"  : {"type" :"integer", "description" : "PCEP session DeadTimer time, in seconds"},
                                        "maximumStackDepth" : {"type":"integer","description":"The SR maximum Stack Depth (MSD) reported by the PCC"}
                                    }
                                },
                                "extensions" : {
                                    "type" : "object",
                                    "description" : "forces NorthStar support of specific extensions",
                                    "properties" : {
                                        "lsp-association-protection"         : {"type" :"boolean", "description" : "Support for Primary/Secondary LSP using draft-ananthakrishnan-pce-stateful-path-protection-00. "}
                                    }
                                },
                                "pccAddress": {
                                    "description": " Ipv4 address of pcc in xx.xx.xx.xx",
                                    "type": "string",
                                    "format" : "ipv4"
                                }
                            }
                        },
                        "SR" : {
                            "type" : "object",
                            "description" : "Represent the node Segment Routing (SR) parameters",
                            "properties" : {
                                "nodeCapabilities" : {"type":"integer","description" : "The Node capabilities, as defined in draft-ietf-isis-segment-routing-extensions-07#section-3, draft-ietf-ospf-ospfv3-segment-routing-extensions-05#section-3.3 "},
                                "capabilities"  : {"$ref" : "#/definition/nodeSRPathComputationOptions"},
                                "SRGBs"            : {
                                    "description" : "List of SRG Ranges",
                                    "type" : "array",
	                            "items" : {
                                        "type" : "object",
                                        "description" : "One range",
                                        "properties" : {
                                            "start":{"type":"integer"},
                                            "range":{"type":"integer"}
                                        }                                        
                                    }
                                },
                                "enabled" : {"type" :"boolean","description" : "If true the node can be used to route SR Tunnels. This flag is set to true if the node has SRGB and a node index (Prefix with routerId role and SR properties)"}
                            }
                        },
                        "NETCONF" : {
                            "type" : "object",
                            "description" : "Netconf provisioning protocol status",
                            "properties": {
                                "operationalStatus": {
                                    "description" : "NETCONF protocol operational status, Either Up or Down",
		                    "$ref" : "common.json#/definitions/operStatus"
                                },                               
                                "operationalState": {"type":"string","enum":["Connected","Disconnected","Session_close","Connecting","Invalid_credentials","Deleted"]},
                                "sessionParameters" : {
                                    "type" : "object",
                                    "description" : "remote peer NETCONF session parameters",
                                    "properties" : {
                                        "keepalive"  : {"type" :"integer", "description" : "session keepalive time, in seconds"}
                                    }
                                },                            
                                "clientAddress": {
                                    "description": " Ipv4 address of peer in xx.xx.xx.xx format",
                                    "type": "string",
                                    "format" : "ipv4"
                                },
                                "clientCapabilities": {
                                    "type" : "array",
	                            "items" : {
                                        "type" : "string",
                                        "description" : "NETCONF discovered capabilitu, for instance urn:ietf:params:netconf:base:1.0"
                                    }
                                }
                            }                                                        
                        }
                    }
                },
                "prefixes" : {
                    "type" : "array",
	            "items" : {
                        "type" : "object",
                        "properties" :{
	                    "role"    : {"type" : "string", "description" : "indicate the role of the address when its derived from a particular protocol, for instance routerID, teRouterID, ipv6address,..etc "},
                            "SR"      : {
                                "type" : "object",
                                "properties" : {
                                    "index" : {"type":"number", "description" : "Index of the prefix in the global SR tables"},
                                    "algo"  : {"type":"number", "description" : "Spring Algorithm (0 for ECMP-aware CSPF, 1 for strict ECMP aware CSPF)"},
                                    "flags" : {"type":"number", "description" : "Flags associated to this prefix, see draft-ietf-isis-segment-routing-extensions-07#section-2.1, Flags not defined for OSPF are 0"}                                                
                                }                                
                            }   
	                },
	                "oneOf" : [
                            {"$ref" : "common.json#/definitions/ipv4Prefix"},
                            {"$ref" : "common.json#/definitions/ipv6Prefix"}                            
                        ]
                    }
                },
                "topology": {
                    "type": "object",
                    "additionalProperties" :false,
                    "properties" : {
                        "coordinates": { 
                            "description" : "GeoJSON Point, allowing crs and bbox",
                            "type" : "object",
                            "required": [ "type" ],
                            "properties": {"type": { "enum": [ "Point" ] }},
			    "$ref" : "geojson.json#"
                       }                      
                    }
                },            
                "layer" : {
                    "description": "node layer",
                    "type" : "string"
                },
                "AutonomousSystem": {
		    "description": "correlated AS Number, may be present even if the node is not a BGP speaker",
		    "$ref" : "common.json#/definitions/ASNumber"
		},
                "site": {
                    "description" : "node site ID",
                    "type"        : "string"
                }, 
                "design": {                
                    "description": "user-defined design properties",
                    "type" : "object",
                    "properties" : {
                        "simulation": {
                            "type":"object",
                            "properties" : {
                                "canFail": {"type" :"boolean" }
                            }
                        },
                        "delay" : {
                            "description" : "node delay in milliseconds",
                            "type" : "integer"
                        },
                        "trafficRerouteThreshold" : {"type" : "integer","description" : "the percentage of utilization that trigger a reroute based on analytics","minimum":0,"maximum":100},
                        "userCost":	{"type" : "number","description" : "User metric"}
                      
                    }                                      
                },
                "comment"           : {"description" : "Comment" , "type" : "string"},
                "extraIpAddresses" : {
                    "type":"array",
                    "items":{"$ref" : "link_v2.json#/definitions/ipv4TaggedAddress"}
                },
                "switchingCapabilities" : {"type":"array","items":{"$ref" : "link_v2.json#/definitions/interfaceSwCap"}},
                "logicalSystemParent" : {"description" : "For logical system discovered using CLI/Netconf data, this is set for logical system and contains the hostname of the logical system parent (i.e real router). This property is read-only" , "type" : "string"},
                "live" : {
                          "description" : "indicate if the node has properties coming from topology acquisition",
		          "type" : "boolean"
                },
                "configurationDataSource" : {
                    "type" : "object",
                    "description" : "For node whith configuration collection configured, this attributes provide the configuration data source",
                    "properties" : {
                        "latest" : {"$ref" : "common.json#/definitions/APILink","description" : "link to the URL to retrieve the configuration data"}
                    }
                },
                "userProperties" : {"$ref" : "userProperties.json#/definitions/nodeUserProperties"},
		"epeProperties": {"$ref": "epeProperties.json#/definitions/epeProperties"}
            }
        },
	"nodeList" : {
	    "type" : "array",
	    "items" : {"$ref" : "#/definitions/node"}	    
	},
        "nodeSRPathComputationOptions" : {
            "type" : "object",
            "description" : "Options for path computation for SR",
            "additionalProperties" :false,
            "properties" : {
                "unrestrictedFirstHop" : {"default" : false, "description" : "if not present or set to false, NorthStar will always include an adjacency SID as first hop. If set to true this won't be enforced", "type" : "boolean"}
            }
        },
        "namedNodeReference" : {
            "description" : "Hostname reference to a node",
            "type" :"object",
            "additionalProperties" : true,
            "properties" : {
                "hostName": {
                    "description": "Program ID of the node",
                    "type": "string", "format": "hostname"
                }
            }
        }
    }  
}
