{
"results": [
{
"operation": "UPDATE",
"path": "network-instances/network-instance[name=openconfig-test2]/interfaces/interface[id=ethernet1/5.1]/id"
}
],
"time": "2021-06-23T10:24:45.485769495-07:00",
"timestamp": 1624469085485769495
}
The following command adds ethernet1/5 to the
virtual router using a JSON file.
gnmic -a localhost --port 9339 -u test -p test -e JSON_IETF --timeout 300s set --update-path "/" --update-file virtual-router.json
The
contents of virtual-router.json are as follows:
{
"network-instances": {
"network-instance": [
{
"config": {
"name": "openconfig-test2"
},
"interfaces": {
"interface": [
{
"config": {
"id": "ethernet1/5.0"
},
"id": "ethernet1/5.0"
}
]
},
"name": "openconfig-test2"
}
]
}
}
A successful response returns:
{
"results": [
{
"operation": "UPDATE"
}
],
"time": "2021-06-23T10:38:11.894585804-07:00",
"timestamp": 1624469891894585804
}