Schema of data.json


Raj
 

Hello all,

Is there any documentation available for the schema used by
persist/config/data.json and persist/context/data.json ?

Thanks and Regards,

Raj


Michal Cmarada
 

Hi,

Those files use the exact same structure as defined in yang models in json format (same as requests in our postman collections). So all you need to do is to check relevant models and compare with data in these files. Some of the models are directly in hc2vpp project some are from MDSAL opendaylight project (ietf-interfaces, ietf-ip ...). You should be able to find top level containers from models as top level entries in these files for example (ietf-interfaces and lisp yang model data):
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "GigabitEthernet0/9/0",
"type": "iana-if-type:ethernetCsmacd",
"enabled": false,
"v3po:ethernet": {
"mtu": 9206
}
},
{
"name": "local0",
"type": "iana-if-type:ethernetCsmacd",
"enabled": false
}
]
},
"lisp:lisp": {
"enable": false
},
....

Context models are all located in hc2vpp and it should be easy to find them because they contain "context" in their names.

Michal

-----Original Message-----
From: hc2vpp@... <hc2vpp@...> On Behalf Of Raj
Sent: Thursday, May 16, 2019 1:55 PM
To: hc2vpp@...
Subject: [hc2vpp] Schema of data.json

Hello all,

Is there any documentation available for the schema used by persist/config/data.json and persist/context/data.json ?

Thanks and Regards,

Raj


Raj
 

Thanks, I'll check them out.

Thanks and Regards,

Raj

On Thu, May 16, 2019 at 5:51 PM Michal Cmarada -X (mcmarada - PANTHEON
TECHNOLOGIES at Cisco) <mcmarada@...> wrote:

Hi,

Those files use the exact same structure as defined in yang models in json format (same as requests in our postman collections). So all you need to do is to check relevant models and compare with data in these files. Some of the models are directly in hc2vpp project some are from MDSAL opendaylight project (ietf-interfaces, ietf-ip ...). You should be able to find top level containers from models as top level entries in these files for example (ietf-interfaces and lisp yang model data):
{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "GigabitEthernet0/9/0",
"type": "iana-if-type:ethernetCsmacd",
"enabled": false,
"v3po:ethernet": {
"mtu": 9206
}
},
{
"name": "local0",
"type": "iana-if-type:ethernetCsmacd",
"enabled": false
}
]
},
"lisp:lisp": {
"enable": false
},
....

Context models are all located in hc2vpp and it should be easy to find them because they contain "context" in their names.

Michal
-----Original Message-----
From: hc2vpp@... <hc2vpp@...> On Behalf Of Raj
Sent: Thursday, May 16, 2019 1:55 PM
To: hc2vpp@...
Subject: [hc2vpp] Schema of data.json

Hello all,

Is there any documentation available for the schema used by persist/config/data.json and persist/context/data.json ?

Thanks and Regards,

Raj