Allow DNS bypass for add/remove of host records with nios_host_record (#42934)

* fixes issue 42420

* fixes issue 42420

* fix shippable docs error

* shippable fix and test case add

* shippable fix and test case add

* shippable fix and test case add

* shippable fix

* removing extra assert

* shippable fix
This commit is contained in:
Sumit Jaiswal 2018-08-01 10:33:58 +05:30 committed by GitHub
parent e2cac8cc93
commit 01fb7ea150
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 113 additions and 11 deletions

View file

@ -327,7 +327,11 @@ class WapiModule(WapiBase):
update = True
return ib_obj, update, new_name
if (ib_obj_type == NIOS_HOST_RECORD):
test_obj_filter = dict([('name', name), ('view', obj_filter['view'])])
# to check only by name if dns bypassing is set
if not obj_filter['configure_for_dns']:
test_obj_filter = dict([('name', name)])
else:
test_obj_filter = dict([('name', name), ('view', obj_filter['view'])])
else:
test_obj_filter = dict([('name', name)])
ib_obj = self.get_object(ib_obj_type, test_obj_filter.copy(), return_fields=ib_spec.keys())