I created an action that exposes a set of parameters. Most of them are accessibile via RESTCONF API but some does not
If the action is invoked from CLI it is OK:
cisco@ncs> request HCW SetIpslaSrc tir TIR-0 tecnologia CiscoXe ipslaSrc { ipslaId 758 ipslaType udpJitter responder 1.2.3.4 ipSrc 14.3.2.1 pktNum 40 pktLen 300 interval 100 freq 120 tos IPP2 tag ConfiguratoDaCLI vrf LaVPNseServe udpPort 4444 }
result Completed.
If the same action is invoked via RESTCONF API the parameter "udpPort" is not accepted
[cisco@phtir ~]$ curl --location --request POST 'http://163.162.45.117:8080/api/operations/HCW/SetIpslaSrc/' \
> --header 'Content-Type: application/vnd.yang.operation+xml' \
> --header 'Media-Type: application/vnd.yang.operation' \
> --header 'Authorization: Basic Y2lzY286dHJAcHBvbGE=' \
> --data '<input>
> <tir>TIR-0</tir>
> <tecnologia>CiscoXe</tecnologia>
> <ipslaSrc xmlns="http://tim.it/SDN/tiripsla" xmlns:y="http://tail-f.com/ns/rest" xmlns:timhcw="http://tim.it/SDN/tiripsla">
> <ipslaId>759</ipslaId>
> <ipslaType>udpJitter</ipslaType>
> <responder>1.2.3.4</responder>
> <ipSrc>14.3.2.1</ipSrc>
> <pktNum>40</pktNum>
> <pktLen>300</pktLen>
> <interval>100</interval>
> <freq>120</freq>
> <tos>IPP2</tos>
> <tag>ConfiguratoDaPostman</tag>
> <vrf>LaVPNseServe</vrf>
> <udpPort>5566</udpPort>
> </ipslaSrc>
> </input>'
<errors xmlns="http://tail-f.com/ns/tailf-rest-error">
<error>
<error-tag>malformed-message</error-tag>
<error-urlpath>/api/operations/HCW/SetIpslaSrc</error-urlpath>
<error-message>udpPort cannot occur here as a child to ipslaSrc.</error-message>
</error>
</errors>
The same beahavior occurs using REST API.
If the offending parameter is omitted it works.
No useful log is produced