diff --git a/changelogs/fragments/466-ospf-area-bugfix.yaml b/changelogs/fragments/466-ospf-area-bugfix.yaml new file mode 100644 index 000000000..e7ec088c5 --- /dev/null +++ b/changelogs/fragments/466-ospf-area-bugfix.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - sonic_ospf_area - Fix OSPF area bug (https://github.com/ansible-collections/dellemc.enterprise_sonic/pull/466). diff --git a/plugins/module_utils/network/sonic/config/ospf_area/ospf_area.py b/plugins/module_utils/network/sonic/config/ospf_area/ospf_area.py index 353ee6e2e..277ae9dd8 100644 --- a/plugins/module_utils/network/sonic/config/ospf_area/ospf_area.py +++ b/plugins/module_utils/network/sonic/config/ospf_area/ospf_area.py @@ -974,10 +974,10 @@ def build_area_stub_delete_requests(self, request_root, commands, have): # actually clearing stuff means deleting area # area having nothing related to stub also ends up in this case. requests will be empty. return True, requests, len(requests) > 0 - elif len(requests) > 0: - # clearing some of the settings in stub but not all - # commands has to be a subset of have and whatever in it is translated into requests - return False, requests, False + + # Not all stub configuration is being deleted. (It is also possible that none of the stub options requested + # for deletion match any current configuration. In that case, no stub configuration is being deleted.) + return False, requests, False def build_area_delete_networks_requests(self, request_root, commands, have): if commands is None: