Resolve get_dns_view error after selecting multi-tenant view

Adds a second comparison check when deciding whether to display the single
tenant view or multi-tenant view in Infoblox. The issue is that the DB field
is set to '0', which is not interpreted as false.

Change-Id: Id0fac71cc6d82123a7ee5d5983467acd1b8e5a9e
Closes-Bug: 1752349
This commit is contained in:
Russell Tweed 2018-03-07 16:30:36 +00:00
parent dd611a025e
commit e4de365775
1 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,8 @@ class InfobloxObjectManipulator(object):
return dns_view
def get_dns_view(self, tenant):
if not self.connector.multi_tenant:
if (not self.connector.multi_tenant or
self.connector.multi_tenant == '0'):
return self.connector.dns_view
else:
# Look for the network view with the specified TenantID EA