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

model fixes #504

Merged
merged 1 commit into from
Mar 1, 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
5 changes: 4 additions & 1 deletion catalystwan/models/configuration/config_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from catalystwan.models.configuration.feature_profile.common import FeatureProfileCreationPayload
from catalystwan.models.configuration.feature_profile.sdwan.policy_object import AnyPolicyObjectParcel
from catalystwan.models.configuration.feature_profile.sdwan.system import AnySystemParcel
from catalystwan.models.configuration.topology_group import TopologyGroup
from catalystwan.models.policy import (
AnyPolicyDefinition,
AnyPolicyList,
Expand Down Expand Up @@ -69,9 +70,11 @@ class UX1Config(BaseModel):


class UX2Config(BaseModel):
# All UX2 Configuration items - Mega Model
# All UX2 Configuration items - Mega Model
model_config = ConfigDict(populate_by_name=True)
topology_groups: List[TopologyGroup] = Field(
default=[], serialization_alias="topologyGroups", validation_alias="topologyGroups"
)
config_groups: List[ConfigGroup] = Field(
default=[], serialization_alias="configurationGroups", validation_alias="configurationGroups"
)
Expand Down
13 changes: 13 additions & 0 deletions catalystwan/models/configuration/topology_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from typing import List, Literal, Optional
from uuid import UUID

from pydantic import BaseModel, Field


class TopologyGroup(BaseModel):
name: str
solution: Literal["sdwan"] = "sdwan"
profiles: List[UUID] = []
from_topology_group: Optional[UUID] = Field(
default=None, serialization_alias="fromTopologyGroup", validation_alias="fromTopologyGroup"
)
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.31.0dev3"
version = "0.31.0dev4"
description = "Cisco Catalyst WAN SDK for Python"
authors = ["kagorski <[email protected]>"]
readme = "README.md"
Expand Down
Loading