You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement more Network Resource Module states in the sonic network resource modules.
The states are described here: https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html
Implement replaced, overridden and gathered states for the sonic network resource modules.
Example on how it works in the ansible documentation: https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html#using-network-resource-modules
See the table on the right for the replaced vs merged outcome.
This will make it possible to have a more declarative style playbooks without a lot of state handling.
Right now the network resource modules will only merge or delete, which means i need to read out existing config for for example vlans, check ansible vars what should be on the switch and the do a set comparison to delete and add vlans as needed.
If the replace method was implemented this complexity would be implemented in the network resource module instead of my playbook or ansible code.
ISSUE TYPE
Feature Idea
COMPONENT NAME
sonic_vlans
sonic_vrfs
sonic_vxlans
sonic_interfaces
sonic_l2_interfaces
sonic_l3_interfaces
sonic_lag_interfaces
etc
ADDITIONAL INFORMATION
It would make it easier to have more declarative ansible playbooks and reduce a lot of complexity when you want device config mirroring ansible device variables. without replace state deletion is added complexity I do not want or need.
Also, this would make these network resource modules more in line with ansible reference documentation and it would be more like feature parity with other network resource module collections.
- name: replaces given VLAN attributes with the device configurationdellemc.enterprise_sonic.sonic_vlans:
config:
- vlan_id: 10
- vlan_id: 20state: replaced
This would make sure only vlan 10 and vlan 20 is configured and all others are removed.
The text was updated successfully, but these errors were encountered:
We agree that this request needs to be addressed and have put it on our list of work items.
Some of our current resource modules do provide functionality beyond "merge" and "delete", but these other states have not been consistently implemented across all of our resource modules.
Implementation of the "replaced" state is at the top of our list for new states to be supported across all resource modules. We will also add implementation of "overidden" state as a high priority.
We are currently adding some new resource modules that are required in order to provide Ansible configuration capability for all of the commonly deployed configuration categories. We intend to provide support for the "replaced" state from the start for these new modules. We will add "replaced" and "overidden" state support to the other resource modules after completing our release of the additional required resource modules.
SUMMARY
Implement more Network Resource Module states in the sonic network resource modules.
The states are described here: https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html
Implement replaced, overridden and gathered states for the sonic network resource modules.
Example on how it works in the ansible documentation: https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html#using-network-resource-modules
See the table on the right for the replaced vs merged outcome.
This will make it possible to have a more declarative style playbooks without a lot of state handling.
Right now the network resource modules will only merge or delete, which means i need to read out existing config for for example vlans, check ansible vars what should be on the switch and the do a set comparison to delete and add vlans as needed.
If the replace method was implemented this complexity would be implemented in the network resource module instead of my playbook or ansible code.
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
It would make it easier to have more declarative ansible playbooks and reduce a lot of complexity when you want device config mirroring ansible device variables. without replace state deletion is added complexity I do not want or need.
Also, this would make these network resource modules more in line with ansible reference documentation and it would be more like feature parity with other network resource module collections.
This would make sure only vlan 10 and vlan 20 is configured and all others are removed.
The text was updated successfully, but these errors were encountered: