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

Commit

Permalink
Dev/policy object (#463)
Browse files Browse the repository at this point in the history
* Migration - Software and Versions

* Start

* Create models

* Annotate a entries for ApplicationList

* Change = to :

* data prefix parcel example with enveloping

* Reduce boilerplate, add default field to Global, demo progress

* Fix typo

* POST, DELETE, PUT. Functional demo. Fix UUID assignment

* Security Groups. Working added models to the demo

* GET functions, overload added, changed Parcel class to take data from server and prase it to a model

* Start

* Create models

* Annotate a entries for ApplicationList

* Change = to :

* data prefix parcel example with enveloping

* Reduce boilerplate, add default field to Global, demo progress

* Fix typo

* POST, DELETE, PUT. Functional demo. Fix UUID assignment

* Security Groups. Working added models to the demo

* GET functions, overload added, changed Parcel class to take data from server and prase it to a model

* Delete flake8 noqa

* Create builders for models. Update demo script

* remove ProtocolTypeEnum

* Create builders for models. Update demo script

* Change Interest Group to Policy Object

---------

Co-authored-by: Kuba <[email protected]>
Co-authored-by: sbasan <[email protected]>
Co-authored-by: Szymon Basan <[email protected]>
  • Loading branch information
4 people authored Feb 19, 2024
1 parent db86a6b commit 95184f4
Show file tree
Hide file tree
Showing 32 changed files with 1,788 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[flake8]
per-file-ignores = catalystwan/models/policy/__init__.py: F401
per-file-ignores =
catalystwan/models/policy/__init__.py: F401
catalystwan/models/configuration/feature_profile/sdwan/policy_object/__init__.py: F401
max-line-length = 120
inline-quotes = double
# https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
Expand Down
4 changes: 3 additions & 1 deletion catalystwan/api/configuration_groups/parcel.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class ParcelAttribute(BaseModel):
# https://github.com/pydantic/pydantic/discussions/6090
# Usage: Global[str](value="test")
class Global(ParcelAttribute, Generic[T]):
option_type: OptionType = OptionType.GLOBAL
option_type: OptionType = Field(
default=OptionType.GLOBAL, serialization_alias="optionType", validation_alias="optionType"
)
value: T

def __len__(self) -> int:
Expand Down
Loading

0 comments on commit 95184f4

Please sign in to comment.