vcenter provider: set default values

Set default value for the following optional parameters:

- vcenter_port
- vmware_proxy_host
- vmware_proxy_port

This way we won't get an error if they are not define in the
configuration file.
This commit is contained in:
Gonéri Le Bouder 2019-06-27 17:38:33 -04:00
parent 756cdebd37
commit e28bc46353

View file

@ -211,7 +211,10 @@ class VcenterProvider(CloudProvider):
provider='vmware')
def _setup_static(self):
parser = ConfigParser()
parser = ConfigParser({
'vcenter_port': '443',
'vmware_proxy_host': None,
'vmware_proxy_port': None})
parser.read(self.config_static_path)
self.endpoint = parser.get('DEFAULT', 'vcenter_hostname')