Using Pyang - Siemens RX1400 Reference Manual

Ruggedcom series
Hide thumbs Also See for RX1400:
Table of Contents

Advertisement

Chapter 4
Getting Data
<version>2012-03-07</version>
<format>yin</format>
</get-schema>
</rpc>]]>]]>
The device returns the text from the specified YIN or YANG file.
Section 4.6.3

Using pyang

pyang is an open-source utility used to validate and transform YANG and YIN files. pyang is particularly useful for
transforming YANG and YIN files into text-based output that clearly illustrated the hierarchy of the elements in the
RUGGEDCOM ROX II data model files.
Download pyang from
application. If you do not already have Python installed, download it from
This section describes how to us pyang to convert a YANG or YIN file to a text-based tree diagram of a
RUGGEDCOM ROX II schema.
To convert a YANG or YIN file to a text-based tree diagram, do the following:
1.
Before beginning, download one or more YANG or YIN files from RUGGEDCOM ROX II. For instructions on
downloading schemas, refer to
2.
At a command line prompt; type this command:
pyang {inputFile} -o {outputFile} -f tree
• {inputFile}
The path to and filename of the YANG or YIN file that you want to convert.
• {outputFile}
The path to and filename of the text-based tree diagram that you want to create.
For example, to convert the rmf_services.yan file to a text-based tree diagram, type the following
command. This example assumed that you are issuing the command in the same directory as where the
rmf_services.yang file is located.
pyang rmf_services.yang -o rmf_services.txt -f tree
pyang creates the rmf_services.txt file.
3.
Open the output file in a text editor. This example shows a portion of the rmf_services.yang file
rendered as a text-based tree:
module: rmf_services
+--rw services
+--rw time
+--rw ntp
+--rw enabled?
+--rw server [name]
|
|
|
|
|
|
|
|
38
[http://code.google.com/p/pyang/]. pyang is a Python-based
the pyang project site
Section 4.6.2, "Getting YIN and YANG Files from the
+--rw name
inet:host
+--rw enabled?
empty
+--rw peer?
empty
+--rw minpoll?
ntpPollType
+--rw maxpoll?
ntpPollType
+--rw iburst?
empty
+--rw ntp-version?
ntpVersionType
+--rw prefer?
empty
boolean
python.org
[http://www.python.org/].
Device".
RUGGEDCOM NETCONF
Reference Guide
Using pyang

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rx1500Rx1511Rx1512Rx5000Mx5000Mx5000re ... Show all

Table of Contents