11-01-2020 03:20 PM
Dear community,
I have a question please ..
Development manual : A tag in inherited to its sub-nodes until a new tag is introduced.
My question is : given the above fact, i was expecting the 2 outputs below to be the same and as the second one. What am i missing here ?
I have a simple service, which manages device configs..
This is from my service template :
<config-template xmlns="http://tail-f.com/ns/config/1.0">
<devices xmlns="http://tail-f.com/ns/ncs">
<device>
<name>{device}</name>
<config tags="merge">
<sysname xmlns="http://tail-f.com/ned/huawei-vrp">Huawei-CORE-SW-1</sysname>
<info-center xmlns="http://tail-f.com/ned/huawei-vrp">
<filter-id tags="merge">
<bymodule-alias>
<name>VTY</name>
<alias>ACL_DENY</alias>
</bymodule-alias>
</filter-id>
<source>
...
This is from "show full-config devices device Huawei-CORE-SW-1" output :
config
info-center filter-id bymodule-alias BFD ADDRCV_ERR
info-center filter-id bymodule-alias GVRP GVRPENABLE
info-center filter-id bymodule-alias VTY ACL_DENY
Below are the outputs for "service_for_device_config_compliance{Huawei-CORE-SW-1} commit dry-run" with different template tags :
1)
<config tags="replace">
<filter-id tags="merge">
output same also for :
<config tags="replace">
<info-center xmlns="http://tail-f.com/ned/huawei-vrp" tags="merge">
cli {
local-node {
data devices {
device Huawei-CORE-SW-1 {
config {
info-center {
filter-id {
- bymodule-alias BFD ADDRCV_ERR {
- }
- bymodule-alias GVRP GVRPENABLE {
- }
}
}
2)
<config tags="merge">
<filter-id tags="merge">
cli {
local-node {
data devices {
device Huawei-CORE-SW-1 {
config {
telnet { --> this means there is no output for info-center
server {
+ enable true;
}
}
nso ver : 5.3
huawei NED : huawei-vrp-cli-6.3
Thanks and regards,
Solved! Go to Solution.
11-03-2020 11:04 AM
11-03-2020 03:47 AM
May this be a bug ?
Any comment is appreciated ..
11-03-2020 06:38 AM
11-03-2020 10:28 AM
Viktor hi,
Thanks for your reply..
I understand that replace is an aggressive tag. And also having replace tag at any level will effect all lower layers.
My question is , Given the statement : "Development manual : A tag in inherited to its sub-nodes until a new tag is introduced.", when we place a different tag ( merge in our example ) at a lower layer compared to "replace" tag, wouldn't this tag (merge) be in effect at this layer and lower layers under this (merge) tagged layer.
Example in our scenario :
Comparing 1 and 2 above, both have "merge" at lower layer, and 1 have "replace" , 2 have "merge" at higher layer. And config for which template is applied is under lower layer.
i was expecting both 1 and 2 yield same result, as "merge" is closer to config leafs. In other words, having merge tag under replace tag doesn't seem to have any effect.
Thanks and regards.
11-03-2020 11:04 AM
11-03-2020 11:07 AM
Understood.
Thank you.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide