From 975cc9b41d29acda7f243211a007129c1554cdf7 Mon Sep 17 00:00:00 2001 From: Joseph Date: Thu, 6 Feb 2025 14:52:58 +0000 Subject: [PATCH] updated to support latest jamfpy --- jamftf/importer.py | 8 ++++---- jamftf/resources.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jamftf/importer.py b/jamftf/importer.py index b374e6c..a5837fc 100644 --- a/jamftf/importer.py +++ b/jamftf/importer.py @@ -15,11 +15,11 @@ class Importer: targetted (List[Resource]): A list of Resource objects to be managed. Args: - client (jamfpy.JamfTenant): The Jamf tenant client used for API interactions. + client (jamfpy.Tenant): The Jamf tenant client used for API interactions. targetted (List[Resource]): A list of Resource objects to be managed. Raises: - AssertionError: If the provided client is not an instance of jamfpy.JamfTenant. + AssertionError: If the provided client is not an instance of jamfpy.Tenant. ImporterConfigError: If the targetted list is empty. Methods: @@ -30,12 +30,12 @@ class Importer: targetted: list[Resource] = None def __init__( self, - client: jamfpy.JamfTenant, + client: jamfpy.Tenant, targetted: List[Resource], debug: bool = False ): - assert isinstance(client, jamfpy.JamfTenant), "incorrect client type" + assert isinstance(client, jamfpy.Tenant), "incorrect client type" if len(targetted) == 0: raise ImporterConfigError("no targets set") diff --git a/jamftf/resources.py b/jamftf/resources.py index e0933e4..5dc4623 100644 --- a/jamftf/resources.py +++ b/jamftf/resources.py @@ -21,7 +21,7 @@ def __init__( self, options: Options = None, validate: bool = True, - client: jamfpy.JamfTenant = None, + client: jamfpy.Tenant = None, debug: bool = False, exclude: list[int] = None ): @@ -130,11 +130,11 @@ def set_debug(self, debug: bool): self.lg.info("log level has been overridden to: %s", self.lg.level) - def set_client(self, client: jamfpy.JamfTenant, refresh_data: bool = False): + def set_client(self, client: jamfpy.Tenant, refresh_data: bool = False): """function to wrap setting of object bound client""" self.lg.debug("setting client...") - assert isinstance(client, jamfpy.JamfTenant), "invalid client type" + assert isinstance(client, jamfpy.Tenant), "invalid client type" self.lg.debug("client type is correct") self.client = client