Example: Displaying and Deleting Configuration Contributed by Applications
This example demonstrates the usefulness of the extension package-name show command over the simple show command using a sample configuration.
If you use the show command at the top of the hierarchy, all configuration is shown.
[edit]user@router# showsystem {radius-server {10.1.1.1 {timeout 10;backup-server 10.1.1.2; # Contributed by pkg1}}}protocols {ospf {....}proto1 { # Contributed by pkg1....}}In contrast, the following is the output from the extension pkg1 show command. Notice that this command selects configurations contributed by and leading to the package named in the command. The extension pkg1 show command filters out the timeout and ospf commands from the displayed output, which were not contributed by the pkg1 package.
[edit]user@router# extension pkg1 showsystem {radius-server {10.1.1.1 {backup-server 10.1.1.2;}}}protocols {proto1 {....}}Continuing with the same example, notice how the configuration changes when the extension pkg1 delete command is used. Using this command, you can delete all user-defined configuration statements related to the pkg1 package.
This one command accomplishes the same thing as issuing the following two commands:
- delete system radius-server 10.1.1.1 backup-server
- delete protocols proto1
[edit]user@router# extension pkg1 delete[edit]user@router# showsystem {radius-server {10.1.1.1 {timeout 10;}}}protocols {ospf {....}}