clicon / clixon-controller

Clixon network controller
Apache License 2.0
12 stars 4 forks source link

Commit don't push configuration if service is configured #78

Closed krihal closed 6 months ago

krihal commented 6 months ago

If a service is configured the next configuration change is not pushed when doing a commit.

For example, I configure a prefix-filter service and after committing changing the hostname which can't be committed.

debian@khn-dev[/]# set services prefix-filter pf1 ip-version ipv4
debian@khn-dev[/]# set services prefix-filter pf1 filter-name pf1
debian@khn-dev[/]# set services prefix-filter pf1 devices crpd1
debian@khn-dev[/]# show compare
   clixon-controller:services {
+     prefix-filter:prefix-filter pf1 {
+        filter-name pf1;
+        ip-version ipv4;
+        as-macro AS-KTH;
+        devices [
+           crpd1
+       ]
+     }
   }
debian@khn-dev[/]# commit

And change hostname:

debian@khn-dev[/]# set devices device crpd1 config configuration system host-name foo
debian@khn-dev[/]# commit diff
crpd1:
      <system xmlns="http://yang.juniper.net/junos/conf/root">
-       <host-name>foobar</host-name>
+       <host-name>foo</host-name>
      </system>
OK
debian@khn-dev[/]# commit
OK
debian@khn-dev[/]# commit diff
crpd1:
      <system xmlns="http://yang.juniper.net/junos/conf/root">
-       <host-name>foobar</host-name>
+       <host-name>foo</host-name>
      </system>
OK

Problem: Diff is still there and the configuration is not pushed.