From 3188d53724a2837f0d354c2b5b273d31f4d80345 Mon Sep 17 00:00:00 2001 From: "Tomasz Zietkowski -X (tzietkow - CODILIME SP ZOO at Cisco)" Date: Fri, 20 Jan 2023 11:08:40 +0100 Subject: [PATCH] Changed numeric value to enum --- vmngclient/api/templates/payloads/cisco_vpn/cisco_vpn_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmngclient/api/templates/payloads/cisco_vpn/cisco_vpn_model.py b/vmngclient/api/templates/payloads/cisco_vpn/cisco_vpn_model.py index ff085c6ca..485bceda5 100644 --- a/vmngclient/api/templates/payloads/cisco_vpn/cisco_vpn_model.py +++ b/vmngclient/api/templates/payloads/cisco_vpn/cisco_vpn_model.py @@ -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 @@ -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