clicon / clixon-controller

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

Controller do not read Junos inactive="inactive" configuration #76

Open denniswa opened 7 months ago

denniswa commented 7 months ago

In Junos you may deactivate parts of the configuration that you do not want active as an alternative to actually delete the configuration.

Deactivated config is tagged like this:

    <configuration junos:changed-seconds="1702319455" junos:changed-localtime="2023-12-11 18:30:55 UTC">
            <system>
                <domain-name inactive="inactive">qanon.io</domain-name>
            </system>
    </configuration>

Or firewall term:

    <configuration junos:changed-seconds="1702319371" junos:changed-localtime="2023-12-11 18:29:31 UTC">
            <firewall>
                <family>
                    <inet>
                        <filter>
                            <name>edge-input-v4</name>
                            <interface-specific/>
                            <term inactive="inactive">
                                <name>edge-sampled</name>
                                <then>
                                    <sample/>
                                    <next>term</next>
                                </then>
                            </term>

However the controller ignores this "inactive"

<devices xmlns="http://clicon.org/controller">
   <device>
      <name>juniper1</name>
      <config>
         <configuration xmlns="http://yang.juniper.net/junos/conf/root">
            <system xmlns="http://yang.juniper.net/junos/conf/system">
               <domain-name>qanon.io</domain-name>
            </system>
         </configuration>
      </config>
   </device>
</devices>

...
<devices xmlns="http://clicon.org/controller">
   <device>
      <name>juniper1</name>
      <config>
         <configuration xmlns="http://yang.juniper.net/junos/conf/root">
            <firewall xmlns="http://yang.juniper.net/junos/conf/firewall">
               <family>
                  <inet>
                     <filter>
                        <name>edge-input-v4</name>
                        <interface-specific/>
                        <term>
                           <name>edge-sampled</name>
                           <then>
                              <sample/>
                              <next>term</next>
                           </then>
                        </term>
krihal commented 4 months ago

@denniswa Still valid?

denniswa commented 4 months ago

as far as I know yes

denniswa commented 4 months ago

fat fingered... as far as I know this is still an issue yes

krihal commented 3 months ago

Dennis to test and close.