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
3
votes
1 answer

YANG and Choice - what does the XML look like?

I am trying to figure out the proper syntax for implementing the choice field from a yang model into its corresponding configuration xml. Unfortunately, the documentation in RFC 6020 and other Yang related web pages don't seem to show how to use a…
E.S.
  • 2,733
  • 6
  • 36
  • 71
2
votes
1 answer

What does YANG 'identity' mean?

I've worked with YANG on a fairly basic level for quite some time and just recently stumbled across the 'identity' statement found in iana-if-types2@014-05-08.yang as an example. According to RFC6020 The "identity" statement is used to define a new…
2
votes
3 answers

How to augment a "when" conditional statement to a leaf in Yang models?

I have a base model: model base { namespace "urn:base"; prefix b; container c { leaf id { type uint8; } leaf temp { type uint8; } } } How to add/augment a conditional statement to /base:c/base:temp, so it's…
minhix
  • 31
  • 3
2
votes
0 answers

Opendaylight Yang parser example

Is Opendaylight Yang parser actively supported and/or updated? There is no good working example of Yang parser using opendaylight APIs. The one mentioned here is not compiling -- Where to find examples for parsing YANG files using opendaylight The…
AnilJ
  • 1,951
  • 2
  • 33
  • 60
2
votes
2 answers

Which package the YangInferencePipeline in yang parser library has moved to?

I upgraded my opendaylight yangtools libraries to 6.0.3 and the code breaks with the below errror(s): import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline; The import cannot be resolved I am not sure to which…
raikumardipak
  • 1,461
  • 2
  • 29
  • 49
2
votes
2 answers

Not able to run pyang command from Windows command line but able to run from Git Bash

I am learning about python and it's pyang library for parsing .yang files. I could successfully install both python and pip. And confirmed that they work fine through cmd. I then installed pyang through the command: C:\_pyangWorkspace\pip install…
raikumardipak
  • 1,461
  • 2
  • 29
  • 49
1
vote
1 answer

How to use + operator performs addition into "default" Statement

In 'leaf remote-port' I need to get value from 'leaf base-port' and add number 100. The code below is incorrect because. the value "base-port + 100" does not match its base type - not an integer module internet-module { yang-version 1.1; …
1
vote
1 answer

Create a list from a container grouping defined in another submodule

I'm trying to define a container in a sub module as below submodule sub-module { belongs-to main-module{ prefix "sub"; } grouping my-container-group { container my-container { leaf id { type string; } leaf…
ss3071
  • 33
  • 7
1
vote
0 answers

RFC 6241 interpretation related to file:// URI

The Netconf RFC 6241 provides an example like shown below. file://checkpoint.conf
Ram
  • 301
  • 2
  • 12
1
vote
1 answer

How to define a yang mode list to support different key and empty key?

I need to implement a yang mode for CLI: "member instance [template | ]" . The CLI has 3 prototypes: "member instance", "member instance template ", "member instance ". "member instance" means using the default template…
Lian Fu
  • 11
  • 2
1
vote
1 answer

Yang: Force user to input from the list to which the node is referring to

I am new to yang. Below is my yang config. container ntp { tailf:info "NTP Configuration"; tailf:cli-oper-info "Display NTP information"; tailf:cli-incomplete-show-path; //ntp server config leaf-list server { tailf:info "NTP servers"; …
vivek
  • 467
  • 2
  • 6
  • 18
1
vote
0 answers

EOF error in k8 environment on sftpConn.OpenFile() with golang sftp package unless folder path is hardcoded

We are running a golang application in K8 environment, which at one point pushes generated file to an external SFTP server, configured as sftp://user:pass@host:22/upload/sftp2 The code that creates/opens a file on server is ... import ( …
mavaze
  • 1,187
  • 3
  • 9
  • 12
1
vote
0 answers

Why there are differences between the yang model capabilities receive in the Netconf hello message and Opendaylight?

I've been trying to manage a device using the Restconf northbound interface of Opendaylight Oxigen and the Netconf southbound connected to a device that is running Netopeer with several yang data models. Basically, i'm following this…
1
vote
2 answers

How to deviate a list to container in YANG?

I am trying to deviate a list to container in yang. I tried going through RFC#6020, and I couldn't figure-out how to deviate on the container level.
nullptr
  • 133
  • 1
  • 1
  • 8
1
vote
2 answers

Creating an atomic process for a netconf edit-config request

I am creating a custom system that, when a user submits a netconf edit-config, it will initiate a set of actions in my system that will atomically alter the configuration of our system and then submit a notification to the user of its success or…
E.S.
  • 2,733
  • 6
  • 36
  • 71
1
2 3 4