This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
# Copyright 2024 Cisco Systems, Inc. and its affiliates | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
|
||
class DeviceListResponse(BaseModel): | ||
data: dict = Field(..., alias="data") | ||
|
||
def get_amp_down(self) -> list: | ||
return self.data["amp_down"] | ||
|
||
def get_amp_up(self) -> list: | ||
return self.data["amp_up"] | ||
|
||
def get_ips_down(self) -> list: | ||
return self.data["ips_down"] | ||
|
||
def get_ips_up(self) -> list: | ||
return self.data["ips_up"] | ||
|
||
def get_urlf_down(self) -> list: | ||
return self.data["urlf_down"] | ||
|
||
def get_urlf_up(self) -> list: | ||
return self.data["urlf_up"] | ||
|
||
def get_zbfw_down(self) -> list: | ||
return self.data["zbfw_down"] | ||
|
||
def get_zbfw_up(self) -> list: | ||
return self.data["zbfw_up"] | ||
from typing import List | ||
|
||
|
||
class SecurityPolicyDeviceList(BaseModel): | ||
#data: dict = Field(..., alias="data") | ||
amp_down: List[str] = Field(..., alias="amp_down") | ||
amp_up: List[str] = Field(..., alias="amp_up") | ||
ips_down: List[str] = Field(..., alias="ips_down") | ||
ips_up: List[str] = Field(..., alias="ips_up") | ||
urlf_down: List[str] = Field(..., alias="urlf_down") | ||
urlf_up: List[str] = Field(..., alias="urlf_up") | ||
zbfw_down: List[str] = Field(..., serialization_alias="zbfw_down", validation_alias="zbfw_down") | ||
zbfw_up: List[str] = Field(..., serialization_alias="zbfw_up", validation_alias="zbfw_up") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters