Questions tagged [yang]

YANG (Yet Another Next Generation) is a modular data modelling language for data used by network management protocols. It is defined in [RFC 7950](https://tools.ietf.org/html/rfc7950).

YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.

YANG was originally designed to model data for the NETCONF protocol. A YANG module defines hierarchies of data that can be used for NETCONF-based operations, including configuration, state data, RPCs, and notifications. This allows a complete description of all data sent between a NETCONF client and server. YANG may also be used with protocols other than NETCONF.

To the extent possible, YANG maintains compatibility with the Simple Network Management Protocol's (SNMP's) SMIv2. SMIv2-based MIB modules can be automatically translated into YANG modules for read-only access.

Further reading:

55 questions
0
votes
1 answer

allow a range of vlans NSO CISCO

I'm trying to build L2VPN service in which we need to allow a range of vlans in the customer side. The configuration is as follow: device { name ME0 data interface GigabitEthernet0/2 no switchport …
Brun
  • 9
  • 2
0
votes
1 answer

How to use logical conditions in XML?

is_bcm_soc_brd1() || is_bcm_soc_brd2() || is_bcm_soc_brd3() Here my input board type is is_board_jkl, so the function is_bcm_soc_brd3() will return True. The problem is…
Krishna
  • 49
  • 6
0
votes
1 answer

Yang regular expression for digit validation

Need to update a leaf with regular expression in Yang... Basically it should take only digits and ranges from 1-32 valid patters are: 1,2,3,4-7,22-30,32,31 - valid 1,2,3,4-7,22-30,32,31,1-10 - invalid as some are overlapping with…
Guru
  • 29
  • 8
0
votes
1 answer

RPC Request for get-schema of bbf(broadband forum) yangs

I am trying below RPC request for module bbf-dot1q-types. but facing error like identifier is not found. Please help me on this to what is the right RPC request for bbf yangs.
sowji
  • 43
  • 1
  • 6
0
votes
2 answers

Yang model mandatory node only when condition is true

I have an XML file: true foo and a Yang model: container a { leaf b { type boolean; } leaf c { type string; } } Node 'c' is mandatory only when node 'b' equals 'true'. If I add a mandatory:…
anegru
  • 1,023
  • 2
  • 13
  • 29
0
votes
1 answer

usage of yang model ietf-routing

I am trying to add config data according to these yang modules: https://github.com/mbj4668/pyang/blob/master/modules/ietf/ietf-routing.yang https://github.com/mbj4668/pyang/blob/master/modules/ietf/ietf-ipv4-unicast-routing.yang I am getting error…
m.divya.mohan
  • 2,261
  • 4
  • 24
  • 34
0
votes
1 answer

How can I put valid YANG instance data in a well-formed XML document when there are leafref nodes in it?

I'm having trouble combining two things: YANG data modeling, and off-the-shelf XML tools. Specifically, when the YANG module has leafref's to another module, I can't see how to avoid having two top-level tags. As a stripped down example, consider…
0
votes
2 answers

Extending yang with help prompts for cli

I am writing a new CLI and I am considering using yang as a data definition language. It has almost everything I need: mandatory/optionals, types, derived types, acceptable ranges, descriptions and a ton of existing modules. However, I want to…
uuu777
  • 765
  • 4
  • 21
0
votes
1 answer

leaf name and type name can be same in yang

Below example is correct yang statement or not? it is valid by pyang but JNC is unable to process grouping TLId { leaf age { type Age; mandatory true; } } typedef Age { type string { pattern '[0-9][0-9]'; } } Please suggest
-3
votes
1 answer

Failed to install pyang

I'm trying to install pyang by pip install pyang command and I got this error : Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/pyang/ Thank you.
1 2 3
4