diff --git a/catalystwan/api/mtt_aaa_api.py b/catalystwan/api/mtt_aaa_api.py index 13051511..5c73c150 100644 --- a/catalystwan/api/mtt_aaa_api.py +++ b/catalystwan/api/mtt_aaa_api.py @@ -42,14 +42,6 @@ def __str__(self) -> str: def aaa_exists(self) -> bool: return True if self.session.get_data(self.url_path) else False - @property - def tenant_org_name(self): - """ - Get the tenant org name - :return: - """ - return self.endpoints.configuration_settings.get_organizations().first().org - @status_ok def add_aaa(self, tenant_aaa: TenantAAA): """ " @@ -71,7 +63,7 @@ def get_aaa(self) -> TenantAAA: :param aaa: :return: """ - logger.debug(f"AAA config {self.tenant_org_name}") + logger.debug("AAA config") tenant_aaa = self.session.get_data(self.url_path) # return tenant_aaa return create_dataclass(TenantAAA, tenant_aaa) @@ -83,8 +75,8 @@ def del_aaa(self): :return: """ if not self.aaa_exists(): - raise AAAConfigNotPresent(f"No AAA config present for Tenant {self.tenant_org_name}") - logger.debug(f"Delete AAA config on tenant {self.tenant_org_name}") + raise AAAConfigNotPresent("No AAA config present for Tenant") + logger.debug("Delete AAA config on tenant") return self.session.delete(self.url_path) @status_ok @@ -124,7 +116,7 @@ def add_radius(self, radius_server: TenantRadiusServer): :param radius_server: :return: """ - logger.debug(f"Add RADIUS config {self.tenant_org_name}") + logger.debug("Add RADIUS config") data = asdict(radius_server) # type: ignore return self.session.post(url=self.url_path, json=data) @@ -135,7 +127,7 @@ def put_radius(self, radius_server: TenantRadiusServer): :param radius_server: :return: """ - logger.debug(f"Update RADIUS config {self.tenant_org_name}") + logger.debug("Update RADIUS config") data = asdict(radius_server) # type: ignore return self.session.put(url=self.url_path, json=data) @@ -146,7 +138,7 @@ def delete_radius(self): :param radius_server: :return: True|False """ - logger.debug(f"Delete RADIUS config {self.tenant_org_name}") + logger.debug("Delete RADIUS config") return self.session.delete(self.url_path) def get_radius(self) -> TenantRadiusServer: @@ -154,7 +146,7 @@ def get_radius(self) -> TenantRadiusServer: Retrieve Radius server :return: TenantRadiusServer """ - logger.debug(f"RADIUS config {self.tenant_org_name}") + logger.debug("RADIUS config") data = self.session.get_data(self.url_path) return create_dataclass(TenantRadiusServer, data) @@ -186,7 +178,7 @@ def add_tacacs(self, tacacs_server: TenantTacacsServer): :param tacacs_server: :return: """ - logger.debug(f"TACACS config {self.tenant_org_name}") + logger.debug("TACACS config") data = asdict(tacacs_server) # type: ignore return self.session.post(url=self.url_path, json=data) @@ -197,7 +189,7 @@ def put_tacacs(self, tacacs_server: TenantTacacsServer): :param tacacs_server: :return: """ - logger.debug(f"Update TACACS config {self.tenant_org_name}") + logger.debug("Update TACACS config") data = asdict(tacacs_server) # type: ignore return self.session.put(url=self.url_path, json=data) @@ -208,7 +200,7 @@ def delete_tacacs(self): :param tacacs_server: :return: True|False """ - logger.debug(f"Delete TACACS config {self.tenant_org_name}") + logger.debug("Delete TACACS config") return self.session.delete(self.url_path) def get_tacacs(self) -> TenantTacacsServer: