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

Added Feature Profile System Models for UX2 #502

Merged
merged 10 commits into from
Mar 1, 2024

Conversation

jpkrajewski
Copy link
Collaborator

@jpkrajewski jpkrajewski commented Mar 1, 2024

Pull Request summary:

Added system models to SDK.
Added tests for system endpoints.
Added folder for integration tests: catalystwan/integration_tests
Added integration tests for models with default values and fully specified Logging, BFD and Banner

Description of changes:

Added models:

AAAParcel,
BFDParcel,
LoggingParcel,
BannerParcel,
BasicParcel,
GlobalParcel,
NTPParcel,
MRFParcel,
OMPParcel,
SecurityParcel,
SNMPParcel,

Models path: catalystwan/models/configuration/feature_profile/sdwan/system
image

Unit tests for endpoint check if model is correctly assigned to URL path when using POST, PUT, GET, DELETE

Integration tests check if models created using SDK can be consumed by vManage API
Exmaple:

    def test_when_fully_specified_bfd_parcel_expect_successful_post(self):
        # Arrange
        bfd_parcel = BFDParcel(
            parcel_name="BFDFullySpecified",
            parcel_description="BFD Parcel",
        )
        bfd_parcel.set_muliplier(1)
        bfd_parcel.set_poll_interval(700000)
        bfd_parcel.set_default_dscp(51)
        bfd_parcel.add_color(color="lte", hello_interval=300000, multiplier=7, pmtu_discovery=False)
        bfd_parcel.add_color(color="mpls", pmtu_discovery=False)
        bfd_parcel.add_color(color="biz-internet")
        bfd_parcel.add_color(color="public-internet")
        # Act
        parcel_id = self.session.api.sdwan_feature_profiles.system.create(self.profile_id, bfd_parcel).id
        # Assert
        assert parcel_id

How to run integration tests

  1. Set enviroment variables:
    TEST_VMANAGE_URL
    TEST_VMANAGE_PORT
    TEST_VMANAGE_USERNAME
    TEST_VMANAGE_PASSWORD

  2. Run tests using: pytest catalystwan/integration_tests/feature_profile/sdwan/system/test_models.py

Checklist:

  • Make sure to run pre-commit before committing changes
  • Make sure all checks have passed
  • PR description is clear and comprehensive
  • Mentioned the issue that this PR solves (if applicable)
  • Make sure you test the changes

@jpkrajewski jpkrajewski changed the title Dev/system parcels Added Feature Profile System Models for UX2 Mar 1, 2024
@jpkrajewski jpkrajewski marked this pull request as ready for review March 1, 2024 16:03
Copy link
Collaborator

@sbasan sbasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jpkrajewski jpkrajewski merged commit 44dd24e into dev-ux-migration Mar 1, 2024
12 checks passed
@jpkrajewski jpkrajewski deleted the dev/system-parcels branch March 1, 2024 16:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants