Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

dev: sync with 0.36.1 #856

Merged
merged 20 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ENDPOINTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**THIS FILE WAS AUTO-GENERATED DO NOT EDIT**

Generated for: catalystwan-0.36.0.dev5
Generated for: catalystwan-0.36.1.dev0

All URIs are relative to */dataservice*
HTTP request | Supported Versions | Method | Payload Type | Return Type | Tenancy Mode
Expand Down
28 changes: 11 additions & 17 deletions catalystwan/api/mtt_aaa_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ def __init__(self, session: ManagerSession) -> None:
def __str__(self) -> str:
return str(self.session)

@property
def tenant_id(self):
return self.session.get_tenant_id()

def aaa_exists(self) -> bool:
return True if self.session.get_data(self.url_path) else False

Expand All @@ -67,7 +63,7 @@ def get_aaa(self) -> TenantAAA:
:param aaa:
:return:
"""
logger.debug(f"AAA config {self.tenant_id}.")
logger.debug("AAA config")
tenant_aaa = self.session.get_data(self.url_path)
# return tenant_aaa
return create_dataclass(TenantAAA, tenant_aaa)
Expand All @@ -79,8 +75,8 @@ def del_aaa(self):
:return:
"""
if not self.aaa_exists():
raise AAAConfigNotPresent(f"No AAA config present for Tenant id={self.tenant_id}")
logger.debug(f"Delete AAA config on tenant_id={self.tenant_id}.")
raise AAAConfigNotPresent("No AAA config present for Tenant")
logger.debug("Delete AAA config on tenant")
return self.session.delete(self.url_path)

@status_ok
Expand All @@ -101,7 +97,6 @@ class TenantRadiusAPI:
def __init__(self, session: ManagerSession) -> None:
self.session = session
self.url_path = "/dataservice/admin/radius"
self.tenant_id = self.session.get_tenant_id()

def __str__(self) -> str:
return str(self.session)
Expand All @@ -113,7 +108,7 @@ def add_radius(self, radius_server: TenantRadiusServer):
:param radius_server:
:return:
"""
logger.debug(f"Add RADIUS config tenant_id={self.tenant_id}.")
logger.debug("Add RADIUS config")
data = asdict(radius_server) # type: ignore
return self.session.post(url=self.url_path, json=data)

Expand All @@ -124,7 +119,7 @@ def put_radius(self, radius_server: TenantRadiusServer):
:param radius_server:
:return:
"""
logger.debug(f"Update RADIUS config tenant_id={self.tenant_id}.")
logger.debug("Update RADIUS config")
data = asdict(radius_server) # type: ignore
return self.session.put(url=self.url_path, json=data)

Expand All @@ -135,15 +130,15 @@ def delete_radius(self):
:param radius_server:
:return: True|False
"""
logger.debug(f"Delete RADIUS config tenant_id={self.tenant_id}.")
logger.debug("Delete RADIUS config")
return self.session.delete(self.url_path)

def get_radius(self) -> TenantRadiusServer:
"""
Retrieve Radius server
:return: TenantRadiusServer
"""
logger.debug(f"RADIUS config tenant_id={self.tenant_id}.")
logger.debug("RADIUS config")
data = self.session.get_data(self.url_path)
return create_dataclass(TenantRadiusServer, data)

Expand All @@ -156,7 +151,6 @@ class TenantTacacsAPI:
def __init__(self, session: ManagerSession) -> None:
self.session = session
self.url_path = "/dataservice/admin/tacacs"
self.tenant_id = self.session.get_tenant_id()

def __str__(self) -> str:
return str(self.session)
Expand All @@ -168,7 +162,7 @@ def add_tacacs(self, tacacs_server: TenantTacacsServer):
:param tacacs_server:
:return:
"""
logger.debug(f"TACACS config tenant_id={self.tenant_id}.")
logger.debug("TACACS config")
data = asdict(tacacs_server) # type: ignore
return self.session.post(url=self.url_path, json=data)

Expand All @@ -179,7 +173,7 @@ def put_tacacs(self, tacacs_server: TenantTacacsServer):
:param tacacs_server:
:return:
"""
logger.debug(f"Update TACACS config tenant_id={self.tenant_id}.")
logger.debug("Update TACACS config")
data = asdict(tacacs_server) # type: ignore
return self.session.put(url=self.url_path, json=data)

Expand All @@ -190,14 +184,14 @@ def delete_tacacs(self):
:param tacacs_server:
:return: True|False
"""
logger.debug(f"Delete TACACS config tenant_id={self.tenant_id}.")
logger.debug("Delete TACACS config")
return self.session.delete(self.url_path)

def get_tacacs(self) -> TenantTacacsServer:
"""
Retrieves Tacacs server
:return: TenantTacacsServer
"""
logger.debug(f"TACACS config tenant_id={self.tenant_id}.")
logger.debug("TACACS config")
data = self.session.get_data(self.url_path)
return create_dataclass(TenantTacacsServer, data)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "catalystwan"
version = "0.36.0dev6"
version = "0.36.1dev0"
description = "Cisco Catalyst WAN SDK for Python"
authors = ["kagorski <[email protected]>"]
readme = "README.md"
Expand Down