This group is locked. No changes can be made to the group while it is locked.
Date
1 - 1 of 1
Error when using POST method in restconf interface
Parul Agrawal <parulagrawal14@...>
Hi All, Need help with respect to netconf access-control-list configuration in ODL (oxygen). I am using file acl.xml. Content of xml is as show below: <?xml version="1.0" encoding="UTF-8"?> <access-lists xmlns="urn:ietf:params:xml:ns: <acl> <name>sample-ipv4-acl</name> <type>ipv4-acl-type</type> <aces> <ace> <name>rule12</name> <matches> <ipv4> <protocol>6</protocol> <destination-ipv4-network>12.0 <source-ipv4-network>12.51.100 </ipv4> </matches> <actions> <forwarding>drop</forwarding> </actions> </ace> </aces> </acl> </access-lists> Command I am running to configure switch curl -v -k -u admin:admin -H "Content-Type: application/xml" -X POST http://localhost:8181/res Response. * Connected to localhost (127.0.0.1) port 8181 (#0) * Server auth using Basic with user 'admin' > POST /restconf/config/network-topol > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.35.0 > Host: localhost:8181 > Accept: */* > Content-Type: application/xml > Content-Length: 639 > } [data not shown] * upload completely sent off: 639 out of 639 bytes < HTTP/1.1 400 Bad Request < Set-Cookie: JSESSIONID=q12yvno0ommu1q656mb < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Set-Cookie: rememberMe=deleteMe; Path=/restconf; Max-Age=0; Expires=Wed, 09-May-2018 15:52:57 GMT < Content-Type: application/json < Transfer-Encoding: chunked < { [data not shown] 100 1073 0 434 100 639 7767 11436 --:--:-- --:--:-- --:--:-- 11833 * Connection #0 to host localhost left intact { "errors": { "error": [ { "error-info": "Child \"access-lists\" was not found in parent schema node \"(urn:ietf:params:xml:ns:yang "error-message": "Error parsing input: Child \"access-lists\" was not found in parent schema node \"(urn:ietf:params:xml:ns:yang "error-tag": "malformed-message", "error-type": "protocol" } ] } } Same command works fine for PUT request with the same xml file. But it is not working for POST Command. I am using the below yang for ODL ietf-access-control-list@2018- Can anyone help me in resolving this issue. Actually I would like to merge/append the new rule instead of replacing it, hence wamted to use POST. Regards, Parul
|
|