cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2060
Views
0
Helpful
4
Replies

Netconf Error <bad-element>type</bad-element>- Yangsuite

Umesh Shetty
Level 1
Level 1

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 ?

 

@

4 Replies 4

yangorelik
Spotlight
Spotlight

Hi Umesh

Could you please change label for this discussion to YangSuite.

Thanks.

Yan Gorelik
YDK Solutions

yangorelik
Spotlight
Spotlight

Hi Umesh

Could you please change label for this discussion to Yang Suite.

Thanks.

Yan Gorelik
YDK Solutions

Alexander Stevenson
Cisco Employee
Cisco Employee

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>


Nabsch
Spotlight
Spotlight

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";
      }