diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-09-12 22:29:13 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-09-12 22:29:13 +0000 |
commit | 98221216d210a4b4180bb3a22b63f417843a388e (patch) | |
tree | dcbd8c7250252ae296d28b48ee3f98db934ad60c | |
parent | 0a74abe15510e0ce6dea5091d48a8ce0eb7e0de5 (diff) | |
parent | 102f1d2546e90be7dd5a488a61f6eabaf2f84aaa (diff) | |
download | designate-98221216d210a4b4180bb3a22b63f417843a388e.tar.gz |
Merge "Infoblox backend:Fixed sslverify value from option"
-rw-r--r-- | designate/backend/impl_infoblox/connector.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/designate/backend/impl_infoblox/connector.py b/designate/backend/impl_infoblox/connector.py index a6332835..9dfd1e67 100644 --- a/designate/backend/impl_infoblox/connector.py +++ b/designate/backend/impl_infoblox/connector.py @@ -18,6 +18,7 @@ import json as jsonutils from oslo_log import log +from oslo_utils import strutils from six.moves.urllib import parse import requests @@ -48,6 +49,18 @@ class Infoblox(object): other_opts = ['sslverify', 'network_view', 'dns_view', 'multi_tenant'] for opt in reqd_opts + other_opts: + if opt == 'sslverify': + # NOTE(selvakumar): This check is for sslverify option. + # type of sslverify is unicode string from designate DB + # if the value is 0 getattr called for setting default values. + # to avoid setting default values we use oslo strutils + if not strutils.is_int_like(options.get(opt)): + option_value = options.get(opt) + else: + option_value = strutils.bool_from_string(options.get(opt), + default=True) + setattr(self, opt, option_value) + continue setattr(self, opt, options.get(opt) or getattr(config, opt)) for opt in reqd_opts: |