diff --git a/catalystwan/models/configuration/feature_profile/common.py b/catalystwan/models/configuration/feature_profile/common.py index a9d1c1a1..b1d30422 100644 --- a/catalystwan/models/configuration/feature_profile/common.py +++ b/catalystwan/models/configuration/feature_profile/common.py @@ -194,9 +194,7 @@ class WANIPv4StaticRoute(BaseModel): gateway: Global[Literal["nextHop", "null0", "dhcp"]] = Field( default=Global(value="nextHop"), serialization_alias="gateway", validation_alias="gateway" ) - next_hops: Optional[List[NextHop]] = Field( - default_factory=list, serialization_alias="nextHop", validation_alias="nextHop" - ) + next_hops: Optional[List[NextHop]] = Field(default=None, serialization_alias="nextHop", validation_alias="nextHop") distance: Optional[Global[int]] = Field(default=None, serialization_alias="distance", validation_alias="distance") def set_to_next_hop( diff --git a/catalystwan/models/configuration/feature_profile/sdwan/system/logging_parcel.py b/catalystwan/models/configuration/feature_profile/sdwan/system/logging_parcel.py index e13ead03..e70dbb4f 100644 --- a/catalystwan/models/configuration/feature_profile/sdwan/system/logging_parcel.py +++ b/catalystwan/models/configuration/feature_profile/sdwan/system/logging_parcel.py @@ -81,11 +81,9 @@ class LoggingParcel(_ParcelBase): populate_by_name=True, ) disk: Disk = Field(default_factory=Disk, validation_alias=AliasPath("data", "disk")) - tls_profile: Optional[List[TlsProfile]] = Field( - default_factory=list, validation_alias=AliasPath("data", "tlsProfile") - ) - server: Optional[List[Server]] = Field(default_factory=list, validation_alias=AliasPath("data", "server")) - ipv6_server: Optional[List[Server]] = Field(default_factory=list, validation_alias=AliasPath("data", "ipv6Server")) + tls_profile: Optional[List[TlsProfile]] = Field(default=None, validation_alias=AliasPath("data", "tlsProfile")) + server: Optional[List[Server]] = Field(default=None, validation_alias=AliasPath("data", "server")) + ipv6_server: Optional[List[Server]] = Field(default=None, validation_alias=AliasPath("data", "ipv6Server")) def set_disk(self, enable: bool, disk_file_size: int = 10, disk_file_rotate: int = 10): self.disk.disk_enable = as_global(enable) diff --git a/catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py b/catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py index 6c818f2d..8bb837d2 100644 --- a/catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py +++ b/catalystwan/models/configuration/feature_profile/sdwan/topology/custom_control.py @@ -181,7 +181,7 @@ class Actions(BaseModel): class Sequence(BaseModel): model_config = ConfigDict(populate_by_name=True) - actions: Optional[List[Actions]] = Field(default_factory=list) + actions: Optional[List[Actions]] = Field(default=None) base_action: Optional[Global[AcceptRejectActionType]] = Field( default=None, validation_alias="baseAction", serialization_alias="baseAction" ) diff --git a/catalystwan/models/policy/definition/url_filtering.py b/catalystwan/models/policy/definition/url_filtering.py index d033030b..1d5b4ad6 100644 --- a/catalystwan/models/policy/definition/url_filtering.py +++ b/catalystwan/models/policy/definition/url_filtering.py @@ -41,7 +41,7 @@ class UrlFilteringDefinition(BaseModel): logging: List[str] = Field(default_factory=list) enable_alerts: bool = Field(validation_alias="enableAlerts", serialization_alias="enableAlerts") alerts: Set[UrlFilteringAlerts] = Field( - default_factory=list, validation_alias="alerts", serialization_alias="alerts" + default_factory=set, validation_alias="alerts", serialization_alias="alerts" ) target_vpns: List[VpnId] = Field( default_factory=list, validation_alias="targetVpns", serialization_alias="targetVpns" diff --git a/catalystwan/models/policy/list/identity.py b/catalystwan/models/policy/list/identity.py index ef6aeb9c..d57dd51d 100644 --- a/catalystwan/models/policy/list/identity.py +++ b/catalystwan/models/policy/list/identity.py @@ -9,8 +9,8 @@ class IdentityListEntry(BaseModel): model_config = ConfigDict(populate_by_name=True) - user: str = Field(default=None) - user_group: str = Field(default=None, validation_alias="userGroup", serialization_alias="userGroup") + user: str + user_group: str = Field(validation_alias="userGroup", serialization_alias="userGroup") class IdentityList(PolicyListBase):