[j-nsp] set-style config output format is missing some aspects of the configuration
Chuck Anderson
cra at fea.st
Wed May 18 12:17:48 EDT 2022
"show configuration | display set" is missing some aspects of the
configuration, namely annotations (comments). What else is it
missing? Would Juniper please consider making the entire
configuration representable in set-style format, including
annotations?
It is handy for example to annotate prefix-list items, but you can
apply annotate on almost any part of the configuration:
----------------------------------------------------------------------
{master:0}[edit]
user at router# edit policy-options prefix-list FOO
{master:0}[edit policy-options prefix-list FOO]
user at router# show
10.1.1.1/32;
20.2.2.2/32;
30.3.3.3/32;
{master:0}[edit policy-options prefix-list FOO]
user at router# annotate 10.1.1.1/32 "server 1"
{master:0}[edit policy-options prefix-list FOO]
user at router# annotate 20.2.2.2/32 "peer 2"
{master:0}[edit policy-options prefix-list FOO]
user at router# annotate 30.3.3.3/32 "bad guy 3"
{master:0}[edit policy-options prefix-list FOO]
user at router# show
/* server 1 */
10.1.1.1/32;
/* peer 2 */
20.2.2.2/32;
/* bad guy 3 */
30.3.3.3/32;
{master:0}[edit]
user at router# top
{master:0}[edit]
user at router# show | find FOO
prefix-list FOO {
/* server 1 */
10.1.1.1/32;
/* peer 2 */
20.2.2.2/32;
/* bad guy 3 */
30.3.3.3/32;
}
}
{master:0}[edit]
user at router# show policy-options prefix-list FOO | display set
set policy-options prefix-list FOO 10.1.1.1/32
set policy-options prefix-list FOO 20.2.2.2/32
set policy-options prefix-list FOO 30.3.3.3/32
----------------------------------------------------------------------
Tagging configuration items with "deactivate" or "protect" does show
up in set-style:
----------------------------------------------------------------------
{master:0}[edit]
user at router# edit policy-options prefix-list FOO
{master:0}[edit policy-options prefix-list FOO]
user at router# deactivate 20.2.2.2/32
{master:0}[edit policy-options prefix-list FOO]
user at router# protect 30.3.3.3/32
{master:0}[edit policy-options prefix-list FOO]
user at router# show
/* server 1 */
10.1.1.1/32;
/* peer 2 */
inactive: 20.2.2.2/32;
/* bad guy 3 */
protect: 30.3.3.3/32;
{master:0}[edit policy-options prefix-list FOO]
user at router# show | display set
set policy-options prefix-list FOO 10.1.1.1/32
set policy-options prefix-list FOO 20.2.2.2/32
deactivate policy-options prefix-list FOO 20.2.2.2/32
set policy-options prefix-list FOO 30.3.3.3/32
protect policy-options prefix-list FOO 30.3.3.3/32
----------------------------------------------------------------------
So why not "annotate"?
More information about the juniper-nsp
mailing list