diff --git a/wrapanapi/systems/container/podman.py b/wrapanapi/systems/container/podman.py index bd14048e..f3800c95 100644 --- a/wrapanapi/systems/container/podman.py +++ b/wrapanapi/systems/container/podman.py @@ -1,8 +1,8 @@ from abc import ABCMeta from datetime import datetime +from functools import cached_property from podman import PodmanClient -from proto.utils import cached_property from wrapanapi.entities.base import Entity from wrapanapi.systems.base import System diff --git a/wrapanapi/systems/msazure.py b/wrapanapi/systems/msazure.py index 9d4dd9de..50a5ab0c 100644 --- a/wrapanapi/systems/msazure.py +++ b/wrapanapi/systems/msazure.py @@ -5,6 +5,7 @@ import os from datetime import datetime, timedelta +from functools import cached_property import pytz from azure.core.exceptions import HttpResponseError @@ -18,7 +19,6 @@ from azure.mgmt.resource.subscriptions.models import SubscriptionState from azure.mgmt.storage import StorageManagementClient from azure.storage.blob import BlobServiceClient -from cached_property import cached_property from dateutil import parser from msrestazure.azure_exceptions import CloudError from wait_for import wait_for diff --git a/wrapanapi/systems/scvmm.py b/wrapanapi/systems/scvmm.py index 3e288411..ec9cfc7b 100644 --- a/wrapanapi/systems/scvmm.py +++ b/wrapanapi/systems/scvmm.py @@ -7,12 +7,12 @@ import re import time from datetime import datetime +from functools import cached_property from textwrap import dedent import pytz import tzlocal import winrm -from cached_property import cached_property from wait_for import wait_for from wrapanapi.entities import Template, TemplateMixin, Vm, VmMixin, VmState diff --git a/wrapanapi/systems/virtualcenter.py b/wrapanapi/systems/virtualcenter.py index 27c915b3..0b122a56 100644 --- a/wrapanapi/systems/virtualcenter.py +++ b/wrapanapi/systems/virtualcenter.py @@ -11,10 +11,9 @@ import time from datetime import datetime from distutils.version import LooseVersion -from functools import partial +from functools import cached_property, partial import pytz -from cached_property import threaded_cached_property from pyVim.connect import Disconnect, SmartConnect from pyVmomi import vim, vmodl from wait_for import TimedOutError, wait_for @@ -995,13 +994,13 @@ def _create_service_instance(self): self._start_keepalive() return si - @threaded_cached_property + @cached_property def service_instance(self): """An instance of the service""" self.logger.debug("Attempting to initiate vCenter service instance") return self._create_service_instance() - @threaded_cached_property + @cached_property def content(self): self.logger.debug("calling RetrieveContent()... this might take awhile") return self.service_instance.RetrieveContent()