Passa al contenuto principale

Appendix C. Example of a YANG Instance (Appendice C. Esempio di Istanza YANG)

Appendix C. Example of a YANG Instance (Appendice C. Esempio di Istanza YANG)

This section contains an example of a YANG instance that conforms to the YANG modules. The validity of this data instance has been checked using yangson <https://yangson.labs.nic.cz/>. Yangson requires a YANG library [RFC8525] to define the complete model against which the data instance must be validated. In Appendix D, we provide the JSON library file named "ietf-service-assurance-library.json", which we used for validation.

Questa sezione contiene un esempio di istanza YANG conforme ai moduli YANG. La validità di questa istanza di dati è stata verificata utilizzando yangson <https://yangson.labs.nic.cz/>. Yangson richiede una libreria YANG [RFC8525] per definire il modello completo rispetto al quale l'istanza di dati deve essere convalidata. Nell'Appendice D, forniamo il file della libreria JSON denominato "ietf-service-assurance-library.json", che abbiamo utilizzato per la convalida.

Below, we provide the contents of the file "example_configuration_instance.json", which contains the configuration data that models Figure 2 from Section 3.1 of [RFC9417]. The instance can be validated with yangson by using the invocation "yangson -v example_configuration_instance.json ietf-service-assurance-library.json", assuming all the files (YANG and JSON) defined in this document reside in the current folder.

Di seguito, forniamo il contenuto del file "example_configuration_instance.json", che contiene i dati di configurazione che modellano la Figura 2 dalla Sezione 3.1 di [RFC9417]. L'istanza può essere convalidata con yangson utilizzando l'invocazione "yangson -v example_configuration_instance.json ietf-service-assurance-library.json", assumendo che tutti i file (YANG e JSON) definiti in questo documento risiedano nella cartella corrente.

{
"ietf-service-assurance:subservices": {
"subservice": [
{
"type": "service-instance-type",
"id": "simple-tunnel/example",
"service-instance-parameter": {
"service": "simple-tunnel",
"instance-name": "example"
},
"dependencies": {
"dependency": [
{
"type":
"ietf-service-assurance-interface:interface-type",
"id": "interface/peer1/tunnel0",
"dependency-type": "impacting"
},
{
"type":
"ietf-service-assurance-interface:interface-type",
"id": "interface/peer2/tunnel9",
"dependency-type": "impacting"
},
{
"type":
"example-service-assurance-ip-connectivity:ip-connectivity-type",
"id":
"connectivity/peer1/2001:db8::1/peer2/2001:db8::2",
"dependency-type": "impacting"
}
]
}
},
{
"type":
"example-service-assurance-ip-connectivity:ip-connectivity-type",
"id": "connectivity/peer1/2001:db8::1/peer2/2001:db8::2",
"example-service-assurance-ip-connectivity:parameters": {
"device1": "Peer1",
"address1": "2001:db8::1",
"device2": "Peer2",
"address2": "2001:db8::2"
},
"dependencies": {
"dependency": [
{
"type":
"ietf-service-assurance-interface:interface-type",
"id": "interface/peer1/physical0",
"dependency-type": "impacting"
},
{
"type":
"ietf-service-assurance-interface:interface-type",
"id": "interface/peer2/physical5",
"dependency-type": "impacting"
},
{
"type": "example-service-assurance-is-is:is-is-type",
"id": "is-is/instance1",
"dependency-type": "impacting"
}
]
}
},
{
"type": "example-service-assurance-is-is:is-is-type",
"id": "is-is/instance1",
"example-service-assurance-is-is:parameters": {
"instance-name": "instance1"
}
},
{
"type": "ietf-service-assurance-interface:interface-type",
"id": "interface/peer1/tunnel0",
"ietf-service-assurance-interface:parameters": {
"device": "Peer1",
"interface": "tunnel0"
},
"dependencies": {
"dependency": [
{
"type":
"ietf-service-assurance-interface:interface-type",
"id": "interface/peer1/physical0",
"dependency-type": "impacting"
}
]
}
},
{
"type": "ietf-service-assurance-interface:interface-type",
"id": "interface/peer1/physical0",
"ietf-service-assurance-interface:parameters": {
"device": "Peer1",
"interface": "physical0"
},
"dependencies": {
"dependency": [
{
"type": "ietf-service-assurance-device:device-type",
"id": "interface/peer1",
"dependency-type": "impacting"
}
]
}
},
{
"type": "ietf-service-assurance-device:device-type",
"id": "interface/peer1",
"ietf-service-assurance-device:parameters": {
"device": "Peer1"
}
},
{
"type": "ietf-service-assurance-interface:interface-type",
"id": "interface/peer2/tunnel9",
"ietf-service-assurance-interface:parameters": {
"device": "Peer2",
"interface": "tunnel9"
},
"dependencies": {
"dependency": [
{
"type":
"ietf-service-assurance-interface:interface-type",
"id": "interface/peer2/physical5",
"dependency-type": "impacting"
}
]
}
},
{
"type": "ietf-service-assurance-interface:interface-type",
"id": "interface/peer2/physical5",
"ietf-service-assurance-interface:parameters": {
"device": "Peer2",
"interface": "physical5"
},
"dependencies": {
"dependency": [
{
"type": "ietf-service-assurance-device:device-type",
"id": "interface/peer2",
"dependency-type": "impacting"
}
]
}
},
{
"type": "ietf-service-assurance-device:device-type",
"id": "interface/peer2",
"ietf-service-assurance-device:parameters": {
"device": "Peer2"
}
}
]
}
}