Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents

show system schema

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
show system schema module module output-directory path
<filter [filter1 filter2]>
<format format>
<module-name output-module-name>
<output-file-name path>
<version version>

Description

Display the Junos OS schema in the specified format. If you do not specify a format, the device displays the schema in YANG.

Options

filter [filter1 filter2]

Display the schema only for the specified configuration hierarchies when generating the schema for the configuration module. Specify a space-delimited list of filters representing each hierarchy to include. When you use the filter option, you must also include the module-name option. This option is deprecated starting in Junos OS Release 17.4R1

Note:

In the filter path, the root element represents the top-level configuration element in the configuration hierarchy. For example, to only retrieve the [edit system services] hierarchy, set the value of filter to /system/services.

format format

(Optional) Data modeling language of the schema. Specify yang to display the schema in YANG format.

  • Default: yang

output-directory path

Specify the directory where the schema files will be saved.

Note:

Starting in Junos OS Release 19.1R2 and 19.2R1, you must specify the output-directory option when requesting any schema files. In earlier releases, you can omit the output-directory option when requesting a single module to display the module in standard output.

Note:

To specify the output file in Junos OS Release 15.1 and earlier releases, use the output-file-name option.

output-file-name path

(Optional) File to which the output is written. If you do not specify an absolute path, the device places the file in the current working directory, which defaults to the user’s home directory in /var/home. If you omit this option, the output is sent to standard output. This option is deprecated starting in Junos OS Release 16.1.

module module

Module for which to display the schema.

module-name output-module-name

(Optional) Name used for the generated module. If you also include the output-directory option in the command to direct the output to a file, the filename for the output file uses this module name as the filename base and the format as the file extension. This option is deprecated starting in Junos OS Release 17.4R1.

Required Privilege Level

view

Sample Output

show system schema module all-conf

content_copy zoom_out_map
user@host> show system schema module all-conf output-directory /var/tmp/yang
user@host> 

show system schema module (Junos OS Release 19.1 and earlier)

content_copy zoom_out_map
user@host> show system schema module junos-conf-root

/*
 * Copyright (c) 2017 Juniper Networks, Inc.
 * All rights reserved.
 */
 module junos-conf-root {
   namespace "http://yang.juniper.net/junos/conf/root";

   prefix jc;

   import junos-common-types {
     prefix jt;
   }

   organization "Juniper Networks, Inc.";

   contact "yang-support@juniper.net";

   description "Junos YANG module for configuration hierarchies.";

   revision 2017-01-01 {
     description "Junos: 17.4R1.17";
   }

   container configuration {
     config true;
     uses juniper-config;
     list groups {
       key name;
       ordered-by user;
       description "Configuration groups";
       uses juniper-group;
     }
   }
...

show system schema module configuration filter (Junos OS Release 17.4 and earlier)

content_copy zoom_out_map
user@host> show system schema module configuration filter [/system /interfaces] module-name config-sys-int
/*
 * Copyright (c) 2016 Juniper Networks, Inc.
 * All rights reserved.
 */

 module config-sys-int {
  namespace "http://yang.juniper.net/yang/1.1/jc/configuration/junos/17.2R1.13";
  prefix jc;
  import junos-extension {
    prefix junos;
  }
  ...
   container configuration {
     config true;
     uses juniper-config;
     list groups {
       key group_name;
       ordered-by user;
       description "Configuration groups";
       uses juniper-group;
     }
   }
   grouping juniper-config {
     container system {
       description "System parameters";
       uses juniper-system;
     }
     container interfaces {
       description "Interface configuration";
       uses apply-advanced;
   ...

Release Information

Command introduced in Junos OS Release 14.2.

filter, module-name, and output-directory options added in Junos OS Release 16.1R1.

output-file-name option deprecated in Junos OS Release 16.1R1.

filter and module-name options deprecated in Junos OS Release 17.4R1.

footer-navigation