Fixes issue where uppercase named A_Record delete was getting skipped (#51592)
* Fixes issue where uppercase named A_Record delete was getting skipped (#51539)
* fixes 51193
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
* fixes 51193
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
* fixes 51193
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 15cef845ca
)
* shippable fix
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
parent
22c4745b96
commit
483aa64216
2 changed files with 7 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- Fixes bug where nios_a_record wasn't getting deleted if an uppercase named a_record was being passed. (https://github.com/ansible/ansible/pull/51539)
|
|
@ -356,6 +356,11 @@ class WapiModule(WapiBase):
|
||||||
test_obj_filter = dict([('name', name)])
|
test_obj_filter = dict([('name', name)])
|
||||||
else:
|
else:
|
||||||
test_obj_filter = dict([('name', name), ('view', obj_filter['view'])])
|
test_obj_filter = dict([('name', name), ('view', obj_filter['view'])])
|
||||||
|
elif (ib_obj_type == NIOS_A_RECORD):
|
||||||
|
# resolves issue where a_record with uppercase name was returning null and was failing
|
||||||
|
test_obj_filter = obj_filter
|
||||||
|
test_obj_filter['name'] = test_obj_filter['name'].lower()
|
||||||
|
# check if test_obj_filter is empty copy passed obj_filter
|
||||||
else:
|
else:
|
||||||
test_obj_filter = dict([('name', name)])
|
test_obj_filter = dict([('name', name)])
|
||||||
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=ib_spec.keys())
|
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=ib_spec.keys())
|
||||||
|
|
Loading…
Reference in a new issue