This is similar to NETCONF RPC edit-config with replace
pytraining@newhostname# show protocols bgp
log-updown;
group underlay {
type external;
import bgp-in;
export bgp-out;
local-as 209;
multipath multiple-as;
neighbor 192.168.10.4 {
peer-as 210;
}
neighbor 192.168.10.0 {
peer-as 204;
}
}
pytraining@newhostname# load replace terminal ?
Possible completions:
<[Enter]> Execute this command
relative Load contents relative to current edit point
| Pipe through a command
pytraining@newhostname# load replace terminal
[Type ^D at a new line to end input]
protocols {
bgp {
replace:
group underlay {
type external;
import bgp-in;
export bgp-out;
local-as 209;
multipath multiple-as;
neighbor 192.168.10.4 {
peer-as 210;
}
neighbor 192.168.10.8 {
peer-as 204;
}
}
}
}
load complete
pytraining@newhostname# commit
configuration check succeeds
commit complete
pytraining@newhostname# show | compare rollback 1
[edit protocols bgp group underlay]
neighbor 192.168.10.4 { ... }
+ neighbor 192.168.10.8 {
+ peer-as 204;
+ }
- neighbor 192.168.10.0 {
- peer-as 204;
- }
pytraining@newhostname#
nice