Junos specific Provider code for "netdev_stdlib". Netdev is a vendor-neutral network abstraction framework developed by Juniper Networks and contributed freely to the DevOps community.
Apache License 2.0
25
stars
14
forks
source link
Diffing when managing multiple vlans is broken #15
netdev_vlan { "testvlan":
vlan_id => 300,
description => "This is a test. Delete me."
}
netdev_vlan { "testvlan2":
vlan_id => 5,
description => "This is a test. Delete me."
}
The diffing text displayed is incorrect when adding or removing more vlans, e.g. when adding testvlan2 you see the following on the first apply:
Notice: Compiled catalog for **************** in environment production in 2.86 seconds
Notice: /Stage[main]/Main/Node[****************]/Netdev_vlan[testvlan2]/vlan_id: vlan_id changed '300' to '5'
Notice: JUNOS:
[edit vlans]
+ testvlan2 {
+ vlan-id 5;
+ }
Notice: JUNOS: OK: COMMIT success!
After the initial apply the following happens on each subsequent run (without changes to the puppet code):
Notice: Compiled catalog for **************** in environment production in 2.83 seconds
Notice: /Stage[main]/Main/Node[****************]/Netdev_vlan[testvlan2]/vlan_id: vlan_id changed '300' to '5'
Error: JUNOS: Unmanaged VLAN interface:
Notice: JUNOS:
Notice: JUNOS: OK: COMMIT success!
Even though this causes a commit, no change is actually applied.
The expected behavior in both cases is correctly identifying that a new vlan is created, and not attempting to recreate/change a vlan subsequent to the apply.
When managing more than a single vlan, e.g.:
The diffing text displayed is incorrect when adding or removing more vlans, e.g. when adding testvlan2 you see the following on the first apply:
After the initial apply the following happens on each subsequent run (without changes to the puppet code):
Even though this causes a commit, no change is actually applied.
The expected behavior in both cases is correctly identifying that a new vlan is created, and not attempting to recreate/change a vlan subsequent to the apply.