Juniper / puppet-netdev-stdlib-junos

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

Error in swapping vlans across interface in MX device #6

Open Jainpriyal opened 9 years ago

Jainpriyal commented 9 years ago

Initially I configured two interface ge-0/0/0 and ge-0/0/1 part of Red vlan(vlan-d 510) and Blue vlan (vlan id 520)

% puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
ldapname is deprecated and will be removed in a future version
Info: Caching catalog for choc-mx240-b.englab.juniper.net
Info: Applying configuration version '1416298411'
Notice: /Stage[main]/Main/Netdev_l2_interface[ge-0/0/1]/ensure: created
Notice: /Stage[main]/Main/Netdev_l2_interface[ge-0/0/0]/ensure: created
Info: JUNOS: Committing 2 changes.
Notice: JUNOS: 

[edit interfaces ge-0/0/0]
+   flexible-vlan-tagging;
+   encapsulation flexible-ethernet-services;
+   unit 0 {
+       description "l2-interface ge-0/0/0 part of Red vlan";
+       family bridge {
+           interface-mode trunk;
+           vlan-id-list 510;
+       }
+   }
[edit interfaces ge-0/0/1]
+   flexible-vlan-tagging;
+   encapsulation flexible-ethernet-services;
+   unit 0 {
+       description "l2-interface ge-0/0/1 part of Blue vlan";
+       family bridge {
+           interface-mode trunk;
+           vlan-id-list 520;
+       }
+   }

Notice: JUNOS: OK: COMMIT success!
Notice: Finished catalog run in 3.10 seconds

When I am swapping interface across vlans it is giving error, Could not evaluate: Unknown VLAN by tag-id: 520 !

% puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
ldapname is deprecated and will be removed in a future version
Info: Caching catalog for choc-mx240-b.englab.juniper.net
Info: Applying configuration version '1416298463'
Error: /Stage[main]/Main/Netdev_l2_interface[ge-0/0/1]: Could not evaluate: Unknown VLAN by tag-id: 520 !
Notice: /Stage[main]/Main/Netdev_l2_interface[ge-0/0/0]/description: description changed 'l2-interface ge-0/0/0 part of Red vlan' to 'l2-interface ge-0/0/0 after swapping is part of Blue Vlan'
Notice: /Stage[main]/Main/Netdev_l2_interface[ge-0/0/0]/tagged_vlans: tagged_vlans changed '[Red]' to '[Blue]'
Info: JUNOS: Committing 1 changes.
Notice: JUNOS: 

[edit interfaces ge-0/0/0 unit 0]
-    description "l2-interface ge-0/0/0 part of Red vlan";
+    description "l2-interface ge-0/0/0 after swapping is part of Blue Vlan";
[edit interfaces ge-0/0/0 unit 0 family bridge]
-      interface-mode trunk;
-      vlan-id-list 510;
+      interface-mode trunk;
+      vlan-id-list 520;

Notice: JUNOS: OK: COMMIT success!
Notice: Finished catalog run in 2.79 seconds

Swapping vlans across interface is working fine in other devices ( qfx, EX4200, EX4300)