From ec4bf5e7165945f71ee7b32ce0798f5d2faedcb5 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 19 Jul 2022 12:23:26 +0200 Subject: [PATCH] Getting VMWare/VSPhere objects now from package fb_vmware --- lib/cr_tf/handler.py | 14 +++++--------- requirements.txt | 1 + 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 5309e46..05d5ab4 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -42,16 +42,12 @@ import six # Own modules from fb_tools.common import pp, to_bool, to_str, RE_DOT_AT_END - from fb_tools.errors import HandlerError, ExpectedHandlerError, CommandNotFoundError - from fb_tools.handling_obj import HandlingObject, CalledProcessError - from fb_tools.handler import BaseHandler -from fb_tools.vsphere.server import VsphereServer - -from fb_tools.vsphere.errors import VSphereExpectedError +from fb_vmware.errors import VSphereExpectedError +from fb_vmware.connect import VsphereConnection from fb_pdnstools.server import PowerDNSServer from fb_pdnstools.errors import PowerDNSHandlerError @@ -787,11 +783,11 @@ class CreateTerraformHandler(BaseHandler): params_out = copy.copy(params) if self.verbose < 5: params_out['password'] = '******' - msg = _("Initialising a {}-object with params:").format('VsphereServer') + msg = _("Initialising a {}-object with params:").format('VsphereConnection') msg += '\n' + pp(params_out) LOG.debug(msg) - vsphere = VsphereServer(**params) + vsphere = VsphereConnection(**params) self.vsphere[vname] = vsphere except VSphereExpectedError as e: @@ -811,7 +807,7 @@ class CreateTerraformHandler(BaseHandler): vsphere.get_about() if self.verbose > 2: - msg = _("Created {}-object:").format('VsphereServer') + msg = _("Created {}-object:").format('VsphereConnection') msg += '\n' + pp(vsphere.as_dict()) LOG.debug(msg) diff --git a/requirements.txt b/requirements.txt index 134e639..7d15fd3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ setuptools fb_logging fb_tools fb_pdnstools +fb_vmware -- 2.39.5