|
@@ -16,6 +16,7 @@ EXAMPLES = '''
|
|
|
import ConfigParser
|
|
|
import copy
|
|
|
import os
|
|
|
+from distutils.util import strtobool
|
|
|
|
|
|
|
|
|
def hostname_valid(hostname):
|
|
@@ -494,8 +495,10 @@ def set_sdn_facts_if_unset(facts):
|
|
|
were not already present
|
|
|
"""
|
|
|
if 'common' in facts:
|
|
|
+ use_sdn = facts['common']['use_openshift_sdn']
|
|
|
+ if not (use_sdn == '' or isinstance(use_sdn, bool)):
|
|
|
+ facts['common']['use_openshift_sdn'] = bool(strtobool(str(use_sdn)))
|
|
|
if 'sdn_network_plugin_name' not in facts['common']:
|
|
|
- use_sdn = facts['common']['use_openshift_sdn']
|
|
|
plugin = 'redhat/openshift-ovs-subnet' if use_sdn else ''
|
|
|
facts['common']['sdn_network_plugin_name'] = plugin
|
|
|
|