Understanding the Junos DDL Extensions YANG Module
The Junos Data Definition Language (DDL) extensions YANG module contains YANG extensions for Junos devices. These extensions include statements that can define constraints on configuration data and the valid values for strings. There are also statements that you include in custom RPCs to define a CLI command for the RPC and to specify details about the action script to invoke when the RPC is executed. In addition, there are statements that you can use to define helper action scripts for individual command options and configuration statements, for example, to display a list of acceptable values for options or statements.
Starting in Junos OS Release 17.4, Junos OS YANG modules use a new naming convention for the module’s name, filename, and namespace. The module’s name and filename include the device family and Junos OS release, and the filename also includes a revision date.
Table 1 outlines the statements in the DDL extensions module and provides a brief description of each statement.
Statement Keyword |
Argument Description |
---|---|
|
Define the actions taken when you execute a custom RPC. Use the
Starting in Junos OS Release 17.3, the
|
|
Define the script that calculates and displays the possible values for a given command option or configuration statement in a custom YANG data model when a user requests context-sensitive help in the CLI. Use the |
|
Identify certain CLI properties associated with some command options and configuration statements. See cli-feature Supported Properties. |
|
String defining the operational command that is used to execute the corresponding RPC in the Junos OS CLI. Starting in Junos OS Release 17.3, the |
|
String that identifies a constraint on the configuration data. Whereas the argument for the YANG |
|
String that defines the warning message that is emitted when the
constraint defined by the corresponding |
|
String that defines the error message emitted when the constraint
defined by the corresponding |
|
Restrict the values accepted for nodes of type string to those that match the POSIX regular expression defined in this string. |
|
String specifying the name of an action script. This is a
substatement of the |
cli-feature Supported Properties
The cli-feature
YANG extension identifies certain CLI properties
associated with some command options and configuration statements. This extension is
beneficial when a client consumes YANG data models, but for certain workflows, the
client needs to generate CLI-based tools. Supported properties include:
-
homogenous
—Text-formatted configuration data groups list objects into a single set of braces under the object keyword. -
nokeyword
—The CLI does not require explicitly specifying the leaf name in the input syntax. -
oneliner
/oneliner-plus
—Text-formatted configuration data places an object's attributes on a single line. Theoneliner
flag does so without exception; theoneliner-plus
flag does so only when zero or one value occurs for an attribute.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.
cli-feature
extension statements, where applicable, in
schemas emitted with extensions.