summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall/oo_config.py
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-08-26 10:42:47 -0400
committerGitHub <noreply@github.com>2016-08-26 10:42:47 -0400
commit577195e3eefe19b95e39f0f52834cd3dc8f77cdf (patch)
tree435ba7aa27211183036e2a88ad6222b190ea86f2 /utils/src/ooinstall/oo_config.py
parentb8e72ea2143834317043f19cbc3dddf8ad9047a5 (diff)
parent08016cf607b9111a10acabc118551e6d24e88628 (diff)
downloadopenshift-577195e3eefe19b95e39f0f52834cd3dc8f77cdf.tar.gz
openshift-577195e3eefe19b95e39f0f52834cd3dc8f77cdf.tar.bz2
openshift-577195e3eefe19b95e39f0f52834cd3dc8f77cdf.tar.xz
openshift-577195e3eefe19b95e39f0f52834cd3dc8f77cdf.zip
Merge pull request #2363 from tbielawa/pep8_fixes_for_quick_installer
Pep8 fixes for quick installer
Diffstat (limited to 'utils/src/ooinstall/oo_config.py')
-rw-r--r--utils/src/ooinstall/oo_config.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py
index 0e855f437..b9f0cc65c 100644
--- a/utils/src/ooinstall/oo_config.py
+++ b/utils/src/ooinstall/oo_config.py
@@ -18,7 +18,7 @@ CONFIG_PERSIST_SETTINGS = [
'version',
'variant',
'variant_version',
- ]
+]
DEPLOYMENT_VARIABLES_BLACKLIST = [
'hosts',
@@ -28,6 +28,7 @@ DEPLOYMENT_VARIABLES_BLACKLIST = [
DEFAULT_REQUIRED_FACTS = ['ip', 'public_ip', 'hostname', 'public_hostname']
PRECONFIGURED_REQUIRED_FACTS = ['hostname', 'public_hostname']
+
def print_read_config_error(error, path='the configuration file'):
message = """
Error loading config. {}.
@@ -103,7 +104,6 @@ class Host(object):
def is_storage(self):
return 'storage' in self.roles
-
def is_etcd_member(self, all_hosts):
""" Will this host be a member of a standalone etcd cluster. """
if not self.is_master():
@@ -189,7 +189,7 @@ class OOConfig(object):
with open(self.config_path, 'r') as cfgfile:
loaded_config = yaml.safe_load(cfgfile.read())
- if not 'version' in loaded_config:
+ if 'version' not in loaded_config:
print_read_config_error('Legacy configuration file found', self.config_path)
sys.exit(0)
@@ -242,7 +242,6 @@ class OOConfig(object):
for name, variables in role_list.iteritems():
self.deployment.roles.update({name: Role(name, variables)})
-
except IOError, ferr:
raise OOConfigFileError('Cannot open config file "{}": {}'.format(ferr.filename,
ferr.strerror))
@@ -251,7 +250,6 @@ class OOConfig(object):
'Config file "{}" is not a valid YAML document'.format(self.config_path))
installer_log.debug("Parsed the config file")
-
def _upgrade_v1_config(self, config):
new_config_data = {}
new_config_data['deployment'] = {}
@@ -396,7 +394,6 @@ class OOConfig(object):
print "Error persisting settings: {}".format(e)
sys.exit(0)
-
return p_settings
def yaml(self):