10-21-2021 05:25 AM
hi Fellows
I am fairly new to using YangSuite and Netconf. I have a basic requirement to shut/un shut an interface on a switch. I installed YangSuite and am using the the edit-config functionality on the ietf-interfaces YANG module. I simply add the interface name and set the state to True. The RPC that is generated is as below
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<edit-config>
<target>
<running/>
</target>
<config>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>Te5/0/8</name>
<enabled>true</enabled>
</interface>
</interfaces>
</config>
</edit-config>
</rpc>
When I run this RPC I get this error
<?xml version="1.0" ?> <rpc-reply message-id="urn:uuid:54cf09c3-61e4-49cc-aca2-78cc6468177b" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc-error> <error-type>application</error-type> <error-tag>data-missing</error-tag> <error-severity>error</error-severity> <error-path xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> /rpc/edit-config/config/if:interfaces/if:interface[if:name='Te5/0/8']/if:type </error-path> <error-message xml:lang="en">/if:interfaces/interface[name='Te5/0/8']/type is not configured</error-message> <error-info> <bad-element>type</bad-element> </error-info> </rpc-error> </rpc-reply>
Would someone be able to point out where the issues is ?
@
10-22-2021 10:39 AM
Hi Umesh
Could you please change label for this discussion to YangSuite.
Thanks.
10-22-2021 10:39 AM
Hi Umesh
Could you please change label for this discussion to Yang Suite.
Thanks.
11-02-2021 09:22 AM
Hello @Umesh Shetty,
The XML appears valid. There is a mailer for customers to ask questions about YangSuite:
yangsuite-support-ext(mailer list) <yangsuite-support-ext@cisco.com>
01-26-2022 11:49 AM
Hello,
The error-message is relatively clear . You need to specify the type.
leaf type { type identityref { base interface-type; } mandatory true; description "The type of the interface."; reference "RFC 2863: The Interfaces Group MIB - ifType"; }
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide