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

Commit

Permalink
Mirror model
Browse files Browse the repository at this point in the history
  • Loading branch information
pbanascisco committed Apr 23, 2024
1 parent 4ce4d09 commit 034f7e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .policy.fowarding_class import FowardingClassParcel, FowardingClassQueueEntry
from .policy.ipv6_data_prefix import IPv6DataPrefixEntry, IPv6DataPrefixParcel
from .policy.ipv6_prefix_list import IPv6PrefixListEntry, IPv6PrefixListParcel
from .policy.mirror import MirrorParcel
from .policy.policer import PolicerEntry, PolicerParcel
from .policy.prefered_group_color import Preference, PreferredColorGroupEntry, PreferredColorGroupParcel
from .policy.prefix_list import PrefixListEntry, PrefixListParcel
Expand Down Expand Up @@ -55,6 +56,7 @@
IPv6DataPrefixParcel,
IPv6PrefixListParcel,
LocalDomainParcel,
MirrorParcel,
PolicerParcel,
PreferredColorGroupParcel,
PrefixListParcel,
Expand Down Expand Up @@ -102,6 +104,7 @@
"IPv6PrefixListParcel",
"LocalDomainListEntry",
"LocalDomainParcel",
"MirrorParcel",
"PolicerEntry",
"PolicerParcel",
"Preference",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 Cisco Systems, Inc. and its affiliates

from typing import List, Literal

from pydantic import AliasPath, BaseModel, ConfigDict, Field

from catalystwan.api.configuration_groups.parcel import Global, _ParcelBase


class MirrorEntry(BaseModel):
model_config = ConfigDict(populate_by_name=True)
remote_dest_ip: Global[str] = Field(validation_alias="remoteDestIp", serialization_alias="remoteDestIp")
source_ip: Global[str] = Field(validation_alias="sourceIp", serialization_alias="sourceIp")


class MirrorParcel(_ParcelBase):
type_: Literal["mirror"] = Field(default="mirror", exclude=True)
entries: List[MirrorEntry] = Field(validation_alias=AliasPath("data", "entries"), min_items=1, max_items=1)

0 comments on commit 034f7e3

Please sign in to comment.