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

Commit

Permalink
Dev/acl (#9)
Browse files Browse the repository at this point in the history
* Tailor route policy model for use. Add unit and integration test. Fix tests setup to run session creation once for the whole class

* Fix typo defaulkt to default

* Fix merge mistake - add eigrp back to integration tests

* Add ACLs - ipv4 and ipv6. add intergation test. add unittests

* Fix type annotaion to supported in 3.8

* Add copyright
  • Loading branch information
jpkrajewski authored Apr 10, 2024
1 parent 074b152 commit 9e3286c
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 244 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from catalystwan.api.configuration_groups.parcel import Global, as_global, as_variable
from catalystwan.integration_tests.feature_profile.sdwan.base import TestFeatureProfileModels
from catalystwan.models.configuration.feature_profile.common import Prefix
from catalystwan.models.configuration.feature_profile.sdwan.service.acl import Ipv4AclParcel, Ipv6AclParcel
from catalystwan.models.configuration.feature_profile.sdwan.service.dhcp_server import (
AddressPool,
LanVpnDhcpServerParcel,
Expand Down Expand Up @@ -145,6 +146,28 @@ def test_when_default_values_route_policy_parcel_expect_successful_post(self):
# Assert
assert parcel_id

def test_when_default_values_acl_ipv6_expect_successful_post(self):
# Arrange
acl_ipv6_parcel = Ipv6AclParcel(
parcel_name="TestAclIpv6Parcel",
parcel_description="Test Acl Ipv6 Parcel",
)
# Act
parcel_id = self.api.create_parcel(self.profile_uuid, acl_ipv6_parcel).id
# Assert
assert parcel_id

def test_when_default_values_acl_ipv4_expect_successful_post(self):
# Arrange
acl_ipv4_parcel = Ipv4AclParcel(
parcel_name="TestAclIpv4Parcel",
parcel_description="Test Acl Ipv4 Parcel",
)
# Act
parcel_id = self.api.create_parcel(self.profile_uuid, acl_ipv4_parcel).id
# Assert
assert parcel_id

@classmethod
def tearDownClass(cls) -> None:
cls.api.delete_profile(cls.profile_uuid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pydantic import Field
from typing_extensions import Annotated

from .acl import Ipv4AclParcel, Ipv6AclParcel
from .appqoe import AppqoeParcel
from .dhcp_server import LanVpnDhcpServerParcel
from .eigrp import EigrpParcel
Expand All @@ -25,6 +26,8 @@
Ospfv3IPv6Parcel,
RoutePolicyParcel,
EigrpParcel,
Ipv6AclParcel,
Ipv4AclParcel,
# TrackerGroupData,
# WirelessLanData,
# SwitchportData
Expand Down Expand Up @@ -55,6 +58,8 @@
"RoutePolicyParcel",
"Ospfv3IPv4Parcel",
"Ospfv3IPv6Parcel",
"Ipv6AclParcel",
"Ipv4AclParcel",
"InterfaceSviParcel",
"InterfaceGreParcel",
"AnyServiceParcel",
Expand Down
Loading

0 comments on commit 9e3286c

Please sign in to comment.