Skip to content

Commit 78b6010

Browse files
committed
Remove operational state from PUT request
Remove configuration of "state" container from GNMI example PUT requests because its marked as config false in corresponding YANG model. We cannot modify operational data using RESTCONF. GH issue: #2358 Signed-off-by: Ivan Hrasko <[email protected]> (cherry picked from commit d4a7086)
1 parent 9775fd1 commit 78b6010

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

lighty-examples/lighty-gnmi-community-restconf-app/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ curl --request GET 'http://127.0.0.1:8888/restconf/data/network-topology:network
127127
```
128128

129129
### Write configuration to device
130-
To write authentication information the PUT request `'Put Authentication config/state'` from postman collection can be
131-
used.
130+
To write authentication information the PUT request `'Put Authentication config'` from postman collection can be used.
132131
```
133132
curl --request PUT 'http://127.0.0.1:8888/restconf/data/network-topology:network-topology/topology=gnmi-topology/node=gnmi-simulator/yang-ext:mount/openconfig-system:system/aaa/authentication' \
134133
--header 'Content-Type: application/json' \
@@ -138,11 +137,6 @@ curl --request PUT 'http://127.0.0.1:8888/restconf/data/network-topology:network
138137
"authentication-method": [
139138
"openconfig-aaa-types:TACACS_ALL"
140139
]
141-
},
142-
"state": {
143-
"authentication-method": [
144-
"openconfig-aaa-types:RADIUS_ALL"
145-
]
146140
}
147141
}
148142
}'

lighty-examples/lighty-gnmi-community-restconf-app/lighty.io gNMI-RESTCONF application.postman_collection.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@
270270
"response": []
271271
},
272272
{
273-
"name": "Put Authentication config/state",
273+
"name": "Put Authentication config",
274274
"request": {
275275
"method": "PUT",
276276
"header": [],
277277
"body": {
278278
"mode": "raw",
279-
"raw": "{\n \"openconfig-system:authentication\": {\n \"config\": {\n \"authentication-method\": [\n \"openconfig-aaa-types:TACACS_ALL\"\n ]\n },\n \"state\": {\n \"authentication-method\": [\n \"openconfig-aaa-types:RADIUS_ALL\"\n ]\n }\n }\n}",
279+
"raw": "{\n \"openconfig-system:authentication\": {\n \"config\": {\n \"authentication-method\": [\n \"openconfig-aaa-types:TACACS_ALL\"\n ]\n }\n }\n}",
280280
"options": {
281281
"raw": {
282282
"language": "json"

0 commit comments

Comments
 (0)