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

Commit

Permalink
Add default None values to the Tier model (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzeG authored and sbasan committed Apr 22, 2024
1 parent 843cd54 commit 6ecdf14
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions catalystwan/api/templates/payloads/tenant/tenant_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class Tenant(BaseModel):

organization_name: str
tier_name: str
tenant_info: Optional[TenantInfo]
tier_info: Optional[TierInfo]
tenant_info: Optional[TenantInfo] = None
tier_info: Optional[TierInfo] = None


class TenantModel(FeatureTemplate):
Expand Down
20 changes: 13 additions & 7 deletions catalystwan/endpoints/monitoring_device_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,28 @@ class Tier(BaseModel):
vpn: int
rid: int = Field(serialization_alias="@rid", validation_alias="@rid")
ipv4_route_limit_type: Optional[str] = Field(
serialization_alias="ipv4RouteLimitType", validation_alias="ipv4RouteLimitType"
default=None, serialization_alias="ipv4RouteLimitType", validation_alias="ipv4RouteLimitType"
)
ipv4_route_limit_threshold: Optional[int] = Field(
serialization_alias="ipv4RouteLimitThreshold", validation_alias="ipv4RouteLimitThreshold"
default=None, serialization_alias="ipv4RouteLimitThreshold", validation_alias="ipv4RouteLimitThreshold"
)
ipv4_route_limit: Optional[int] = Field(
default=None, serialization_alias="ipv4RouteLimit", validation_alias="ipv4RouteLimit"
)
ipv4_route_limit: Optional[int] = Field(serialization_alias="ipv4RouteLimit", validation_alias="ipv4RouteLimit")
ipv6_route_limit_type: Optional[str] = Field(
serialization_alias="ipv6RouteLimitType", validation_alias="ipv6RouteLimitType"
default=None, serialization_alias="ipv6RouteLimitType", validation_alias="ipv6RouteLimitType"
)
ipv6_route_limit_threshold: Optional[int] = Field(
serialization_alias="ipv6RouteLimitThreshold", validation_alias="ipv6RouteLimitThreshold"
default=None, serialization_alias="ipv6RouteLimitThreshold", validation_alias="ipv6RouteLimitThreshold"
)
ipv6_route_limit: Optional[int] = Field(
default=None, serialization_alias="ipv6RouteLimit", validation_alias="ipv6RouteLimit"
)
ipv6_route_limit: Optional[int] = Field(serialization_alias="ipv6RouteLimit", validation_alias="ipv6RouteLimit")
tlocs: List[TLOC] = Field(default=[])
# New in 20.12 version
nat_session_limit: Optional[int] = Field(serialization_alias="natSessionLimit", validation_alias="natSessionLimit")
nat_session_limit: Optional[int] = Field(
default=None, serialization_alias="natSessionLimit", validation_alias="natSessionLimit"
)


class DeviceData(BaseModel):
Expand Down
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.33.0dev0"
version = "0.33.2"
description = "Cisco Catalyst WAN SDK for Python"
authors = ["kagorski <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 6ecdf14

Please sign in to comment.