Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: show compare of template does not show correct diff while load merge xml #101

Open
jjsson opened this issue Feb 5, 2024 · 3 comments
Assignees
Labels
bug Something isn't working fixlater

Comments

@jjsson
Copy link

jjsson commented Feb 5, 2024

show compare does not show diff while load merge xml

Example adding 1653:8 :

SUNET-STATIC-CONNECTED-AGG
1653:8

pre -adding:

rikard@snc[/]# show devices template deploy-policy-options-shared-community


deploy-policy-options-shared-community




SUNET
1653:0


SUNET-CORE
1653:0


SUNET-ONLY
1653:2


SUNET-DGIX
1653:2


NNI-TELE2
1653:190


NNI-TELE2-SVA
1653:191


NNI-TELE2-STH
1653:192


NNI-TELE2-GBG
1653:193


LOCATION-NORTH
1653:200


LOCATION-EAST
1653:201


LOCATION-WEST
1653:202


LOCATION-SOUTH
1653:203


TO-MGMT
target:1653:899


FROM-MGMT
target:1653:898


SUNET-flowspec-enabled-routers
1653:901


fs-fixed-rules-south
1653:903


fs-fixed-rules
1653:941


SUNET-source-blackhole
1653:996


SUNET-upstream-part-blackhole
1653:997


SUNET-upstream-blackhole
1653:998


SUNET-blackhole
1653:999


MDVPN-PE
1653:2003


no-export
no-export


RPKI-UNKNOWN
1653:65100


RPKI-VALID
1653:65101


RPKI-INVALID
1653:65102


NORDUNET-CORE
2603:111


NDN-blackhole-non_nordic
2603:998


NDN-blackhole
2603:999






rikard@snc[/]#

addning

rikard@snc[/]# load merge xml



deploy-policy-options-shared-community




SUNET
1653:0


SUNET-CORE
1653:0


SUNET-ONLY
1653:2


SUNET-DGIX
1653:2


SUNET-STATIC-CONNECTED-AGG
1653:8


NNI-TELE2
1653:190


NNI-TELE2-SVA
1653:191


NNI-TELE2-STH
1653:192


NNI-TELE2-GBG
1653:193


LOCATION-NORTH
1653:200


LOCATION-EAST
1653:201


LOCATION-WEST
1653:202


LOCATION-SOUTH
1653:203


TO-MGMT
target:1653:899


FROM-MGMT
target:1653:898


SUNET-flowspec-enabled-routers
1653:901


fs-fixed-rules-south
1653:903


fs-fixed-rules
1653:941


SUNET-source-blackhole
1653:996


SUNET-upstream-part-blackhole
1653:997


SUNET-upstream-blackhole
1653:998


SUNET-blackhole
1653:999


MDVPN-PE
1653:2003


no-export
no-export


RPKI-UNKNOWN
1653:65100


RPKI-VALID
1653:65101


RPKI-INVALID
1653:65102


NORDUNET-CORE
2603:111


NDN-blackhole-non_nordic
2603:998


NDN-blackhole
2603:999







rikard@snc[/]# com
diff local push
rikard@snc[/]# show com
text xml |
rikard@snc[/]# show compare <-------- !
policy-options {

  •             community {
    
  •                name NDN-blackhole; <-----
    
  •                members 2603:999;  <------
    
  •             }
             }
    

rikard@snc[/]#

result is ok:

rikard@snc[/]# commit local
rikard@snc[/]# show devices template deploy-policy-options-shared-community


deploy-policy-options-shared-community




SUNET
1653:0


SUNET-CORE
1653:0


SUNET-ONLY
1653:2


SUNET-DGIX
1653:2


SUNET-STATIC-CONNECTED-AGG
1653:8


NNI-TELE2
1653:190


NNI-TELE2-SVA
1653:191


NNI-TELE2-STH
1653:192


NNI-TELE2-GBG
1653:193


LOCATION-NORTH
1653:200


LOCATION-EAST
1653:201


LOCATION-WEST
1653:202


LOCATION-SOUTH
1653:203


TO-MGMT
target:1653:899


FROM-MGMT
target:1653:898


SUNET-flowspec-enabled-routers
1653:901


fs-fixed-rules-south
1653:903


fs-fixed-rules
1653:941


SUNET-source-blackhole
1653:996


SUNET-upstream-part-blackhole
1653:997


SUNET-upstream-blackhole
1653:998


SUNET-blackhole
1653:999


MDVPN-PE
1653:2003


no-export
no-export


RPKI-UNKNOWN
1653:65100


RPKI-VALID
1653:65101


RPKI-INVALID
1653:65102


NORDUNET-CORE
2603:111


NDN-blackhole-non_nordic
2603:998


NDN-blackhole
2603:999





@jjsson jjsson changed the title show compare does not show diff while load merge xml show compare does not show correct diff while load merge xml Feb 5, 2024
@olofhagsand olofhagsand added the bug Something isn't working label Feb 6, 2024
olofhagsand added a commit to clicon/clixon that referenced this issue Feb 8, 2024
@olofhagsand olofhagsand added the fixed: plz verify Bug/feature is fixed by developer, need verification label Feb 8, 2024
@denniswa
Copy link

When deleting first clients for example in the SNMP list the diff is funny:

snc@snc-lab[/]# show compare
                     clients {
-                       name "192.36.171.249/32";
+                       name "192.36.171.225/32";
                     }
                     clients {
-                       name "192.36.171.225/32";
+                       name "192.36.171.175/32";
                     }
                     clients {
-                       name "192.36.171.175/32";
+                       name "109.105.111.111/32";
                     }
                     clients {
-                       name "109.105.111.111/32";
+                       name "109.105.111.24/32";
                     }
                     clients {
-                       name "109.105.111.24/32";
+                       name "109.105.113.17/32";
                     }
                     clients {
-                       name "109.105.113.17/32";
+                       name "86.105.118.10/32";
                     }
                     clients {
-                       name "86.105.118.10/32";
+                       name "130.242.121.200/32";
                     }
                     clients {
-                       name "130.242.121.200/32";
+                       name "86.105.119.16/32";
                     }
                  community{
-                    clients {
-                       name 86.105.119.16/32;
-                    }
                  }

@olofhagsand olofhagsand removed the fixed: plz verify Bug/feature is fixed by developer, need verification label Feb 12, 2024
@olofhagsand olofhagsand assigned olofhagsand and unassigned jjsson Feb 12, 2024
@olofhagsand olofhagsand changed the title show compare does not show correct diff while load merge xml show compare of template does not show correct diff while load merge xml Feb 14, 2024
@olofhagsand
Copy link
Member

The comparison algorithm in clixon assumes a yang-spec. But the "config" part of the template is anydata and lacks YANG.
There are two obvious solutions to this:

  1. Clixon should have a non-yang xml diff
  2. The template should use YANG

@olofhagsand olofhagsand added the wontfix This will not be worked on label Feb 14, 2024
@olofhagsand
Copy link
Member

Document this as known issue: show compare of template configs is limited.

@krihal krihal added fixlater and removed wontfix This will not be worked on labels Feb 20, 2024
@krihal krihal changed the title show compare of template does not show correct diff while load merge xml CLI: show compare of template does not show correct diff while load merge xml Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixlater
Projects
None yet
Development

No branches or pull requests

4 participants