NETCONF error: "invalid-value"
Condition
You ran a command like this:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<candidate/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<interfaces xmlns="urn:vyatta.com:mgmt:vyatta-interfaces:1">
<loopback xmlns="urn:vyatta.com:mgmt:vyatta-interfaces-loopback:1">
<tagnode>la</tagnode>
<description xc:operation="merge">Set from NETCONF</description>
</loopback>
</interfaces>
</config>
</edit-config>
</rpc>
]]>]]>
And you see an error like this:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<rpc-error>
<error-type>application</error-type>
<error-tag>invalid-value</error-tag>
<error-severity>error</error-severity>
<error-app-tag>pattern-violation</error-app-tag>
<error-path>/interfaces/loopback/la</error-path>
<error-message>name must be lo or loN, N in [1-99999]</error-message>
</rpc-error>
</rpc-reply>
Cause
Somewhere in your command, you specified a value that is not valid. The content of the <error-message>
element will help you to identify where the problem is.
In this example, the error is triggered by an attempt to set a description on a loopback interface named la
. This doesn't match the allowed pattern of lo...
.
Remedy
<tagnode>la</tagnode>
to:<tagnode>lo</tagnode>