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

Commit

Permalink
Changed numeric value to enum
Browse files Browse the repository at this point in the history
  • Loading branch information
tzietkow committed Jan 20, 2023
1 parent f0141bb commit 3188d53
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pydantic import validator # type: ignore

from vmngclient.api.templates.feature_template import FeatureTemplate
from vmngclient.api.templates.payloads.aaa.aaa_model import VpnType
from vmngclient.session import vManageSession


Expand Down Expand Up @@ -66,7 +67,7 @@ class CiscoVPNModel(FeatureTemplate):

@validator("vpn_id")
def check_id(cls, v, values):
if v not in [0, 512]:
if v not in [VpnType.VPN_TRANSPORT.value, VpnType.VPN_MANAGMENT.value]:
if "tenant_org_name" not in values:
raise ValueError("Must enter the name of the organization.")
return v
Expand Down

0 comments on commit 3188d53

Please sign in to comment.