from fb_tools.handler import BaseHandler
from fb_vmware.errors import VSphereExpectedError
+from fb_vmware.config import VSPhereConfigInfo
from fb_vmware.connect import VsphereConnection
from fb_pdnstools.server import PowerDNSServer
'appname': self.appname,
'verbose': self.verbose,
'base_dir': self.base_dir,
- 'host': self.config.vsphere[vname].host,
- 'port': self.config.vsphere[vname].port,
- 'user': self.vsphere_user,
- 'password': self.vsphere_password,
- 'dc': self.config.vsphere[vname].dc,
'simulate': self.simulate,
'force': self.force,
'terminal_has_colors': self.terminal_has_colors,
'initialized': True,
}
+ show_params = copy.copy(params)
+
+ connect_info = VSPhereConfigInfo(
+ appname=self.appname, verbose=self.verbose, base_dir=self.base_dir,
+ host=self.config.vsphere[vname].host, port=self.config.vsphere[vname].port,
+ dc=self.config.vsphere[vname].dc, user=self.vsphere_user,
+ password=self.vsphere_password, initialized=True)
+
+ params['connect_info'] = connect_info
+ show_params['connect_info'] = connect_info.as_dict()
+
if self.verbose > 1:
- params_out = copy.copy(params)
if self.verbose < 5:
- params_out['password'] = '******'
+ show_params['connect_info']['password'] = '******'
msg = _("Initialising a {}-object with params:").format('VsphereConnection')
- msg += '\n' + pp(params_out)
+ msg += '\n' + pp(show_params)
LOG.debug(msg)
vsphere = VsphereConnection(**params)