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:yang:ietf-access-control-list">
    <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.2.0/24</destination-ipv4-network>
              <source-ipv4-network>12.51.100.0/24</source-ipv4-network>
            </ipv4>
          </matches>
          <actions>
            <forwarding>drop</forwarding>
          </actions>
        </ace>
      </aces>
    </acl>
  </access-lists>

Command I am running to configure switch 

Response.
* Connected to localhost (127.0.0.1) port 8181 (#0)
* Server auth using Basic with user 'admin'
> POST /restconf/config/network-topology:network-topology/topology/topology-netconf/node/test/yang-ext:mount/ietf-access-control-list:access-lists/ HTTP/1.1
> 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=q12yvno0ommu1q656mbune91v;Path=/restconf
< 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:ietf-access-control-list?revision=2018-03-03)access-lists\"",
                "error-message": "Error parsing input: Child \"access-lists\" was not found in parent schema node \"(urn:ietf:params:xml:ns:yang:ietf-access-control-list?revision=2018-03-03)access-lists\"",
                "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-03-03.yang
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