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

Fixes for netdev_lag resource #30

Closed mahant3sh closed 5 years ago

mahant3sh commented 5 years ago

This commit fixes 2 issues: 1) Invalid interface type for netdev_lag - This was happening because the interface name is passed as a single-element array. Netconf expects an interface name string. This patch extracts the string from the array and constructs an XML element out of it. Fixed in set_cookie_links function. 2) When existing interfaces of a lag were deleted or new ones added in the puppet manifest file, the update was not happening correctly. This was due to an incorrect order of propagation of update. Delete must happen before adding. This was fixed in xml_change_links function.

Apart from these 2 fixes, a new function, trim_ifd(str) was added. This function trims the bracket and double quotes from stringized array objects.