Hi eesunj,
Actually I got this, you are trying to do delete operation under policy-options configuration hierarchy . I assume that there are two or more configuration parameters under the < policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger > policy-options configuration hierarchy level.
lab# show policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger
local-preference 200;
accept;
As you are specifically deleting the only one parameter in the level “delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger accept”; it will not delete the entire policy or the entire term IN or the entire “from route-filter 1.4.13.52/30 orlonger” configuration hierarchy .
Example:
Current Configuration [Assumtions with 2 or more config parameters]:
[edit]
lab# show policy-options policy-statement IN
Jan 07 00:33:30
term 85 {
from {
route-filter 1.4.13.52/30 orlonger {
local-preference 200;
accept;
}
}
}
[edit]
lab# commit
Jan 07 00:33:34
commit complete
[edit]
lab# show policy-options policy-statement IN
Jan 07 00:33:58
term 85 {
from {
route-filter 1.4.13.52/30 orlonger {
local-preference 200;
accept;
}
}
}
This is expected <<<
[edit]
lab# delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger accept
Jan 07 00:34:08
[edit]
lab# show | compare
Jan 07 00:34:14
[edit policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger]
- accept;
Since we have one more configuration parameter in the same hierarchy “policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger”
[edit]
lab# show policy-options policy-statement IN
Jan 07 00:34:29
term 85 {
from {
route-filter 1.4.13.52/30 orlonger {
local-preference 200;
}
}
}
Other OPTIONs:
Alternatively based on your requirement you can also delete at different configuration hierarchy as below to the config below the hierarchy ,
[edit]
lab# delete policy-options policy-statement IN term 85
or
[edit]
lab# delete policy-options policy-statement IN
or
[edit]
lab# delete policy-options policy-statement IN term 85 from
-Python
#Please mark my solution as accepted if it helped, Kudos are appreciated as well.