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

Commit

Permalink
AMP model (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbanascisco authored Apr 23, 2024
1 parent 07ec120 commit 8e44e9c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from .policy.sla_class import FallbackBestTunnel, SLAAppProbeClass, SLAClassCriteria, SLAClassListEntry, SLAClassParcel
from .policy.standard_community import StandardCommunityEntry, StandardCommunityParcel
from .policy.tloc_list import TlocEntry, TlocParcel
from .security.amp import AdvancedMalwareProtectionParcel
from .security.application_list import (
SecurityApplicationFamilyListEntry,
SecurityApplicationListEntry,
Expand All @@ -36,6 +37,7 @@

AnyPolicyObjectParcel = Annotated[
Union[
AdvancedMalwareProtectionParcel,
URLParcel,
ApplicationListParcel,
AppProbeParcel,
Expand Down Expand Up @@ -65,6 +67,7 @@
]

__all__ = (
"AdvancedMalwareProtectionParcel",
"AnyPolicyObjectParcel",
"ApplicationFamilyListEntry",
"ApplicationListEntry",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2024 Cisco Systems, Inc. and its affiliates

from typing import List, Literal

from pydantic import AliasPath, Field

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

FileReputationServer = Literal["nam", "eur", "apjc"]
FileReputationAlert = Literal["critical", "warning", "info"]
FileAnalysisServer = Literal["nam", "eur"]
FileAnalysisAlert = Literal["critical", "warning", "info"]


class AdvancedMalwareProtectionParcel(_ParcelBase):
type_: Literal["unified/advanced-malware-protection"] = Field(
default="unified/advanced-malware-protection", exclude=True
)
description: str = "advancedMalwareProtection"
match_all_vpn: Global[bool] = Field(
default=Global[bool](value=True), validation_alias=AliasPath("data", "matchAllVpn")
)
file_reputation_cloud_server: Global[FileReputationServer] = Field(
validation_alias=AliasPath("data", "fileReputationCloudServer")
)
file_reputation_est_server: Global[FileReputationServer] = Field(
validation_alias=AliasPath("data", "fileReputationEstServer")
)
file_reputation_alert: Global[FileReputationAlert] = Field(
default=Global[FileReputationAlert](value="critical"), validation_alias=AliasPath("data", "fileReputationAlert")
)
file_analysis_enabled: Global[bool] = Field(
default=Global[bool](value=False), validation_alias=AliasPath("data", "fileAnalysisEnabled")
)
file_analysis_cloud_server: Global[FileAnalysisServer] = Field(
default=None, validation_alias=AliasPath("data", "fileAnalysisCloudServer")
)
file_analysis_file_types: Global[List[str]] = Field(
default=None, validation_alias=AliasPath("data", "fileAnalysisFileTypes")
)
file_analysis_alert: Global[FileAnalysisAlert] = Field(
default=None, validation_alias=AliasPath("data", "fileAnalysisAlert")
)

0 comments on commit 8e44e9c

Please sign in to comment.