Skip to content

Diff does not show order of policys #216

@denniswa

Description

@denniswa

It seems that diff does not consider the order of policys. Example here we have a Juniper peering router configured with 3 different import policys

snc@snc-lab[/]# show devices device ptx-ac-3 config configuration protocols bgp group TEST
ptx-ac-3:clixon-controller:devices {
   device ptx-ac-3 {
      config {
         junos-conf-root:configuration {
            junos-conf-protocols:protocols {
               bgp {
                  group TEST {
                     type external;
                     neighbor 1.1.1.1 {
                        import [
                           policy-1
                           policy-2
                           policy-3
                        ]
                        peer-as 1234;
                     }
                  }
               }
            }
         }
      }
   }
}

If I change the order of the policys locally on the device, the controller will not show any diff:

snc@snc-lab[/]# op show devices diff

If we pull the config then we can see the new (correct) order that was set on device:

snc@snc-lab[/]# op pull
OK
snc@snc-lab[/]# show devices device ptx-ac-3 config configuration protocols bgp group TEST
ptx-ac-3:clixon-controller:devices {
   device ptx-ac-3 {
      config {
         junos-conf-root:configuration {
            junos-conf-protocols:protocols {
               bgp {
                  group TEST {
                     type external;
                     neighbor 1.1.1.1 {
                        import [
                           policy-3
                           policy-2
                           policy-1
                        ]
                        peer-as 1234;
                     }
                  }
               }
            }
         }
      }
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions