Hi all -
I'm observing strange behavior from annet when calling generators with different tags.
So, we have several generators (I've only shown the relevant ones for brevity):
$ annet show generators -g interface
| PARTIAL-Class | Tags | Module | Description |
|-----------------+----------------------------+--------------------------------------------------+---------------------------------------------------------------|
...skip
| SpanningTree | interface, stp | zoo_fabric_generators.interfaces.spanning_tree | Generate STP config for interfaces of Leaf switches |
| StormControl | interface, storm | zoo_fabric_generators.interfaces.storm_control | Generate storm control config for interfaces of Leaf switches |
...skip...
Running the command annet patch -g stp nexus-03 produces the following output:
# -------------------- nexus-03.patch --------------------
interface port-channel47
spanning-tree port type edge trunk
spanning-tree bpduguard enable
spanning-tree bpdufilter enable
exit
interface Ethernet1/47
spanning-tree port type edge trunk
spanning-tree bpduguard enable
spanning-tree bpdufilter enable
exit
interface Ethernet1/51
spanning-tree port type network
exit
interface Ethernet1/52
spanning-tree port type network
exit
Running the command annet patch -g storm nexus-03 produces the following output:
# -------------------- nexus-03.patch --------------------
interface port-channel47
storm-control broadcast level 20.00
storm-control multicast level 30.00
storm-control unicast level 50.00
storm-control action shutdown
exit
interface Ethernet1/47
storm-control broadcast level 20.00
storm-control multicast level 30.00
storm-control unicast level 50.00
storm-control action shutdown
exit
But annet patch -g interface nexus-03 doesn't produce the combined result (why??):
# -------------------- nexus-03.patch --------------------
interface port-channel47
spanning-tree port type edge trunk
spanning-tree bpduguard enable
spanning-tree bpdufilter enable
storm-control broadcast level 20.00
storm-control multicast level 30.00
storm-control unicast level 50.00
storm-control action shutdown
exit
interface Ethernet1/2
no switchport
exit
I'll provide the generator code if needed.
In debug, I can see that the SpanningTree and StormControl generators are being called with the -g interface tag.
What could be wrong? Can you guide me on where to look?
Hi all -
I'm observing strange behavior from annet when calling generators with different tags.
So, we have several generators (I've only shown the relevant ones for brevity):
Running the command
annet patch -g stp nexus-03produces the following output:Running the command
annet patch -g storm nexus-03produces the following output:But
annet patch -g interface nexus-03doesn't produce the combined result (why??):I'll provide the generator code if needed.
In debug, I can see that the SpanningTree and StormControl generators are being called with the -g interface tag.
What could be wrong? Can you guide me on where to look?