- 24 Jan 2024
- 12 Minutes to read
- Contributors
- Print
- PDF
Accedian YANG Notifications Examples and Common Error Codes
- Updated on 24 Jan 2024
- 12 Minutes to read
- Contributors
- Print
- PDF
This topic provides examples of Accedian YANG notifications and common error codes. For further information, questions, or clarifications regarding this release, contact the Accedian Technical Assistance Center (TAC) at skylight_tac@cisco.com.
Notification: Service Level (YANG)
Example of Service Notification Received
{
"ietf-restconf:notification": {
"Accedian-service:state-change-event": [{
"service-id": "Service_A",
"session-state-change": [{
"session-id": "Site_B",
"status": "Stopped",
"service-endpoint-state-change": [
{
"endpoint-id": "Endpoint_Site_A",
"status": "Ready"
},
{
"endpoint-id": "Endpoint_Site_B",
"status": "NotReady"
}
]
}]
}],
"event-time": "2023-06-08T06:20:58.688937028Z"
}
}
{
"ietf-restconf:notification": {
"Accedian-service:state-change-event": [{
"service-id": "Service_A",
"session-state-change": [{
"session-id": "Site_B",
"status": "Error",
"errors": {
"error": [{
"error-tag": "operation-failed",
"error-message": "An error XXXXX occurred"
}]
},
"service-endpoint-state-change": [{
"endpoint-id": "Endpoint_Site_B",
"status": "Ready"
}]
}]
}],
"event-time": "2023-06-08T06:20:58.688937028Z"
}
}
{
"ietf-restconf:notification": {
"Accedian-service:state-change-event": [{
"service-id": "Service_A",
"session-state-change": [{
"session-id": "Site_B",
"status": "Error",
"errors": {
"error": [{
"error-tag": "operation-failed",
"error-message": "An error XXXXX occurred"
}]
},
"service-endpoint-state-change": [{
"endpoint-id": "Endpoint_Site_B",
"status": "NotReady"
}]
},
{
"session-id": "Site_C",
"status": "Error",
"errors": {
"error": [{
"error-tag": "operation-failed",
"error-message": "An error XXXXX occurred"
}]
},
"service-endpoint-state-change": [{
"endpoint-id": "Endpoint_Site_B",
"status": "NotReady"
}]
}
]
}],
"event-time": "2023-06-08T06:20:58.688937028Z"
}
}
Notification: Endpoint Level (YANG):
Expected value from typedef service-endpoint-status
Example of Receive Endpoint Notification
{
"ietf-restconf:notification": {
"Accedian-service-endpoint:state-change-event": [
{
"endpoint-id": "e0a68d009_b944_4e2b_927e_07259b243277",
"status": "NotReady"
}]
},
"event-time": "2023-06-08T06:20:58.688937028Z"
}
{
"ietf-restconf:notification": {
"Accedian-service-endpoint:state-change-event" : [
{
"endpoint-id": "Site_B",
"status" : "Error",
"errors": {
"error": [
{
"error-tag": "operation-failed",
"error-message": "Endpoint error XXXXX occurred"
}]
}
}],
"event-time": "2023-06-08T06:20:58.688937028Z"
}
}
Notification: Session Level (YANG):
Expected value from typedef service-session-status
Running, Stopped, Error
Example of Received Session Notification
{
"ietf-restconf:notification": {
"Accedian-session:state-change-event": {
"session-id": "Site_B",
"status": "Running"
}
},
"event-time": "2023-06-09T18:07:10.27046675Z"
}
{
"ietf-restconf:notification": {
"Accedian-session:state-change-event" : {
"session-id": "Site_B"
"status" : "Error"
"errors": {
"error": [
{
"error-tag": "operation-failed",
"error-message": "Session Error XXXXX occurred"
}
}
},
"event-time": "2023-06-09T18:07:10.27046675Z"
}
How to Register a Notification
RestConf references the server-side event from Server-Sent Events.
There are two steps required in order to register a server-side event (HTTP LonPolling) .
Reference : W3C.REC-eventsource-20150203
Pre-requisite
First, you must list all stream registrations available from the system by using the following command:
GET - <URL>/restconf/data/ietf-restconf-monitoring:restconf-state/streams
"ietf-restconf-monitoring:streams": {
"stream": [
{
"name": "notification-stream/Accedian-service-endpoint:state-change-event",
"description": "This notification is sent when the state of the endpoint changes",
"access": [
{
"encoding": "XML",
"location": "http://nso-gw:8080/restconf/notification-stream/Accedian-service-endpoint:state-change-event"
},
{
"encoding": "JSON",
"location": "http://nso-gw:8080/restconf/notification-stream/Accedian-service-endpoint:state-change-event/JSON"
}
],
"replay-support": true
},
{
"name": "notification-stream/Accedian-session:state-change-event",
"replay-log-creation-time": "2023-06-06T16:25:33.116263934Z",
"description": "This notification is sent when the state of the session changes",
"access": [
{
"encoding": "XML",
"location": "http://nso-gw:8080/restconf/notification-stream/Accedian-session:state-change-event"
},
{
"encoding": "JSON",
"location": "http://nso-gw:8080/restconf/notification-stream/Accedian-session:state-change-event/JSON"
}
],
"replay-support": true
},
{
"name": "notification-stream/Accedian-service:state-change-event",
"description": "A top level notification providing state change information on the service and it's\associated service sessions and service endpoints",
"access": [
{
"encoding": "XML",
"location": "http://nso-gw:8080/restconf/notification-stream/Accedian-service:state-change-event"
},
{
"encoding": "JSON",
"location": "http://nso-gw:8080/restconf/notification-stream/Accedian-service:state-change-event/JSON"
}
],
"replay-support": true
}
]
}
}
Three types of registration paths (Session, Endpoint and Service):
The following provides GET instructions for each type of registration path.
Session:
GET - <URL>/restconf/data/ietf-restconf-monitoring:restconf-state/streams/stream=notification-stream/Accedian-session:state-change-event/access=json/location
Endpoint:
GET - <URL>/restconf/data/ietf-restconf-monitoring:restconf-state/streams/stream=notification-stream/Accedian-service-endpoint:state-change-event/access=json/location
Service:
GET - <URL>/restconf/data/ietf-restconf-monitoring:restconf-state/streams/stream=notification-stream/Accedian-service:state-change-event/access=json/location
Once you have completed the registration, you will need to use one of the following GET transactions:
GET - <URL>/restconf/notification-stream/Accedian-session:state-change-event/JSON
GET - <URL>/restconf/notification-stream/Accedian-service-endpoint:state-change-event/JSON
GET - <URL>/restconf/notification-stream/Accedian-service:state-change-event/JSON
Important note: The HTTP GET needs to support HTTP/1.1 with keep-alive connection socket.
Filter example over group-id :
GET - <URL>/restconf/notification-stream/Accedian-session:state-change-event/JSON?filter=//group-id='group_1' or //group-id='group_2'
YANG Error label explanation
In YANG standards, there are always definitions for error messages and labels to use. Refer to RFC-8040.
The gateway uses an open source framework called OpenDayLight. Below is a list of errors supported by Gateway version 23.07 (Maestro-B).
Errors | Defined value | Definition | Example |
---|---|---|---|
error-type | protocol | operations layer | malformed json |
error-type | application | content or execution layer | After a valid json is parsed the application execution fails to send a command southbound. |
error-message | Human readable string to help understand the error | See error table below. | |
error-tag | see https://www.ietf.org/rfc/rfc8040.txt | definition can be seen in RFC-6241 Appendix A of NetConf) | |
error-path | n-a | URI of the sent YANG message | See error table below |
Note: There are other errors existing in the yang standard but not yet used in the gateway application.
Error List for Common YANG Transactions
POST Endpoint definition in endpoint-id or endpoint-name
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep14_localvlan#$']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'params': [ { 'nodeName': 'endpoint-id', 'nodeValue': 'ep14_localvlan#$' } ] , 'errorType': 'YANG_VALIDATION_ERROR', 'description': '{regex=[{[a-zA-Z0-9][a-zA-Z0-9._-]*}]}' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : invalid character in an ID or NAME (we should respect length "1..128" and pattern '[a-zA-Z0-9][a-zA-Z0-9_\-]*')
Omitted value in POST Endpoint definition
Error Message
{
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "malformed-message",
"error-info": "com.google.gson.stream.MalformedJsonException: Unexpected value at line 11 column 23 path $.Accedian-service-endpoint:service-endpoint[0].config.ne-config.vlan-id",
"error-message": "Error parsing input: com.google.gson.stream.MalformedJsonException: Unexpected value at line 11 column 23 path $.Accedian-service-endpoint:service-endpoint[0].config.ne-config.vlan-id"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : malformed message sent during the configuration (see gateway logs)
Note: This message should not happen if system sends object correctly.
POST Endpoint with ne-config not corresponding to any endpoint in Orchestrate
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep15_local']",
"error-type": "application",
"error-tag": "data-exists",
"error-message": "{ 'params': [ { 'nodeName': 'endpoint-name', 'nodeValue': 'ep15_local-NAME' } ] , 'errorType': 'DATA_CONFLICT_ERROR', 'description': 'Data Node already exist!' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : Endpoint configuration failed, please make sure Endpoint-XXX is operational and configured with the correct ne-id and vlan-id.
POST an endpoint that already exists
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep14_localvlanv']",
"error-type": "application",
"error-tag": "data-exists",
"error-message": "{ 'params': [ { 'nodeName': 'endpoint-name', 'nodeValue': 'ep14_localvlan-NAME' } ] , 'errorType': 'DATA_CONFLICT_ERROR', 'description': 'Data Node already exist!' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : Data Node endpoint-name with value Endpoint_test already exist
POST an endpoint, using an ID that already exists
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep14_localvlan']",
"error-type": "application",
"error-tag": "data-exists",
"error-message": "{ 'errorType': 'DATA_CONFLICT_ERROR', 'description': 'Endpoint ep14_localvlan already exist!' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : Endpoint is already present with same id
POST session with unsupported character in session-id or session-name
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep14_localvlan#$']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'params': [ { 'nodeName': 'endpoint-id', 'nodeValue': 'ep14_localvlan#$' } ] , 'errorType': 'YANG_VALIDATION_ERROR', 'description': '{regex=[{[a-zA-Z0-9][a-zA-Z0-9._-]*}]}' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : invalid character in an ID or NAME (we should respect length "1..128" and pattern '[a-zA-Z0-9][a-zA-Z0-9_\-]*')
POST session with a non-existent endpoint-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='testSession']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'params': [ { 'nodeName': 'endpoint-id', 'nodeValue': 'test-reflector' } ] , 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Data Node does not exist!' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : Data Node endpoint-id with value(s) Actuate_VM3_21 does not exist
POST a session with a session name that already exists
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='local_IPv4_nonIP1111']",
"error-type": "application",
"error-tag": "data-exists",
"error-message": "{ 'params': [ { 'nodeName': 'session-name', 'nodeValue': 'local_IPv4_nonIP1111_name' } ] , 'errorType': 'DATA_CONFLICT_ERROR', 'description': 'Data Node already exist!' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : Data Node session-name with value Session-VM4_to_VM3 already exist
POST a session with only one endpoint in a TWAMP session
TWAMP session requires one endpoint as sender and another endpoint as reflector.
Error Message
When only have session-sender:
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='test']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'errorType': 'INVALID_INPUT_ERROR', 'description': 'reflector endpoint not found for sessionId test ' }"
}
]
}
}
When only have session-reflector:
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='test']",
"error-type": "application",
"error-tag": "bad-attribute",
"error-message": "{ 'errorType': 'INVALID_INPUT_ERROR', 'description': 'sender endpoint is not specified' }"
}
]
}
}
HTTP Status
500
UX Message Suggestion
Skylight Gateway : The sender or reflector endpoint is not specified
POST a session with two endpoints as session-sender (no endpoint selected as session-reflector)
TWAMP session requires one endpoint as sender and another endpoint as reflector.
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='test']",
"error-type": "application",
"error-tag": "bad-attribute",
"error-message": "{ 'errorType': 'INVALID_INPUT_ERROR', 'description': 'reflector-ip is not specified' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : The sender or reflector endpoint is not specified
POST start/stop a non-existent session-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions",
"error-type": "application",
"error-tag": "bad-attribute",
"error-message": "{ 'errorType': 'INVALID_INPUT_ERROR', 'description': 'session localvlan_IPv4_non1IP not found' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : Cannot send the command to a non-existent session
GET all session, endpoint or service that doesn't have any data
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'session not found' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : The yang datastore is empty for the current object <error-path>
GET a service-id that doesn't exist
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='7b70c7b0-8301-49d4-8d4b-9edb55912301']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Service not found' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : Service serviceid_test not found
GET a session-id that doesn't exist
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='test-session']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'session test-session not found' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : Session Session_ID_test not found
GET an endpoint-id that doesn't exist
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='testEndpoint']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Endpoint testEndpoint not found!' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : Endpoint EndpointID_test not found
POST Service with unsupported character in service-id or service-name
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='service_sesiontest@@5']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'params': [ { 'nodeName': 'service-id', 'nodeValue': 'service_sesiontest@@5' } ] , 'errorType': 'YANG_VALIDATION_ERROR', 'description': '{regex=[{[a-zA-Z0-9][a-zA-Z0-9._-]*}]}' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : invalid character in an ID or NAME (we should respect length "1..128" and pattern '[a-zA-Z0-9][a-zA-Z0-9_\-]*')
POST Service with a non-existent session-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='service_sesiontest']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'params': [ { 'nodeName': 'session-id', 'nodeValue': 'localvlan_IPv4_nonIP' } ] , 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Data Node does not exist!' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : Data Node session-id with value(s) session-test does not exist
DELETE an endpoint with a non-existent endpoint-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep15_localvlan_Ipv6lobal324252513']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Endpoint not found!' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : delete failed <error-path> does not exist
DELETE an endpoint attached to a session
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service-endpoint:service-endpoints/service-endpoint[endpoint-id='ep14_local']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'errorType': 'INVALID_INPUT_ERROR', 'description': 'Endpoint is attached to session local_IPv4_nonIP1' }"
}
]
}
}
HTTP Status
400
DELETE a session with a non-existent session-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='sessiontest']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Session sessiontest not found' }"
}
]
}
}
HTTP Status
409
UX Message Suggestion
Skylight Gateway : delete failed <error-path> does not exist
DELETE a session which is assigned with service
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='local_IPv4_nonIP1']",
"error-type": "protocol",
"error-tag": "operation-failed",
"error-message": "{ 'errorType': 'SGW_INTERNAL_ERROR', 'description': 'unable to delete session, attached to service id service_sesiontest' }"
}
]
}
}
HTTP Status
500
DELETE a service with a non-existent service-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='7b70c7b0-8301-49d4-8d4b-9edb55912346']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'service 7b70c7b0-8301-49d4-8d4b-9edb55912346 not found' }"
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : delete failed <error-path> does not exist
POST of an invalid value (YANG constraint)
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='local_IPv4_nonIP11111']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'params': [ { 'nodeName': 'vlan-priority', 'nodeValue': '70' } ] , 'errorType': 'YANG_VALIDATION_ERROR', 'description': '{range={min=0, max=7}}' }"
}
]
}
}
Or
{
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "malformed-message",
"error-info": "Invalid range: 10000, expected: [[0..255]].",
"error-message": "Error parsing input: Invalid range: 10000, expected: [[0..255]]."
}
]
}
}
HTTP Status
400
UX Message Suggestion
Skylight Gateway : Yang constraint reach - Error parsing input: Invalid range: 114000, expected: [[0..65535]]
BULK Session Post
Failure Example: 10 Sessions post, with two failed. The return is HTTP code 500 (partial-operation)
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='local_IPv4_nonIP11111']",
"error-type": "application",
"error-tag": "partial-operation",
"error-message": "{ 'params': [ { 'nodeName': 'endpoint-id', 'nodeValue': 'ep14_locallll' } ] , 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'Data Node does not exist!' }"
},
{
"error-path": "/Accedian-session:sessions/session[session-id='local_IPv4_nonIP1111']",
"error-type": "application",
"error-tag": "partial-operation",
"error-message": "{ 'params': [ { 'nodeName': 'session-name', 'nodeValue': 'local_IPv4_nonIP1111_name' } ] , 'errorType': 'DATA_CONFLICT_ERROR', 'description': 'Data Node already exist!' }"
}
]
}
}
HTTP Status
500
POST assigned session to non- existent service-id
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='testService']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'service not found' }"
}
]
}
}
HTTP Status
409
DELETED assigned session-id from a service which is service or session not existing
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='Testseervicewithoutdot1']/sessions[session-id='sessionwith.dot']",
"error-type": "application",
"error-tag": "data-missing",
"error-message": "{ 'errorType': 'DATA_NOT_FOUND_ERROR', 'description': 'service not found' }"
}
]
}
}
HTTP Status
409
POST a session with not supported parameter
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-session:sessions/session[session-id='test-session']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'params': [ { 'nodeName': 'number-of-packets', 'nodeValue': '200' } ] , 'errorType': 'YANG_VALIDATION_ERROR', 'description': 'number-of-packets is not supported, please remove it from the request' }"
}
]
}
HTTP Status
400
POST an endpoint/ session/ service with name or id over supported length
Error Message
{
"errors": {
"error": [
{
"error-path": "/Accedian-service:services/service[service-id='service_sesiontest<unsupported_length>']",
"error-type": "application",
"error-tag": "invalid-value",
"error-message": "{ 'params': [ { 'nodeName': 'service-id', 'nodeValue': 'service_sesiontest<unsupported_length>' } ] , 'errorType': 'YANG_VALIDATION_ERROR', 'description': '{regex=[], length={[[1..128]]}}' }"
}
]
}
}
HTTP Status
400
© 2024 Cisco and/or its affiliates. All rights reserved.
For more information about trademarks, please visit: Cisco trademarks
For more information about legal terms, please visit: Cisco legal terms
For legal information about Accedian Skylight products, please visit: Accedian legal terms and tradmarks