3  CLI Reference

The yangdump-pro program uses command line interface (CLI) parameters to control program behavior.

The following sections document all the YumaPro CLI parameters relevant to this program, in alphabetical order.

3.1  --config

The --config parameter specifies the name of a YumaPro configuration file that contains more parameters to process, in addition to the CLI parameters.

Refer to the 'Configuration Files' section for details on the format of this file.

--config parameter

 

Syntax

string: complete file specification of the text file to parse for more parameters.

Default:

/etc/yumapro/<program-name>.conf

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

    yangdump-pro testmod \
        --config=~/testconf.conf

 

3.2  --defnames

The --defnames parameter causes the program output file to be named with the default name for the format, based on the input module name and revision date.  Refer to the section on generating WEB documentation for details on specific file formats for HTML output.

If the --output parameter is present and represents an existing directory, then the default filename  will be created in that directory, instead of the current directory.

This parameter is ignored if the --format parameter is missing.

--defnames parameter

 

Syntax

boolean

Default:

FALSE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --defnames=true \
 --subtree=~/workdir/ \
 --format=html

3.3  --dependencies

The --dependencies parameter causes information to be reported for the symbols that this [sub]module imports from other modules.

The following information is reported for each dependency:

Example report for module 'yangdump-pro':

 

 

dependencies:

import ncx 2009-06-12

import ncx-app-common 2009-04-10

import ncxtypes 2008-07-20

 

 

--dependencies parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --dependencies \
 --module=test4

 

3.4  --deviation

The --deviation parameter is a leaf-list of modules that should be loaded automatically when the program starts, as a deviation module.  In this mode, only the deviation statements are parsed and then made available later when the module that contains the objects being deviated is parsed.

The deviations must be known to the parser before the target module is parsed.

This parameter is used to identify any modules that have deviation statements for the set of modules being parsed (e.g., --module and --subtree parameters).

A module can be listed with both the --module and --deviation parameters, but that is not needed unless the module contains external deviations.  If the module only contains deviations for objects in the same module, then the --deviation parameter does not need to be used.

The program will attempt to load each module in deviation parsing mode, in the order the parameters are entered.

For the netconfd-pro program, If any modules have fatal errors then the program will terminate.

For the yangdump-pro and yangcli-pro programs, each module will be processed as requested.

--deviation parameter

 

Syntax

module name or filespec

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

netconfd-pro
yangcli-pro
yangdump-pro

Example:

yangcli-pro \
 --module=test1 \
 --deviation=test1_deviations

 

3.5  --exports

The --exports parameter causes information to be reported for the symbols that this [sub]module exports to other modules.

The exports for the entire module are printed, unless the specified input file is a YANG submodule.  In that case, just the exports in the submodule are reported.

It includes the following information, generated in this order:

--exports parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --exports \
 --module=test3

 

3.6  --feature-code-default

The --feature-code-default parameter controls how yangdump-pro will generate C code for YANG features by default.

If 'dynamic', then by default, features can be loaded at run-time, and objects with if-feature statements will be available in case the feature is enabled.

If 'static', then by default, features are set at compile-time, and any disabled objects will be removed at load-time.

If a --feature-dynamic or --feature-static parameter is present for a specific feature, then this parameter will be ignored for that feature.

 

--feature-code-default parameter

 

Syntax

enum (dynamic or static)

Default:

dynamic

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro --format=c \
   --feature-code-default=static \
   --module=test

 

3.7  --feature-disable

The --feature-disable parameter directs all programs to disable a specific feature.

This parameter is a formatted string containing a module name, followed by a colon ':', followed by a feature name:

 

 

test:feature1

 

 

It is an error if a --feature-enable and --feature-disable parameter specify the same feature.

Parameters for unknown features will be ignored.

 

--feature-disable parameter

 

Syntax

formatted string (module:feature

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

yangcli-pro
yangdiff-pro
yangdump-pro
netconfd-pro

Example:

yangdump-pro --format=c \
   --feature-disable=test:feature1 \
   --module=test

 

3.8  --feature-dynamic

The --feature-dynamic parameter controls how yangdump-pro  will generate dynamic code for a specific feature.

This parameter is a formatted string containing a module name, followed by a colon ':', followed by a feature name:

 

 

test:feature1

 

 

It is an error if a --feature-static and --feature-dynamic parameter specify the same feature.

Parameters for unknown features will be ignored.

 

--feature-dynamic parameter

 

Syntax

formatted string (module:feature

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

yangdump-pro

Example:

yangdump-pro --format=c \
   --feature-dynamic=test:feature1 \
   --module=test

 

3.9  --feature-enable

The --feature-enable parameter directs all programs to enable a specific feature.

This parameter is a formatted string containing a module name, followed by a colon ':', followed by a feature name:

 

 

test:feature1

 

 

It is an error if a --feature-disable and --feature-enable parameter specify the same feature.

Parameters for unknown features will be ignored.

 

--feature-enable parameter

 

Syntax

formatted string (module:feature

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

yangcli-pro
yangdiff-pro
yangdump-pro
netconfd-pro

Example:

yangdump-pro --format=c \
   --feature-enable=test:feature1 \
   --module=test

 

3.10  --feature-enable-default

The --feature-enable-default parameter controls how yangdump-pro will generate C code for YANG features by default.

If 'true', then by default, features will be enabled.

If 'false', then by default, features will be disabled.

If a --feature-enable or --feature-disable parameter is present for a specific feature, then this parameter will be ignored for that feature.

 

--feature-enable-default parameter

 

Syntax

boolean (true or false)

Default:

TRUE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangcli-pro
yangdiff-pro
yangdump-pro
netconfd-pro

Example:

netconfd-pro \
  --feature-enable-default=false

 

3.11  --feature-static

The --feature-static parameter controls how yangdump-pro  will generate static code for a specific feature.

This parameter is a formatted string containing a module name, followed by a colon ':', followed by a feature name, e.g.,

 

 

test:feature1

 

 

It is an error if a --feature-static and --feature-dynamic parameter specify the same feature.

Parameters for unknown features will be ignored.

 

--feature-static parameter

 

Syntax

formatted string (module:feature

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

yangdump-pro

Example:

yangdump-pro --format=c \
   --feature-static=test:feature1 \
   --module=test

 

3.12  --format

The --format parameter controls the type of yangdump-pro conversion desired, if any.

YumaPro SIL developers should refer to the make_sil_dir script to generate SIL code instead of using the yangdump-pro command directly for code generation formats (c, h, uc, uh, yc, yh).

If this parameter is missing, then no translation will be done, but the module will be validated, and any requested reports will be generated.

The following values are supported:

 

--format parameter

 

Syntax

enumeration (xsd, sql, sqldb, html, yang, copy, h, c, uc, uh, yc, yh))

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro test1 test2 \
 --format=xsd \
 --defnames=true \
 --output=~/workdir

 

3.13  --help

The --help parameter causes program help text to be printed, and then the program will exit instead of running as normal.

This parameter can be combined with the --help-mode parameter to control the verbosity of the help text.  Use --brief for less, and --full for more than the normal verbosity.

This parameter can be combined with the --version parameter in all programs.  It can also be combined with the --show-errors parameter in yangdump-pro.

The program configuration parameters will be displayed in alphabetical order, not in schema order.

 

--help parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --help

 

3.14  --help-mode

The --help-mode parameter is used to control the amount of detail printed when help text is requested in some command.  It is always used with another command, and makes no sense by itself.  It is ignored unless used with the --help parameter.

 

--help-mode parameter

 

Syntax

choice of 3 empty leafs

  --brief
 --normal
 --full

Default:

normal

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --help --help-mode=full

 

 

3.15  --home

The --home parameter over-rides the $HOME environment variable, if it is set.  File searches that use the user's home directory will use this path specification instead.  

 

--home parameter

 

Syntax

string: pathspec

Default:

$HOME environment value

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --home=~/testmodules

 

3.16  --html-div

The --html-div parameter controls whether yangdump-pro HTML translation will generate a single <div> element, or an entire HTML document.

If HTML translation is requested, then setting  this parameter to 'true' will cause the output to be a single <div> element, instead of an entire HTML file.  If it is not requested (--format=html), then this parameter is ignored.

This parameter allows the HTML translation to be easily integrated within more complex WEB pages, but the proper CSS definitions need to be present for the HTML to render properly. It is suggested only HTML experts use this parameter.

Refer to the following stylesheet file for more details:

 

 

http://www.netconfcentral.org/static/css/style.css

 

 

The default filename extension will be '.div' instead of '.html' if this parameter is present.  The contents will be well-formed XHTML 1.0, but without any namespace declarations.

--html-div parameter

 

Syntax

boolean

Default:

FALSE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --html-div=true  --format=html
 --module=test

 

3.17  --html-toc

The --html-toc parameter controls how yangdump-pro HTML translation will generate a table of contents for the HTML document.

If HTML translation is requested, then this parameter will cause the output to contain a bullet list TOC, a drop-down menu TOC, or none.

This option has no effect unless the --format=html parameter is also present.

The following values are supported:

Note that if the 'menu' enumeration is used, then the following javascript file must be available to the WEB server which is hosting the output HTML file:

 

http://www.netconfcentral.org/static/javascript/suckerfish.js

 

 

--html-toc parameter

 

Syntax

enumeration (none, plain, menu)

Default:

menu

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --html-toc=plain  --format=html
 --module=test

 

3.18  --identifiers

The --identifiers parameter causes information to be object identifier strings to be reported for the object, RPC operation, and notification definitions within the input module(s).

The following information is reported for each identifier:

Example report for module 'yuma-mysession':

 

identifiers:

rpc /get-my-session

container /get-my-session/output

leaf /get-my-session/output/indent

leaf /get-my-session/output/linesize

leaf /get-my-session/output/with-defaults

container /get-my-session/input

rpc /set-my-session

container /set-my-session/input

leaf /set-my-session/input/indent

leaf /set-my-session/input/linesize

leaf /set-my-session/input/with-defaults

container /set-my-session/output

 

 

--identifiers parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --identifiers \
 --module=yuma-mysession

 

3.19  --indent

The --indent parameter specifies the number of spaces that will be used to add to the indentation level, each time a child node is printed during program operation.

--indent parameter

 

Syntax

uint32 (0 .. 9)

Default:

2

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --indent=4

 

 

3.20  --lang-errors

The --lang-errors parameter causes the yangdump-pro program to list all the error and warning numbers, and the default message for each one. This is done in the format expected by the errmsg-tr.py error message translator program.

After this is done, the yangdump-pro program will exit.

Example output:

 

400@session dropped

401@media type not in range

402@an appropriate representation could not be found

403@data is not in a format acceptable for processing

404@unknown query parameter

405@missing Accept header

406@password is too short

407@missing input data

408@value disabled by if-feature-stmt

409@when-stmt not allowed on key leaf

410@if-feature-stmt not allowed on key leaf

411@invalid XML response would be returned

412@JSON encoding not yet supported

413@missing data definition statement

414@default value conditional on if-feature

415@invalid escape sequence in double-quoted string

416@invalid status for child node

417@configuration template not found

 

-lang-errors parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro --lang-errors

 

3.21  --log

The --log parameter specifies a file name to be used for logging program messages, instead of STDOUT.  It can be used with the optional parameters below to control how the log file is written.

 

--log parameter

 

Syntax

string: log file specification

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

netconfd-pro --log=~/server.log&

 

3.22  --log-append

The --log-append parameter specifies that the existing log file (if any) should be appended , instead of deleted.  It is ignored unless the --log parameter is present.

 

--log-append parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

netconfd-pro --log-append \
 --log=~/server.log&

 

3.23 --log-level

The --log-level parameter controls the verbosity level of messages printed to the log file or STDOUT, if no log file is specified.

The log levels are incremental, meaning that each higher level includes everything from the previous level, plus additional messages.

There are 7 settings that can be used:

 

log-level parameter

 

Syntax

enumeration:
 off
 error
 warn
 info
 debug
 debug2
 debug3
 debug4

Default:

--info (--debug for DEBUG builds)

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

netconfd-pro --log-level=debug \
 --log=~/server.log&

 

3.24  --modpath

The --modpath parameter specifies the YANG module search path to use while searching for YANG files.  It consists of a colon (':') separated list of path specifications, commonly found in Unix, such as the $PATH environment variable.

This parameter overrides the $YUMAPRO_MODPATH environment variable, if it is present.

 

--modpath parameter

 

Syntax

string: list of directory specifications

Default:

$YUMAPRO_MODPATH environment variable

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro \
 --modpath=”~/testmodules:~/modules:~/trunk/netconf/modules” \
 --module=~/test42.yang

 

3.25  --module

The --module parameter is a leaf-list of modules that should be loaded automatically when the program starts.

The program will attempt to load each module in the order the parameters were entered.

For the netconfd-pro program, If any modules have fatal errors then the program will terminate.

For the yangdump-pro program, each module will be processed as requested.

 

--module parameter

 

Syntax

module name or filespec

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

netconfd-pro
yangcli-pro
yangdump-pro

Example:

yangcli-pro \
 --module=test1 \
 --module=test2

 

3.26  --modversion

The --modversion parameter causes the module name and revision date to be displayed for each module specified in the input.

Example output for module 'test':

 

 

modversion:

module test 2009-06-10

 

 

--modversion parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --modversion \
 --module=test

 

3.27  --no-config

The --no-config parameter specifies that the default configuration file (/etc/yumapro/yangdump_pro.conf) should not be loaded, even if it is present.

 

--no-config parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --no-config test

 

3.28  --objview

The --objview parameter specifies how objects will be generated during translation, for HTML and canonical YANG file translations.

The enumeration values are:

The default mode is the 'raw' view.

XSD output is always 'cooked', since refined groupings and locally-scoped definitions are not supported in XSD.  This parameter is not implemented for other values of the --format parameter.

 

--objview parameter

 

Syntax

enumeration (raw, cooked)

Default:

raw

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --objview=cooked \
 --module=test \
 --format=html

 

3.29  --output

The --output parameter specifies where the output files generated by the program will be stored.

 

 

~/some/path ==> <my-home-dir>/some/path

 

~fred/some/path ==> <fred-home-dir>/some/path

 

$workdir/some/path ==> <workdir-env-var>/some/path

 

 

 

--output parameter

 

Syntax

string (path or file specification)

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro
yangdiff-pro

Example:

yangdump-pro \
 --output=~/html-files

  --subtree=testfiles \
 --format=html

 

 

3.30  --quiet-mode

The --quiet-mode parameter specifies that quiet mode reporting should be done.  In this mode, the module summary line will not be printed unless there are errors or warnings for the module.  This parameter is most relevant if the
--subtree parameter is also used.

 

Without the --quiet-mode parameter:

 

 

andy@andy-2i7:~$ yangdump-pro subtree=test

 

 

*** Generated by yangdump-pro tiger-integ-2017-06-15.14.37

*** Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.

*** Copyright (c) 2012-2017, YumaWorks, Inc., All Rights Reserved.

 

*** /home/andy/test/test-maxelems.yang

*** 0 Errors, 0 Warnings

 

*** /home/andy/test/test-insert.yang

*** 0 Errors, 0 Warnings

 

andy@andy-2i7:~$

 

 

With the --quiet-mode parameter:

 

 

andy@andy-2i7:~$ yangdump-pro --quiet-mode subtree=test

 

 

*** Generated by yangdump-pro tiger-integ-2017-06-15.14.37

*** Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.

*** Copyright (c) 2012-2017, YumaWorks, Inc., All Rights Reserved.

 

andy@andy-2i7:~$

 

 

--quiet-mode parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro
yangdump-sdk

Example:

yangdump-pro --quiet-mode \
  --subtree=test

 

3.31  --show-errors

The --show-errors parameter causes the yangdump-pro program to list all the error and warning numbers, and the default message for each one.

The 3 digit number, followed by the message string, will be printed 1 per line.

After this is done, the yangdump-pro program will exit.

This parameter can be combined with the --help parameter.  The --version parameter has no affect if this parameter is present.  The program version string will be printed in both cases.

The NETCONF error-tag values are used directly when no other error number is appropriate.  These error numbers are as follows:

 

257 resource in use

258 invalid value

259 too big

260 missing attribute

261 bad attribute

262 unknown attribute

263 missing element

264 bad element

265 unknown element

266 unknown namespace

267 access denied

268 lock denied

269 resource denied

270 rollback failed

271 data exists

272 data missing

273 operation not supported

274 operation failed

275 partial operation

 

 

-show-errors parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro --show-errors

 

3.32  --sil-bundle

The --sil-bundle parameter specifies the name of the SIL bundle to create. It is used with the --format parameter to generate specific SIL C or H files.  The --module parameter is used to specify the YANG modules that will be included in the SIL bundle.

Only supported by the yangdump-sdk program.

 

--sil-bundle parameter

 

Syntax

string

Default:

none

Min Allowed:

0

Max Allowed:

no maximum

Supported by:

yangdump-sdk

Example:

yangdump-sdk \
 --format=yc \
 --sil-bundle=test \
 --module=test1 \
 --module=test2 \

  --module=test3

 

3.33  --sil-edit2

The --sil-edit2 parameter specifies that the second generation SIL or SIL-SA edit callbacks should be generated instead of the first generation callbacks.  The new callbacks are optimized so the terminal nodes (leaf, leaf-list-, anyxml) are handled by a parent callback (for container, list, or choice).  Refer to the YumaPro SDK Developers Guide for mode details.

Only supported by the yangdump-sdk program.

 

--sil-edit2 parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-sdk

Example:

yangdump-sdk \
 --format=yc \
 --sil-edit2 \
 --module=test1

 

3.34  --sil-get2

The --sil-get2 parameter specifies that the second generation SIL or SIL-SA get callbacks should be generated instead of the first generation callbacks.  The new callbacks are optimized so the terminal nodes (leaf, leaf-list-, anyxml) are handled by a parent callback (for container, list, or choice).  Refer to the YumaPro SDK Developers Guide for mode details.

Only supported by the yangdump-sdk program.

 

--sil-get2 parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-sdk

Example:

yangdump-sdk \
 --format=yc \
 --sil-get2 \
 --module=test1

 

3.35  --sil-include

The --sil-include parameter specifies the name of a file to use in a C “#include” statement. These statements will be generated in the C files only, and in the order they are specified.

Only supported by the yangdump-sdk program.

 

--sil-include parameter

 

Syntax

string

Default:

none

Min Allowed:

0

Max Allowed:

no maximum

Supported by:

yangdump-sdk

Example:

yangdump-sdk \
 --format=yc \
 --sil-include=system1.h \

  --sil-include=system2.h \
 --module=test

 

 

 

3.36  --sil-nmda

The --sil-nmda parameter specifies that NMDA specific SIL or SIL-SA C code should be generated.

If present, then the 2nd generation NMDA 'get' functions will be generated for SIL or SIL-SA modes, if code generation is being requested. Ignored otherwise.

The GET2 callbacks will be generated with extra NMDA specific code for config=true data nodes.

It is an error   if sil-nmda is selected but sil-get2 is not selected.

Only supported by the yangdump-sdk program.

 

The extra code generated is used to support the <get-data> operation. There will be GET2 callbacks generated for configuration data nodes, along with corresponding register and unregister code.

 

There are 2 new parameters within the GET2 control block passed to the GET2 callback function:

 

 

 

--sil-nmda parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-sdk

Example:

yangdump-sdk \
 --format=yc --sil-get2 --sil-nmda \
 --module=test

 

3.37  --sil-sa

The --sil-sa parameter specifies that the server callback code for a subagent (SIL-SA) should be generated instead of code for running in the master agent (SIL).  Refer to the YumaPro SDK Developers Guide for mode details.

Only supported by the yangdump-sdk program.

 

--sil-sa parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-sdk

Example:

yangdump-sdk \
 --format=yc \
 --sil-get2 \
 --sil-sa
 --module=test1

 

3.38  --simurls

The --simurls parameter specifies how URL strings are generated for HTML links.

If HTML translation is requested, then setting this parameter to 'true' will cause the format of URLs within links to be generated in simplified form, for WEB development engines such as CherryPy, which support this format.

 

--simurls parameter

 

Syntax

boolean

Default:

FALSE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --simurls=true \
 --format=html \
 --module=test

 

3.39  --stats

The --stats parameter is used to request a YANG usage statistics report.

See the --totals parameter to control statistics totals reporting, when used with this parameter.

Statistics are not normally collected.  This must be enabled by setting this parameter to a value other than 'none' (the default).  Any other value will cause statistics to be collected and reported after each input module is validated.

The verbosity of the statistics report is controlled with this parameter.  Each enumeration includes all the previous statistics (from lower enumerations), plus additional statistics.  The following table describes the counters that are displayed at each minimum --stats enumeration value.

 

counter

level

description

Complexity score

brief

Numeric score characterizing the level of implementation complexity for the module.  A higher number indicates a more complex module.

Total nodes

brief

The total number of object nodes (data, notification, rpc) in the module.

  • The Config nodes + Non-config nodes should equal this counter.

  • The Mandatory nodes + Optional nodes should equal this counter.

Extensions

basic

The number of extension statements.

Features

basic

The number of feature statements.

Groupings

basic

The number of exported groupings.

Typedefs

basic

The number of exported typedefs.

Deviations

basic

The number of deviation statements.

Top Data Nodes

basic

The number of top-level data nodes.

Config nodes

basic

The number of configurable nodes.

Non-config nodes

basic

The number of non-configurable nodes.

Mandatory nodes

advanced

The number of mandatory nodes.

Optional nodes

advanced

The number of optional nodes.

Notifications

advanced

The number of notification statements.

Rpcs

advanced

The number of rpc statements.

Rpc inputs

advanced

The number of RPC input statements.

Rpc outputs

advanced

The number of rpc output statements

Augments

advanced

The number of top-level augment statements within data nodes (not groupings).

Uses

advanced

The number of uses statements within data nodes (not groupings).

Choices

advanced

The number of choice statements.

Cases

advanced

The number of case statements. This includes implied cases which contain a single data node.

Anyxmls

advanced

The number of anyxml statements.

NP containers

advanced

The number of non-presence containers.

P containers

advanced

The number of presence containers.

Lists

advanced

The number of list statements.

Leaf-lists

advanced

The number of leaf-list statements.

Key leafs

advanced

The number of leaf statements which are defined within a list to be a key.

Plain leafs

advanced

The number of plain leaf statements.

Imports

all

The number of import statements.

Integral numbers

advanced

The number of leaf and leaf-list statements that used a numeric data type other than decimal64.

Decimal64s

advanced

The number of leaf and leaf-list statements that used the decimal64 data type.

Enumerations

advanced

The number of leaf and leaf-list statements that used the enumeration data type.

Bits

advanced

The number of leaf and leaf-list statements that used the bits data type.

Booleans

advanced

The number of leaf and leaf-list statements that used the boolean data type.

Emptys

advanced

The number of leaf and leaf-list statements that used the empty data type.

Strings

advanced

The number of leaf and leaf-list statements that used the string data type.

Binarys

advanced

The number of leaf and leaf-list statements that used the binary data type.

Instance Identifiers

advanced

The number of leaf and leaf-list statements that used the instance-identifier data type.

Leafrefs

advanced

The number of leaf and leaf-list statements that used the leafref data type.

Identityrefs

advanced

The number of leaf and leaf-list statements that used the identityref data type.

Unions

advanced

The number of leaf and leaf-list statements that used the union data type.

 

--stats parameter

 

Syntax

enumeration [none, brief, basic, advanced, all]

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --stats=advanced
 --module=test

 

3.40  --subdirs

The --subdirs parameter controls whether sub-directories should be searched or not, if they are found during a module search.

If false, the file search paths for modules, scripts, and data files will not include sub-directories if they exist in the specified path.

 

--subdirs parameter

 

Syntax

boolean

Default:

TRUE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --subdirs=false \
 --subtree=/testpath

 

3.41  --subtree

The --subtree parameter is a leaf-list of path specifications that may contain YANG files.

It must be a string value that represents a path specification of the directory subtree to use.  

All of the YANG source modules contained in the specified directory sub-tree will be processed.

Note that symbolic links are not followed during the directory traversal.  Only real directories will be searched and regular files will be checked as  modules.  Processing will continue to the next file if a module contains errors.

If this string begins with a '~' character, then a username is expected to follow or a directory separator character.  If it begins with a '$' character, then an environment variable name is expected to follow.

If the --subdirs=false parameter is present, then only the top-level directory specified by this parameter will be searched for YANG files.

If the --subdirs=true parameter is present, then all the directories contained within the one specified by this parameter will also be searched for YANG files.  The exceptions are:

 

Examples:

 

~/some/path ==> <my-home-dir>/some/path

~fred/some/path ==> <fred-home-dir>/some/path

$workdir/some/path ==> <workdir-env-var>/some/path

 

 

subtree parameter

 

Syntax

string: path specification

Default:

none

Min Allowed:

0

Max Allowed:

unlimited

Supported by:

yangdiff-pro
yangdump-pro

Example:

yangdump-pro \
 --format=html \
 --subtree=~/testmods
 --subtree=./workdir
 --output=./yang-html-files

 

 

3.42  --totals

The --totals parameter is used with the --stats parameter to control how summary statistics are reported.

 

--totals parameter

 

Syntax

enumeration [none, summary, summary-only]

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 ---stats=basic
 --totals=summary-only
 --subtree=~/my-test-modules

 

 

3.43  --tree-identifiers

The --tree-identifiers parameter causes information to be object identifier name strings to be reported for the object, RPC operation, and notification definitions within the input module(s).

The following information is reported for each identifier:

Example report for module 'yuma-mysession':

 

identifiers:

 rpc get-my-session

   container output

     leaf indent

     leaf linesize

     leaf with-defaults

   container input

 rpc set-my-session

   container input

     leaf indent

     leaf linesize

     leaf with-defaults

   container output

 

 

--tree-identifiers parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --tree-identifiers \
 --module=yuma-mysession

 

3.44  --unified

The --unified parameter indicates if submodules should be combined into the main module for yangdump-pro translation output.  Any include statements will be replaced by the module definitions contained within the submodule.

If set to 'true', then submodules will be processed within the main module, in a unified report, instead of separately, one report for each file.

For translation purposes, this parameter will cause any sub-modules to be treated as if they were defined in the main module.  Actual definitions will be generated instead of an 'include' statement, for each submodule.

If this mode is selected, then submodules will be ignored:

If set to 'false', then a separate output file is generated for each input file, so that XSD output and other reports for a main module will not include information for submodules.

 

--unified parameter

 

Syntax

boolean

Default:

FALSE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --unified=true \
 --format=html \
 --subtree=$PROJECT_X/modules \
 --defnames=true \
 --output=$PROJECT_X/html

 

3.45  --urlstart

The --urlstart parameter specifies the string to start all URLs during yangdump-pro HTML translation.

If present, then this string will be used to start all HREF links and URLs generated for SQL and HTML translation.  It is expected to be a URL ending with a directory path.  The trailing separator '/' will be added if it is missing.

If not present (the default), then relative URLs, starting with the file name will be generated instead.

For example, if this parameter is set to the following string:

http://acme.com/public

 

The URL generated for the 'bar' type on line 53, in the module FOO (version 2008-01-01) would be:

 

http://acme.com/public/FOO.html#bar.53

 

 

http://acme.com/public/FOO_2008-01-01.html#bar.53

 

--urlstart parameter

 

Syntax

string (URL format)

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --urlstart="/example.com/public/" \
 --unified=true \
 --format=html \
 --subtree=$PROJECT_X/modules \
 --defnames=true \
 --output=$PROJECT_X/html

 

3.46  --version

The --version parameter causes the program version string to be printed, and then the program will exit instead of running as normal.

All YumaPro version strings use the same format:

DEBUG: <major>.<minor>.<svn-build-version>

or

NON-DEBUG: <major>.<minor>-<release>

An example version number that may be printed:

 

 

yangdump-pro 2.0-0

 

 

This parameter can be combined with the --help parameter.

 

--version parameter

 

Syntax

empty

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --version

 

3.47  --versionnames

The --versionnames parameter indicates that revision dates should not be used when constructing any output YANG module file names.

 If present, the default filenames will not contain the module version string.  Normally, the [sub]module  name and version string are both used to generate a default file name, when the --defnames output parameter is set to 'true'.  This parameter will cause filenames to be generated which do not contain the revision date string.

 

--versionnames parameter

 

Syntax

boolean

Default:

TRUE

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
 --versionnames=false \
 --subtree=/testpath \
 --defnames=true \
 --output=~/work3 \
 --format=html

 

3.48  --warn-error

The --warn-error parameter controls whether all warnings are elevated to errors.

If ‘true’ then warnings that are enabled will be elevated to errors for reporting purporses.

If the --warn-off parameter is entered for a specific error, that warning is considered disabled, and will not be elevated to an error.

 

--warn-error parameter

 

Syntax

boolean

Default:

false

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --warn-error=true

 

 

3.49  --warn-idlen

The --warn-idlen parameter controls whether identifier length warnings will be generated.

The value zero disables all identifier length checking.  If non-zero, then a warning will be generated if an identifier is defined which has a length is greater than this amount.

 

--warn-idlen parameter

 

Syntax

uint32: 0 to disable, or 8 .. 1023

Default:

64

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --warn-idlen=50

 

3.50  --warn-linelen

The --warn-linelen parameter controls whether line length warnings will be generated.

The value zero disables all line length checking.  If non-zero, then a warning will be generated if a YANG file line is entered which has a length is greater than this amount.

Tab characters are counted as 8 spaces.

--warn-linelen parameter

 

Syntax

uint32: 0 to disable, or 40 .. 4095

Default:

72

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --warn-linelen=79

 

3.51  --warn-off

The --warn-off parameter suppresses a specific warning number.

The error and warning numbers, and the default messages, can be viewed with the yangdump-pro program by using the --show-errors configuration parameter.

The specific warning message will be disabled for all modules.  No message will be printed and the warning will not count towards the total for that module.

 

--warn-off parameter

 

Syntax

uint32: 400 .. 899

Default:

none

Min Allowed:

0

Max Allowed:

499

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --warn-off=435
# revision order not descending

 

3.52  --warn-up

The --warn-up parameter elevates a specific warning number to an error.

The error and warning numbers, and the default messages, can be viewed with the yangdump-pro program by using the --show-errors configuration parameter.

The specific warning message will be elevated for all modules.  An error message will be printed and the warning will be counted towards the error total for that module.

 

--warn-up parameter

 

Syntax

uint32: 1000 .. 1999

Default:

none

Min Allowed:

0

Max Allowed:

unlimied

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro --warn-up=1022

 

 

3.53  --with-ocpattern

The --with-ocpattern parameter controls whether the server will support the OpenConfig usage of the YANG pattern statement.

 

--with-ocpattern parameter

 

Syntax

boolean

Default:

FALSE

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro

yangcli-pro

yangdump-pro

Example:

yangdump-pro --with-ocpattern=true

 

3.54  --xsd-schemaloc

The --xsd-schemaloc parameter specifies that yangdump-pro XSD translations should include the 'schemaLocation' attribute.

If present, then the 'schemaLocation' attribute will be generated during XSD translation.  This will be  done for the module being processed, and any modules that are imported into that module.

If not present (the default), then the 'schemaLocation' attribute is not generated during XSD translation.

Relative URLs for include and import directives will be generated, starting with the file name.

For example, if this parameter is set to the following string:

 

 

http://example.com/public

 

 

The 'schemaLocation' XSD for the module test3 (version 10-19-2008) would be:

 

 

xsi:schemaLocation='http://netconfcentral.org/ns/test3
 http://example.com/public/test3.xsd'

 

 

 

xsi:schemaLocation='http://netconfcentral.org/ns/test3
http://example.com/public/test3_2008-10-19.xsd'

 

 

--xsd-schemaloc parameter

 

Syntax

string (URL formal)

Default:

none

Min Allowed:

0

Max Allowed:

1

Supported by:

yangdump-pro

Example:

yangdump-pro \
--xsd-schemaloc="http://example.com"
--format=xsd
--module=test3
--defnames=true

 

3.55  --yumapro-home

The --yumapro-home parameter specifies the project directory root to use when searching for files.

If present, this directory location will override the $YUMAPRO_HOME environment variable, if it is set.  If this parameter is set to a zero-length string, then the $YUMAPRO_HOME environment variable will be ignored.

The following directories are searched when either the $YUMAPRO_HOME environment variable or this parameter is set:

 

yumapro-home parameter

 

Syntax

string: directory specification

Default:

$YUMAPRO_HOME environment variable

Min Allowed:

0

Max Allowed:

1

Supported by:

netconfd-pro
yangcli-pro
yangdiff-pro
yangdump-pro

Example:

yangdump-pro \
 --yumapro-home=~/sw/netconf \
 --log=~/server.log&