From f760e382a8e4a7a02e3bdefa19044f0b6d23bf24 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 23 Oct 2018 12:35:14 +0200 Subject: [PATCH] Adding cluster configuration --- lib/cr_vmware_tpl/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cr_vmware_tpl/config.py b/lib/cr_vmware_tpl/config.py index 735c340..048e29e 100644 --- a/lib/cr_vmware_tpl/config.py +++ b/lib/cr_vmware_tpl/config.py @@ -19,7 +19,7 @@ import six # Own modules from fb_tools.config import ConfigError, BaseConfiguration -__version__ = '0.6.1' +__version__ = '0.6.2' LOG = logging.getLogger(__name__) @@ -41,6 +41,7 @@ class CrTplConfiguration(BaseConfiguration): default_vsphere_host = 'vcs01.ppbrln.internal' default_vsphere_port = 443 default_vsphere_user = 'root' + default_vsphere_cluster = 'vmcc-l105-01' default_dc = 'vmcc' default_folder = 'templates' default_template_vm = 'template.pixelpark.com' @@ -65,6 +66,7 @@ class CrTplConfiguration(BaseConfiguration): self.vsphere_host = self.default_vsphere_host self.vsphere_port = self.default_vsphere_port self.vsphere_user = self.default_vsphere_user + self.vsphere_cluster = self.default_vsphere_cluster self.dc = self.default_dc self.password = None self.folder = self.default_folder @@ -135,6 +137,7 @@ class CrTplConfiguration(BaseConfiguration): res['default_vsphere_host'] = self.default_vsphere_host res['default_vsphere_port'] = self.default_vsphere_port res['default_vsphere_user'] = self.default_vsphere_user + res['default_vsphere_cluster'] = self.default_vsphere_cluster res['default_dc'] = self.default_dc res['default_folder'] = self.default_folder res['default_template_vm'] = self.default_template_vm @@ -194,6 +197,9 @@ class CrTplConfiguration(BaseConfiguration): elif key.lower() == 'password': self.password = value continue + elif key.lower() == 'cluster': + self.vsphere_cluster = value + continue elif key.lower() == 'folder': self.folder = value elif key.lower() == 'dc': -- 2.39.5