From bd53d3e92b7ee6428598bf18c783dee8ac09af4e Mon Sep 17 00:00:00 2001
From: Jakub Krajewski <95274389+jpkrajewski@users.noreply.github.com>
Date: Mon, 15 Jul 2024 14:17:20 +0200
Subject: [PATCH] Revert "dev-uxmt: Feature Templates rework"
---
README.md | 20 +-
catalystwan/api/template_api.py | 81 +-
catalystwan/api/templates/README.md | 108 +-
catalystwan/api/templates/cli_template.py | 24 +-
.../device_template/device_template.py | 36 +-
.../device_template_payload.json.j2 | 6 +-
catalystwan/api/templates/feature_template.py | 6 +-
catalystwan/api/templates/models/aaa_model.py | 387 --
.../api/templates/models/cisco_aaa_model.py | 332 +-
.../templates/models/cisco_banner_model.py | 13 +-
.../api/templates/models/cisco_bfd_model.py | 67 +-
.../api/templates/models/cisco_bgp_model.py | 513 +--
.../templates/models/cisco_logging_model.py | 123 +-
.../api/templates/models/cisco_ntp_model.py | 49 +-
.../api/templates/models/cisco_omp_model.py | 130 +-
.../api/templates/models/cisco_ospf.py | 217 +-
.../api/templates/models/cisco_ospfv3.py | 312 +-
.../models/cisco_secure_internet_gateway.py | 425 +--
.../api/templates/models/cisco_snmp_model.py | 118 +-
.../api/templates/models/cisco_system.py | 365 +-
.../models/cisco_vpn_interface_model.py | 907 ++---
.../api/templates/models/cisco_vpn_model.py | 704 ++--
.../api/templates/models/cli_template.py | 5 +-
.../api/templates/models/omp_vsmart_model.py | 56 +-
.../templates/models/security_vsmart_model.py | 19 +-
catalystwan/api/templates/models/supported.py | 14 +-
.../templates/models/system_vsmart_model.py | 191 +-
.../models/vpn_vsmart_interface_model.py | 198 -
.../api/templates/models/vpn_vsmart_model.py | 124 -
catalystwan/dataclasses.py | 52 +
.../configuration_general_template.py | 31 -
.../configuration_template_master.py | 35 -
catalystwan/endpoints/endpoints_container.py | 4 -
.../test_find_template_values.py | 2 +-
catalystwan/models/common.py | 493 ---
.../models/configuration/config_migration.py | 8 +-
.../feature_profile/sdwan/system/basic.py | 2 +-
catalystwan/models/templates.py | 48 +-
.../test_data/feature_templates/dhcp.py | 3 +-
.../test_data/feature_templates/interface.py | 12 +-
.../test_data/feature_templates/ospfv3.py | 3 +-
.../test_data/feature_templates/vpn.py | 9 +-
.../test_device_template_with_info.py | 62 +-
.../tests/config_migration/test_transform.py | 118 +-
..._basic.json => Basic_Cisco_VPN_Model.json} | 4 +-
.../templates/definitions/aaa_basic.json | 96 -
.../templates/definitions/aaa_complex.json | 464 ---
.../{cisco_banner.json => banner_1.json} | 0
.../definitions/cisco_aaa_complex.json | 361 --
.../definitions/cisco_logging_complex.json | 268 --
.../definitions/cisco_ntp_complex.json | 143 -
.../definitions/cisco_omp_complex.json | 175 -
.../definitions/cisco_ospf_complex.json | 302 --
.../templates/definitions/cisco_sig.json | 405 --
.../definitions/cisco_snmp_complex.json | 258 --
.../definitions/cisco_system_complex.json | 502 ---
.../cisco_vpn_interface_complex.json | 821 ----
.../templates/definitions/complex_aaa.json | 277 ++
...pn_complex.json => complex_cisco_vpn.json} | 39 +-
.../definitions/{cisco_aaa.json => iuo.json} | 59 +-
.../tests/templates/definitions/omp_1.json | 11 +
.../{omp_vsmart_2.json => omp_2.json} | 18 +-
.../{omp_vsmart_3.json => omp_3.json} | 18 +-
.../templates/definitions/omp_vsmart_1.json | 26 -
.../definitions/omp_vsmart_complex.json | 73 -
.../definitions/security_vsmart_complex.json | 24 -
.../definitions/system_vsmart_complex.json | 193 -
.../definitions/vpn_vsmart_basic.json | 17 -
.../definitions/vpn_vsmart_complex.json | 179 -
.../vpn_vsmart_interface_basic.json | 42 -
.../vpn_vsmart_interface_complex.json | 208 -
.../tests/templates/models/__init__.py | 59 +-
catalystwan/tests/templates/models/aaa.py | 105 -
.../tests/templates/models/cisco_aaa.py | 129 +-
.../tests/templates/models/cisco_banner.py | 4 +-
.../tests/templates/models/cisco_bfd.py | 10 +-
.../tests/templates/models/cisco_logging.py | 65 -
.../tests/templates/models/cisco_ntp.py | 17 -
.../tests/templates/models/cisco_omp.py | 37 -
.../tests/templates/models/cisco_ospf.py | 59 -
.../models/cisco_secure_internet_gateway.py | 94 -
.../tests/templates/models/cisco_snmp.py | 40 -
.../tests/templates/models/cisco_system.py | 111 +-
.../tests/templates/models/cisco_vpn.py | 114 +-
.../templates/models/cisco_vpn_interface.py | 200 -
.../tests/templates/models/omp_vsmart.py | 36 +-
.../tests/templates/models/security_vsmart.py | 11 -
.../tests/templates/models/system_vsmart.py | 37 -
.../tests/templates/models/vpn_vsmart.py | 32 -
.../templates/models/vpn_vsmart_interface.py | 54 -
catalystwan/tests/templates/schemas/aaa.json | 1096 ------
.../tests/templates/schemas/cedge_aaa.json | 2 +-
.../templates/schemas/cisco_logging.json | 577 ---
.../tests/templates/schemas/cisco_ntp.json | 265 --
.../tests/templates/schemas/cisco_omp.json | 479 ---
.../tests/templates/schemas/cisco_ospf.json | 908 -----
.../cisco_secure_internet_gateway.json | 1520 --------
.../tests/templates/schemas/cisco_snmp.json | 561 ---
.../tests/templates/schemas/cisco_system.json | 242 --
.../tests/templates/schemas/cisco_vpn.json | 54 +-
.../schemas/cisco_vpn_interface.json | 3348 -----------------
.../tests/templates/schemas/omp-vsmart.json | 20 -
.../templates/schemas/security-vsmart.json | 58 -
.../templates/schemas/system-vsmart.json | 2585 -------------
.../schemas/vpn-vsmart-interface.json | 859 -----
.../tests/templates/schemas/vpn-vsmart.json | 445 ---
.../tests/templates/test_chose_model.py | 16 +-
.../tests/templates/test_deserialize_model.py | 8 +-
catalystwan/tests/test_cli_template.py | 17 +-
catalystwan/tests/test_templates.py | 33 +-
.../converters/feature_template/basic.py | 2 +-
.../feature_template/cloud_credentials.py | 2 +-
.../feature_template/parcel_factory.py | 6 +-
.../utils/config_migration/steps/transform.py | 38 +-
catalystwan/utils/device_model.py | 88 +
catalystwan/utils/timezone.py | 422 +++
.../backup_restore_device_templates.py | 466 ---
catalystwan/workflows/config_migration.py | 34 +-
118 files changed, 2748 insertions(+), 24032 deletions(-)
delete mode 100644 catalystwan/api/templates/models/aaa_model.py
delete mode 100644 catalystwan/api/templates/models/vpn_vsmart_interface_model.py
delete mode 100644 catalystwan/api/templates/models/vpn_vsmart_model.py
delete mode 100644 catalystwan/endpoints/configuration_general_template.py
delete mode 100644 catalystwan/endpoints/configuration_template_master.py
rename catalystwan/tests/templates/definitions/{cisco_vpn_basic.json => Basic_Cisco_VPN_Model.json} (88%)
delete mode 100644 catalystwan/tests/templates/definitions/aaa_basic.json
delete mode 100644 catalystwan/tests/templates/definitions/aaa_complex.json
rename catalystwan/tests/templates/definitions/{cisco_banner.json => banner_1.json} (100%)
delete mode 100644 catalystwan/tests/templates/definitions/cisco_aaa_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_logging_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_ntp_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_omp_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_ospf_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_sig.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_snmp_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_system_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json
create mode 100644 catalystwan/tests/templates/definitions/complex_aaa.json
rename catalystwan/tests/templates/definitions/{cisco_vpn_complex.json => complex_cisco_vpn.json} (96%)
rename catalystwan/tests/templates/definitions/{cisco_aaa.json => iuo.json} (78%)
create mode 100644 catalystwan/tests/templates/definitions/omp_1.json
rename catalystwan/tests/templates/definitions/{omp_vsmart_2.json => omp_2.json} (63%)
rename catalystwan/tests/templates/definitions/{omp_vsmart_3.json => omp_3.json} (77%)
delete mode 100644 catalystwan/tests/templates/definitions/omp_vsmart_1.json
delete mode 100644 catalystwan/tests/templates/definitions/omp_vsmart_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/security_vsmart_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/system_vsmart_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/vpn_vsmart_basic.json
delete mode 100644 catalystwan/tests/templates/definitions/vpn_vsmart_complex.json
delete mode 100644 catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json
delete mode 100644 catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json
delete mode 100644 catalystwan/tests/templates/models/aaa.py
delete mode 100644 catalystwan/tests/templates/models/cisco_logging.py
delete mode 100644 catalystwan/tests/templates/models/cisco_ntp.py
delete mode 100644 catalystwan/tests/templates/models/cisco_omp.py
delete mode 100644 catalystwan/tests/templates/models/cisco_ospf.py
delete mode 100644 catalystwan/tests/templates/models/cisco_secure_internet_gateway.py
delete mode 100644 catalystwan/tests/templates/models/cisco_snmp.py
delete mode 100644 catalystwan/tests/templates/models/cisco_vpn_interface.py
delete mode 100644 catalystwan/tests/templates/models/security_vsmart.py
delete mode 100644 catalystwan/tests/templates/models/system_vsmart.py
delete mode 100644 catalystwan/tests/templates/models/vpn_vsmart.py
delete mode 100644 catalystwan/tests/templates/models/vpn_vsmart_interface.py
delete mode 100644 catalystwan/tests/templates/schemas/aaa.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_logging.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_ntp.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_omp.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_ospf.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_snmp.json
delete mode 100644 catalystwan/tests/templates/schemas/cisco_vpn_interface.json
delete mode 100644 catalystwan/tests/templates/schemas/security-vsmart.json
delete mode 100644 catalystwan/tests/templates/schemas/system-vsmart.json
delete mode 100644 catalystwan/tests/templates/schemas/vpn-vsmart-interface.json
delete mode 100644 catalystwan/tests/templates/schemas/vpn-vsmart.json
create mode 100644 catalystwan/utils/device_model.py
create mode 100644 catalystwan/utils/timezone.py
delete mode 100644 catalystwan/workflows/backup_restore_device_templates.py
diff --git a/README.md b/README.md
index e7f3292d..b8d5d1d6 100644
--- a/README.md
+++ b/README.md
@@ -391,25 +391,6 @@ migrate_task.wait_for_completed()
```
-
- Feature Templates (click to expand)
-
-```python
-from catalystwan.api.templates.models.omp_vsmart_model import OMPvSmart
-
-omp_vsmart = OMPvSmart(
- name="my_first_template",
- description="NA",
- device_models=["vsmart"]
-
-)
-
-session.api.templates.create(omp_vsmart)
-```
-
-More details about how to use and how to add new: [Feature Templates README.md](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/catalystwan/api/templates/README.md)
-
-
### Note:
To remove `InsecureRequestWarning`, you can include in your scripts (warning is suppressed when `catalystwan_devel` environment variable is set):
```Python
@@ -432,6 +413,7 @@ except ManagerHTTPError as error:
## [Supported API endpoints](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/ENDPOINTS.md)
+
## [Contributing, bug reporting and feature requests](https://github.com/cisco-open/cisco-catalyst-wan-sdk/blob/main/CONTRIBUTING.md)
## Seeking support
diff --git a/catalystwan/api/template_api.py b/catalystwan/api/template_api.py
index 113a0989..692e0cf5 100644
--- a/catalystwan/api/template_api.py
+++ b/catalystwan/api/template_api.py
@@ -8,7 +8,6 @@
from typing import TYPE_CHECKING, Any, Optional, Type, overload
from ciscoconfparse import CiscoConfParse # type: ignore
-from typing_extensions import deprecated
from catalystwan.api.task_status_api import Task
from catalystwan.api.templates.cli_template import CLITemplate
@@ -20,7 +19,6 @@
from catalystwan.api.templates.feature_template import FeatureTemplate
from catalystwan.api.templates.feature_template_field import FeatureTemplateField
from catalystwan.api.templates.feature_template_payload import FeatureTemplatePayload
-from catalystwan.api.templates.models.aaa_model import AAAModel
from catalystwan.api.templates.models.cisco_aaa_model import CiscoAAAModel
from catalystwan.api.templates.models.cisco_banner_model import CiscoBannerModel
from catalystwan.api.templates.models.cisco_bfd_model import CiscoBFDModel
@@ -39,15 +37,13 @@
from catalystwan.api.templates.models.omp_vsmart_model import OMPvSmart
from catalystwan.api.templates.models.security_vsmart_model import SecurityvSmart
from catalystwan.api.templates.models.system_vsmart_model import SystemVsmart
-from catalystwan.api.templates.models.vpn_vsmart_interface_model import VpnVsmartInterfaceModel
-from catalystwan.api.templates.models.vpn_vsmart_model import VpnVsmartModel
-from catalystwan.dataclasses import Device, FeatureTemplatesTypes
+from catalystwan.dataclasses import Device, DeviceTemplateInfo, FeatureTemplateInfo, FeatureTemplatesTypes, TemplateInfo
from catalystwan.endpoints.configuration_device_template import FeatureToCLIPayload
-from catalystwan.exceptions import AttachedError, CatalystwanDeprecationWarning, TemplateNotFoundError
-from catalystwan.models.common import DeviceModel
-from catalystwan.models.templates import DeviceTemplateInformation, FeatureTemplateInformation, TemplateInformation
+from catalystwan.exceptions import AttachedError, TemplateNotFoundError
+from catalystwan.models.templates import DeviceTemplateInformation, FeatureTemplateInformation
from catalystwan.response import ManagerResponse
from catalystwan.typed_list import DataSequence
+from catalystwan.utils.device_model import DeviceModel
from catalystwan.utils.dict import merge
from catalystwan.utils.pydantic_field import get_extra_field
from catalystwan.utils.template_type import TemplateType
@@ -79,15 +75,15 @@ def __init__(self, session: ManagerSession) -> None:
self.session = session
@overload
- def get(self, template: Type[DeviceTemplate]) -> DataSequence[DeviceTemplateInformation]:
+ def get(self, template: Type[DeviceTemplate]) -> DataSequence[DeviceTemplateInfo]: # type: ignore
...
@overload
- def get(self, template: Type[FeatureTemplate]) -> DataSequence[FeatureTemplateInformation]:
+ def get(self, template: Type[FeatureTemplate]) -> DataSequence[FeatureTemplateInfo]: # type: ignore
...
@overload
- def get(self, template: Type[CLITemplate]) -> DataSequence[TemplateInformation]:
+ def get(self, template: Type[CLITemplate]) -> DataSequence[TemplateInfo]: # type: ignore
...
def get(self, template):
@@ -105,15 +101,26 @@ def get(self, template):
def _get_feature_templates(
self,
summary: bool = True,
- ) -> DataSequence[FeatureTemplateInformation]:
+ offset: Optional[int] = None,
+ limit: Optional[int] = None,
+ ) -> DataSequence[FeatureTemplateInfo]:
"""In a multitenant vManage system, this API is only available in the Provider view."""
- return self.session.endpoints.configuration_general_template.get_feature_template_list(params={"summary": True})
+ endpoint = "/dataservice/template/feature"
+ params = {"summary": summary}
+
+ fr_templates = self.session.get(url=endpoint, params=params)
+
+ return fr_templates.dataseq(FeatureTemplateInfo)
def _get_device_templates(
self, feature: DeviceTemplateFeature = DeviceTemplateFeature.ALL
- ) -> DataSequence[DeviceTemplateInformation]:
+ ) -> DataSequence[DeviceTemplateInfo]:
"""In a multitenant vManage system, this API is only available in the Provider view."""
- return self.session.endpoints.configuration_template_master.get_device_template_list(params=feature.value)
+ endpoint = "/dataservice/template/device"
+ params = {"feature": feature.value}
+
+ templates = self.session.get(url=endpoint, params=params)
+ return templates.dataseq(DeviceTemplateInfo)
def attach(self, name: str, device: Device, timeout_seconds: int = 300, **kwargs):
template_type = self.get(DeviceTemplate).filter(name=name).single_or_default().config_type
@@ -169,19 +176,17 @@ def get_device_specific_variables(name: str):
}
invalid = False
- msg = {}
for var in vars:
if var.property not in payload["deviceTemplateList"][0]["device"][0]:
pointer = payload["deviceTemplateList"][0]["device"][0]
if var.property not in kwargs["device_specific_vars"]:
invalid = True
- msg[var.property] = "should be provided in attach method as device_specific_vars kwarg."
logger.error(f"{var.property} should be provided in attach method as device_specific_vars kwarg.")
else:
pointer[var.property] = kwargs["device_specific_vars"][var.property] # type: ignore
if invalid:
- raise TypeError(f"{msg}")
+ raise TypeError()
endpoint = "/dataservice/template/device/config/attachfeature"
logger.info(f"Attaching a template: {name} to the device: {device.hostname}.")
@@ -376,7 +381,7 @@ def edit(self, template):
def _edit_device_template(self, template: DeviceTemplate):
self._create_device_template(template, True)
- def _edit_feature_template(self, template: FeatureTemplate, data: FeatureTemplateInformation) -> ManagerResponse:
+ def _edit_feature_template(self, template: FeatureTemplate, data: FeatureTemplateInfo) -> ManagerResponse:
if self.is_created_by_generator(template):
debug = False
schema = self.get_feature_template_schema(template, debug)
@@ -433,9 +438,6 @@ def create(self, template, debug: bool = False):
logger.info(f"Template {template.template_name} ({template_type}) was created successfully ({template_id}).")
return template_id
- @deprecated(
- "Obsolete way to use Feature Templates - only create_by_generator", category=CatalystwanDeprecationWarning
- )
def _create_feature_template(self, template: FeatureTemplate) -> str:
payload = template.generate_payload(self.session)
response = self.session.post("/dataservice/template/feature", json=json.loads(payload))
@@ -452,8 +454,8 @@ def _create_cli_template(self, template: CLITemplate) -> str:
def _create_device_template(self, device_template: DeviceTemplate, edit: bool = False) -> str:
def get_general_template_info(
- name: str, fr_templates: DataSequence[FeatureTemplateInformation]
- ) -> FeatureTemplateInformation:
+ name: str, fr_templates: DataSequence[FeatureTemplateInfo]
+ ) -> FeatureTemplateInfo:
_template = fr_templates.filter(name=name).single_or_default()
if not _template:
@@ -463,19 +465,19 @@ def get_general_template_info(
def parse_general_template(
general_template: GeneralTemplate,
- fr_templates: DataSequence[FeatureTemplateInformation],
+ fr_templates: DataSequence[FeatureTemplateInfo],
) -> GeneralTemplate:
- if general_template.sub_templates:
- general_template.sub_templates = [
- parse_general_template(_t, fr_templates) for _t in general_template.sub_templates
+ if general_template.subTemplates:
+ general_template.subTemplates = [
+ parse_general_template(_t, fr_templates) for _t in general_template.subTemplates
]
if general_template.name:
info = get_general_template_info(general_template.name, fr_templates)
return GeneralTemplate(
name=general_template.name,
- sub_templates=general_template.sub_templates,
- template_id=info.id,
- template_type=info.template_type,
+ subTemplates=general_template.subTemplates,
+ templateId=info.id,
+ templateType=info.template_type,
)
else:
return general_template
@@ -495,14 +497,9 @@ def parse_general_template(
payload = json.loads(device_template.generate_payload())
response = self.session.put(f"/dataservice/template/device/{template_id}", json=payload)
else:
- # endpoint = "/dataservice/template/device/feature/"
- # response = self.session.post(endpoint, json=payload)
+ endpoint = "/dataservice/template/device/feature/"
payload = json.loads(device_template.generate_payload())
- response = (
- self.session.endpoints.configuration_template_master.create_device_template_from_feature_templates(
- payload=payload
- )
- )
+ response = self.session.post(endpoint, json=payload)
return response.text
@@ -512,7 +509,6 @@ def is_created_by_generator(self, template: FeatureTemplate) -> bool:
Method will be deleted if every template's payload will be generated dynamically.
"""
ported_templates = (
- AAAModel,
CiscoAAAModel,
CiscoBFDModel,
CiscoBannerModel,
@@ -531,8 +527,6 @@ def is_created_by_generator(self, template: FeatureTemplate) -> bool:
CliTemplateModel,
CiscoSecureInternetGatewayModel,
CiscoOspfv3Model,
- VpnVsmartModel,
- VpnVsmartInterfaceModel,
)
return isinstance(template, ported_templates)
@@ -563,7 +557,7 @@ def generate_feature_template_payload(
name=template.template_name,
description=template.template_description,
template_type=template.type,
- device_types=[device_model for device_model in template.device_models],
+ device_types=[device_model.value for device_model in template.device_models],
definition={},
) # type: ignore
@@ -573,7 +567,6 @@ def generate_feature_template_payload(
for field in fr_template_fields:
value = None
priority_order = None
- json_dumped_value = None
# TODO How to discover Device specific variable
if field.key in template.device_specific_variables:
value = template.device_specific_variables[field.key]
@@ -611,7 +604,7 @@ def validate_device_model(self, template: FeatureTemplate) -> bool:
available_devices_for_template = [device["name"] for device in template_type.device_models]
provided_device_models = [
- dev_mod if type(dev_mod) is DeviceModel else dev_mod for dev_mod in template.device_models
+ dev_mod.value if type(dev_mod) is DeviceModel else dev_mod for dev_mod in template.device_models
]
if not all(dev in available_devices_for_template for dev in provided_device_models):
diff --git a/catalystwan/api/templates/README.md b/catalystwan/api/templates/README.md
index 3ec9aeec..f6fa53df 100644
--- a/catalystwan/api/templates/README.md
+++ b/catalystwan/api/templates/README.md
@@ -3,12 +3,10 @@
## Feature Template Creation
```python
-from catalystwan.api.templates.models.omp_vsmart_model import OMPvSmart
-
omp_vsmart = OMPvSmart(
name="my_first_template",
description="NA",
- device_models=["vsmart"]
+ device_models=[DeviceModel.VSMART]
)
@@ -16,86 +14,74 @@ session.api.templates.create(omp_vsmart)
```
## Add new Feature Template in Cisco Catalyst WAN SDK
+These steps will help you to automate feature template creation. We'll explain what to do and why, so everyone will have deep understanding how our templates work. In the example we will try to create `OMP` Feature Template for vSmart.
-These steps will help you to automate feature template creation. We'll explain what to do and why, so everyone will have deep understanding how our templates work. In the example we will try to create `OMP` Feature Template for vSmart.
-
-1. Get your template type name and version.
+1. Get your template type name and version.
>Note: display name is not template type name!
-
- For example, you could extract it from response body. Go to your Manager and create any template which you would like to automate in catalystwan. Send template creation request and check for `templateType` and `templateMinVersion` variable names. `OMP` (display name) for vSmart has `omp-vsmart` template type name.
2. With corresponding `templateType` we are able to create new class which implements `FeatureTemplate` interface. Create new file in `catalystwan\api\templates\models\` and copy-paste the code and change name of the class with its type attribute.
-```python
-from pathlib import Path
-from typing import ClassVar
-from pydantic import ConfigDict
-from catalystwan.api.templates.feature_template import FeatureTemplate
-
-
-class OMPvSmart(FeatureTemplate):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
+ ```python
+ from pathlib import Path
+ from typing import ClassVar
+ from pydantic import ConfigDict
+ from catalystwan.api.templates.feature_template import FeatureTemplate
- payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
- type: ClassVar[str] = "omp-vsmart"
-```
+ class OMPvSmart(FeatureTemplate):
+ model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
+
+ payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
+ type: ClassVar[str] = "omp-vsmart"
+ ```
3. (This step is temporary) Find `is_created_by_generator` method in `template_api` and add your new template class.
-```python
-ported_templates = (..., OMPvSmart)
-```
-
-NOTE: This step will be removed once all template payloads will be generated automatically.
-
+ ```python
+ ported_templates = (..., OMPvSmart)
+ ```
+ NOTE: This step will be removed once all template payloads will be generated automatically.
4. (This step is temporary) Find `available_models` definition in 'supported' and add your new template class.
-
-```python
-available_models = {
- (...)
- 'omp_vsmart': OMPvSmart
-}
-```
-
-NOTE: This step will be removed once all template payloads will be generated dynamically.
-
+ ```python
+ available_models = {
+ (...)
+ 'omp_vsmart': OMPvSmart
+ }
+ ```
+ NOTE: This step will be removed once all template payloads will be generated dynamically.
5. We can try to create our first template with default values.
+ ```python
+ omp_vsmart = OMPvSmart(
+ name="my_first_template",
+ description="NA",
+ device_models=[DeviceModel.VSMART]
+ )
-```python
-omp_vsmart = OMPvSmart(
- name="my_first_template",
- description="NA",
- device_models=["vsmart"]
-)
+ session.api.templates.create(omp_vsmart)
+ ```
+ If everything went successfuly, we will get similar message
-session.api.templates.create(omp_vsmart)
-```
-
-If everything went successfuly, we will get similar message:
-
-`Template my_first_template (FeatureTemplate) was created successfully (7e56acdd-640e-45dc-9335-87abc697995f).`
+ `Template my_first_template (FeatureTemplate) was created successfully (7e56acdd-640e-45dc-9335-87abc697995f).`
6. We can check whether our template is created sucessfully in Manager manually. If there is an error, please create an issue with error and try go to the 7th step.
-
-### Customize Feature Template fields
-
+
+### Customize Feature Template fields.
7. Run below code with already created session and changed corresponding variables.
-```python
-# TODO: Use 2nd layer.
-import json
+ ```python
+ # TODO: Use 2nd layer.
+ import json
-template_type = "omp-vsmart" # Change this value
-template_version = "15.0.0" # Change this value
-endpoint = f"/dataservice/template/feature/types/definition/{template_type}/{template_version}"
+ template_type = "omp-vsmart" # Change this value
+ template_version = "15.0.0" # Change this value
+ endpoint = f"/dataservice/template/feature/types/definition/{template_type}/{template_version}"
-schema = session.get(url=endpoint).json()
+ schema = session.get(url=endpoint).json()
-with open(f"response_{template_type}.json", "w") as f:
- f.write(json.dumps(schema, indent=4))
-```
+ with open(f"response_{template_type}.json", "w") as f:
+ f.write(json.dumps(schema, indent=4))
+ ```
8. Open `response_{template_type}.json` file.
-
9. Find `fields` key. The value should be list of dictionaries. Get every possible key in the dictionary and fill our class with every possible key. You can find the code in `catalystwan\api\templates\models\omp_vsmart_model.py` file.
diff --git a/catalystwan/api/templates/cli_template.py b/catalystwan/api/templates/cli_template.py
index bd0af63b..afaebb05 100644
--- a/catalystwan/api/templates/cli_template.py
+++ b/catalystwan/api/templates/cli_template.py
@@ -13,7 +13,7 @@
from catalystwan.dataclasses import Device
from catalystwan.exceptions import TemplateTypeError
-from catalystwan.models.common import DeviceModel
+from catalystwan.utils.device_model import DeviceModel
from catalystwan.utils.template_type import TemplateType
logger = logging.getLogger(__name__)
@@ -62,31 +62,21 @@ def load_running(self, session: ManagerSession, device: Device) -> CiscoConfPars
logger.debug(f"Template loaded from {device.hostname}.")
return self.config
- def load_from_file(self, file: str) -> CiscoConfParse:
- """Load CLI config from file.
- Args:
- file: The path of the file to be loaded.
- Returns:
- CiscoConfParse: Loaded template.
- """
- self.config = CiscoConfParse(file)
- return self.config
-
def generate_payload(self) -> dict:
config_str = "\n".join(self.config.ioscfg)
payload = {
"templateName": self.template_name,
"templateDescription": self.template_description,
- "deviceType": self.device_model,
+ "deviceType": self.device_model.value,
"templateConfiguration": config_str,
"factoryDefault": False,
"configType": "file",
}
if self.device_model not in [
- "vedge",
- "vsmart",
- "vmanage",
- "vedge-cloud",
+ DeviceModel.VEDGE,
+ DeviceModel.VSMART,
+ DeviceModel.VMANAGE,
+ DeviceModel.VBOND,
]:
payload["cliType"] = "device"
payload["draftMode"] = False
@@ -110,7 +100,7 @@ def update(self, session: ManagerSession, id: str, config: CiscoConfParse) -> bo
"templateId": id,
"templateName": self.template_name,
"templateDescription": self.template_description,
- "deviceType": self.device_model,
+ "deviceType": self.device_model.value,
"templateConfiguration": config_str,
"factoryDefault": False,
"configType": "file",
diff --git a/catalystwan/api/templates/device_template/device_template.py b/catalystwan/api/templates/device_template/device_template.py
index 4af7a049..39c2067b 100644
--- a/catalystwan/api/templates/device_template/device_template.py
+++ b/catalystwan/api/templates/device_template/device_template.py
@@ -4,7 +4,7 @@
import logging
from pathlib import Path
-from typing import TYPE_CHECKING, ClassVar, List, Literal, Optional
+from typing import TYPE_CHECKING, ClassVar, List, Optional
from uuid import UUID
from jinja2 import DebugUndefined, Environment, FileSystemLoader, meta # type: ignore
@@ -16,9 +16,6 @@
logger = logging.getLogger(__name__)
-TemplateType = Literal["file", "template"] # file == cli, template == feature
-
-
def str_to_uuid(s: str) -> Optional[UUID]:
try:
return UUID(s)
@@ -27,15 +24,13 @@ def str_to_uuid(s: str) -> Optional[UUID]:
class GeneralTemplate(BaseModel):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
+ model_config = ConfigDict(arbitrary_types_allowed=True)
- name: str = Field(default="")
+ name: str = ""
+ subTemplates: List[GeneralTemplate] = []
- sub_templates: List[GeneralTemplate] = Field(
- default=[], serialization_alias="subTemplates", validation_alias="subTemplates"
- )
- template_id: str = Field(default="", serialization_alias="templateId", validation_alias="templateId")
- template_type: str = Field(default="", serialization_alias="templateType", validation_alias="templateType")
+ templateId: str = ""
+ templateType: str = ""
class DeviceTemplate(BaseModel):
@@ -55,8 +50,6 @@ class DeviceTemplate(BaseModel):
>>> session.api.templates.create(device_template)
"""
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
-
template_name: str = Field(serialization_alias="templateName", validation_alias="templateName")
template_description: str = Field(serialization_alias="templateDescription", validation_alias="templateDescription")
general_templates: List[GeneralTemplate] = Field(
@@ -68,23 +61,6 @@ class DeviceTemplate(BaseModel):
default="", serialization_alias="securityPolicyId", validation_alias="securityPolicyId"
)
policy_id: str = Field(default="", serialization_alias="policyId", validation_alias="policyId")
- feature_template_uid_range: Optional[List] = Field(
- default=[], serialization_alias="featureTemplateUidRange", validation_alias="featureTemplateUidRange"
- )
- config_type: Optional[str] = Field(
- default="template", serialization_alias="configType", validation_alias="configType"
- )
- connection_preference_required: Optional[bool] = Field(
- default=True,
- serialization_alias="connectionPreferenceRequired",
- validation_alias="connectionPreferenceRequired",
- )
- connection_preference: Optional[bool] = Field(
- default=True, serialization_alias="connectionPreference", validation_alias="connectionPreference"
- )
- factory_default: Optional[bool] = Field(
- default=False, serialization_alias="factoryDefault", validation_alias="factoryDefault"
- )
def get_security_policy_uuid(self) -> Optional[UUID]:
return str_to_uuid(self.security_policy_id)
diff --git a/catalystwan/api/templates/device_template/device_template_payload.json.j2 b/catalystwan/api/templates/device_template/device_template_payload.json.j2
index cd7debc3..4712112e 100644
--- a/catalystwan/api/templates/device_template/device_template_payload.json.j2
+++ b/catalystwan/api/templates/device_template/device_template_payload.json.j2
@@ -3,12 +3,12 @@
"templateDescription": "{{ template_description }}",
"deviceType": "{{ device_type }}",
"deviceRole": "{{ device_role }}",
- "configType": "{{ config_type }}",
+ "configType": "template",
"factoryDefault": false,
"policyId": "{{ policy_id }}",
"featureTemplateUidRange": [],
- "connectionPreferenceRequired": {{ connection_preference_required }},
- "connectionPreference": {{ connection_preference }},
+ "connectionPreferenceRequired": true,
+ "connectionPreference": true,
"generalTemplates": [
{% for template in general_templates %}
{{ template | tojson }}
diff --git a/catalystwan/api/templates/feature_template.py b/catalystwan/api/templates/feature_template.py
index 3cde1822..031d8838 100644
--- a/catalystwan/api/templates/feature_template.py
+++ b/catalystwan/api/templates/feature_template.py
@@ -11,7 +11,7 @@
from pydantic import BaseModel, model_validator
from catalystwan.api.templates.device_variable import DeviceVariable
-from catalystwan.models.common import DeviceModel
+from catalystwan.utils.device_model import DeviceModel
from catalystwan.utils.dict import FlattenedDictValue, flatten_dict
from catalystwan.utils.feature_template.find_template_values import find_template_values
from catalystwan.utils.pydantic_field import get_extra_field
@@ -118,7 +118,7 @@ def get(cls, session: ManagerSession, name: str) -> FeatureTemplate:
template_info = (
session.api.templates._get_feature_templates(summary=False).filter(name=name).single_or_default()
)
- template_definition_as_dict = json.loads(cast(str, template_info.template_definition))
+ template_definition_as_dict = json.loads(cast(str, template_info.template_definiton))
feature_template_model = choose_model(type_value=template_info.template_type)
@@ -128,6 +128,6 @@ def get(cls, session: ManagerSession, name: str) -> FeatureTemplate:
return feature_template_model(
template_name=template_info.name,
template_description=template_info.description,
- device_models=[model for model in template_info.device_type],
+ device_models=[DeviceModel(model) for model in template_info.device_type],
**flattened_values,
)
diff --git a/catalystwan/api/templates/models/aaa_model.py b/catalystwan/api/templates/models/aaa_model.py
deleted file mode 100644
index 5894624b..00000000
--- a/catalystwan/api/templates/models/aaa_model.py
+++ /dev/null
@@ -1,387 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
-
-from pydantic import ConfigDict, Field, field_validator
-
-from catalystwan.api.templates.bool_str import BoolStr
-from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-
-Privilage = Literal["1", "15"]
-AuthenticationOrder = Literal["local", "radius", "tacacs"]
-TacacsAuthType = Literal["pap", "ascii"]
-TaskPermission = Literal["read", "write"]
-DefaultAction = Literal["accept", "deny"]
-TaskMode = Literal["system", "interface", "policy", "routing", "security"]
-
-
-class Command(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
-
- command: str = Field(description="Define command", json_schema_extra={"vmanage_key": "command"})
-
-
-class Task(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
-
- name: str = Field(description="The name of the user", json_schema_extra={"vmanage_key": "name"})
- config_default_action: DefaultAction = Field(
- json_schema_extra={
- "vmanage_key": "default-action",
- "data_path": ["config"],
- },
- description="Define config default action",
- )
- oper_exec_default_action: DefaultAction = Field(
- json_schema_extra={
- "vmanage_key": "default-action",
- "data_path": ["oper-exec"],
- },
- description="Define oper-exec default action",
- )
- oper_exec_accept_action: Optional[List[Command]] = Field(
- default=None,
- json_schema_extra={
- "vmanage_key": "accept",
- "data_path": ["oper-exec"],
- },
- description="List of oper-exec commands to allow",
- )
- oper_exec_deny_action: Optional[List[Command]] = Field(
- default=None,
- json_schema_extra={
- "vmanage_key": "deny",
- "data_path": ["oper-exec"],
- },
- description="List of oper-exec commands to deny",
- )
- config_accept_action: Optional[List[Command]] = Field(
- default=None,
- json_schema_extra={
- "vmanage_key": "accept",
- "data_path": ["config"],
- },
- description="List of config commands to allow",
- )
- config_deny_action: Optional[List[Command]] = Field(
- default=None,
- json_schema_extra={
- "vmanage_key": "deny",
- "data_path": ["config"],
- },
- description="List of config commands to deny",
- )
-
- password: Optional[str] = Field(default=None, description="The password for the user")
- secret: Optional[str] = Field(default=None, description="The secret for the user")
- privilege: Optional[Privilage] = Field(default="15", description="The privilege level for the user")
-
-
-class PubkeyChain(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
-
- usertag: str = Field(
- description="User Tag",
- json_schema_extra={"vmanage_key": "usertag"},
- )
- key_string: str = Field(
- description="Set the RSA key string",
- json_schema_extra={"vmanage_key": "key-string"},
- )
- key_type: Optional[str] = Field(
- default="ssh-rsa",
- description="Only RSA is supported",
- json_schema_extra={"vmanage_key": "key-type"},
- )
-
-
-class User(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
-
- name: str = Field(description="The name of the user")
- password: Optional[str] = Field(default=None, description="The password for the user")
- secret: Optional[str] = Field(default=None, description="The secret for the user")
- description: Optional[str] = Field(default=None, description="Add a description of the user")
- group: Optional[List[str]] = Field(default=None, description="Configure the groups that the user is part of")
- pubkey_chain: Optional[List[PubkeyChain]] = Field(
- default=None,
- description="List of public keys for the user",
- json_schema_extra={"vmanage_key": "pubkey-chain"},
- )
-
-
-class RadiusServer(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
-
- address: str = Field(description="The IP address or hostname of the RADIUS server")
- auth_port: Optional[int] = Field(
- default=1812,
- json_schema_extra={"vmanage_key": "auth-port"},
- description="The authentication port for the RADIUS server",
- )
- tag: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tag"},
- description="Reference tag/name for the server",
- )
- acct_port: Optional[int] = Field(
- default=1813,
- json_schema_extra={"vmanage_key": "acct-port"},
- description="The accounting port for the RADIUS server",
- )
- vpn: Optional[str] = Field(
- default=0,
- json_schema_extra={"vmanage_key": "vpn"},
- description="Set VPN in which RADIUS server is located",
- )
- source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "source-interface"},
- description="Set interface to use to reach RADIUS server",
- )
- key: Optional[str] = Field(default=None, description="Set the password to access the RADIUS server")
- secret_key: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "secret-key"},
- description="Set the AES encrypted key to access the RADIUS server",
- )
- priority: int = Field(default=0, description="RADIUS server priority <0..7>")
-
-
-class TacacsServer(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
-
- address: str = Field(description="The IP address or hostname of the TACACS+ server")
- auth_port: Optional[int] = Field(
- default=49,
- json_schema_extra={"vmanage_key": "auth-port"},
- description="The authentication port for the TACACS+ server",
- )
- vpn: Optional[str] = Field(
- default=0,
- json_schema_extra={"vmanage_key": "vpn"},
- description="Set VPN in which TACACS+ server is located",
- )
- source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "source-interface"},
- description="Set interface to use to reach TACACS+ server",
- )
- key: Optional[str] = Field(default=None, description="Set the password to access the TACACS+ server")
- secret_key: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "secret-key"},
- description="Set the AES encrypted key to access the TACACS+ server",
- )
- priority: int = Field(default=0, description="TACACS+ server priority <0..7>")
-
-
-class TaskPermissions(FeatureTemplateValidator):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
-
- mode: TaskMode = Field(
- json_schema_extra={"vmanage_key": "mode"},
- description="Select the task to set privileges for",
- )
- permission: List[TaskPermission] = Field(
- default="pap",
- json_schema_extra={
- "vmanage_key": "permission",
- },
- description="Set read or write permission for the task",
- )
-
- @field_validator("permission")
- def convert_permission_field(cls, val: List[TaskPermission]) -> List:
- permission_list = []
- for value in val:
- permission_list.append({"vipType": "constant", "vipValue": f"{value}", "vipObjectType": "object"})
- return permission_list
-
-
-class UserGroup(FeatureTemplateValidator):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
-
- name: str = Field(
- json_schema_extra={"vmanage_key": "name"},
- description="Set name of user group",
- )
- task: List[TaskPermissions] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "task", "priority_order": ["mode", "permission"]},
- description="Set the user group's tasks and task privileges. Skipping tasks sets all as read and write",
- )
-
-
-class AAAModel(FeatureTemplate):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "AAA Feature Template configuration"
-
- auth_order: Optional[List[AuthenticationOrder]] = Field(
- validate_default=True,
- default=["local", "radius", "tacacs"],
- json_schema_extra={"vmanage_key": "auth-order", "data_path": ["aaa"]},
- description="ServerGroups authentication order to user access",
- )
-
- @field_validator("auth_order")
- def convert_to_auth_order_field(cls, val: Optional[List[AuthenticationOrder]]) -> List:
- auth_order_list = []
- if val:
- for value in val:
- auth_order_list.append({"vipType": "constant", "vipValue": f"{value}", "vipObjectType": "object"})
- return auth_order_list
-
- auth_fallback: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "auth-fallback",
- },
- description="Authenticate admin user as per auth-order",
- )
- admin_auth_order: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "admin-auth-order",
- },
- description="Fall back if higher-priority authentication fails",
- )
- netconf_disable: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["aaa", "logs"],
- "vmanage_key": "netconf-disable",
- },
- description="Disable Netconf logs",
- )
- audit_disable: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["aaa", "logs"],
- "vmanage_key": "audit-disable",
- },
- description="Disable audit logs",
- )
- radius_server_list: Optional[List[str]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "radius-servers", "data_path": ["aaa"]},
- description="Designate radius servers for authentication and accounting",
- )
- task: Optional[List[Task]] = Field(
- default=None,
- frozen=True,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "audit-disable",
- "priority_order": ["name"],
- },
- description="Set the user group's tasks and task privileges.",
- )
- accounting: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "accounting",
- },
- description="Enable/disable user accounting",
- )
- usergroup: Optional[List[UserGroup]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "usergroup",
- "priority_order": ["name"],
- },
- description="Create groupings of users with the same authorization privileges. "
- "When used, overrides existing groups(netadmin, basic, operator)",
- )
- user: Optional[List[User]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "user",
- },
- description="List of local user configurations. When used, overrides existing users",
- )
- cisco_tac_ro_user: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "ciscotacro-user",
- },
- description="Cisco Tac Enable Read only",
- )
- cisco_tac_rw_user: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={
- "data_path": ["aaa"],
- "vmanage_key": "ciscotacrw-user",
- },
- description="Cisco Tac Enable Read and Write",
- )
- tacacs_timeout: Optional[int] = Field(
- default=5,
- json_schema_extra={
- "data_path": ["tacacs"],
- "vmanage_key": "timeout",
- },
- description="The timeout period in seconds for the TACACS+ server",
- )
- tacacs_authentication: Optional[TacacsAuthType] = Field(
- default="pap",
- json_schema_extra={
- "data_path": ["tacacs"],
- "vmanage_key": "authentication",
- },
- description="TACACS authentication type",
- )
- tacacs_server: Optional[List[TacacsServer]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["tacacs"],
- "priority_order": ["address", "auth-port", "vpn", "source-interface", "secret-key", "priority"],
- "vmanage_key": "server",
- },
- description="The list of TACACS+ servers",
- )
- radius_timeout: Optional[int] = Field(
- default=5,
- json_schema_extra={
- "data_path": ["radius"],
- "vmanage_key": "timeout",
- },
- description="The timeout period in seconds for the RADIUS server",
- )
- radius_retransmit: Optional[int] = Field(
- default=3,
- json_schema_extra={
- "data_path": ["radius"],
- "vmanage_key": "retransmit",
- },
- description="The number of retransmit attempts for the RADIUS server",
- )
- radius_server: Optional[List[RadiusServer]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["radius"],
- "priority_order": [
- "address",
- "auth-port",
- "vpn",
- "source-interface",
- "key",
- "secret-key",
- "priority",
- "tag",
- "acct-port",
- ],
- "vmanage_key": "server",
- },
- description="The list of RADIUS servers",
- )
-
- payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
- type: ClassVar[str] = "aaa"
diff --git a/catalystwan/api/templates/models/cisco_aaa_model.py b/catalystwan/api/templates/models/cisco_aaa_model.py
index cbe4fc8a..18e73182 100644
--- a/catalystwan/api/templates/models/cisco_aaa_model.py
+++ b/catalystwan/api/templates/models/cisco_aaa_model.py
@@ -1,332 +1,84 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
-from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-Privilage = Literal["1", "15"]
-
-AccountingMethod = Literal["commands", "exec", "network", "system"]
-
-AuthorizationMethod = Literal["commands"]
-
-DomainStripping = Literal["yes", "no", "right-to-left"]
-
-AuthenticationType = Literal["any", "all", "session-key"]
-
-
-class PubkeyChain(FeatureTemplateValidator):
- key_string: str = Field(
- description="Set the RSA key string",
- json_schema_extra={"vmanage_key": "key-string"},
- )
- key_type: Optional[str] = Field(
- default="ssh-rsa",
- description="Only RSA is supported",
- json_schema_extra={"vmanage_key": "key-type"},
- )
-
class User(FeatureTemplateValidator):
- name: str = Field(description="The name of the user")
- password: Optional[str] = Field(default=None, description="The password for the user")
- secret: Optional[str] = Field(default=None, description="The secret for the user")
- privilege: Optional[Privilage] = Field(default="15", description="The privilege level for the user")
- pubkey_chain: Optional[List[PubkeyChain]] = Field(
- default=None,
- description="List of public keys for the user",
- json_schema_extra={"vmanage_key": "pubkey-chain"},
- )
-
-
-class AccountingRule(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True)
-
- rule_id: str = Field(
- description="Accounting Rule ID",
- json_schema_extra={"vmanage_key": "rule-id"},
- )
- method: AccountingMethod = Field(
- description="Configure Accounting Method",
- json_schema_extra={"vmanage_key": "method"},
- )
- level: Optional[Privilage] = Field(
- default=None,
- description="Privilege level when method is commands",
- json_schema_extra={"vmanage_key": "level"},
- )
- start_stop: Optional[BoolStr] = Field(
- default=True,
- description="Enable Start-Stop",
- json_schema_extra={"vmanage_key": "start-stop"},
- )
- group: str = Field(
- description="List of groups.",
- json_schema_extra={"vmanage_key": "group"},
- )
-
-
-class AuthorizationRules(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True)
-
- rule_id: str = Field(
- description="Authorization Rule ID",
- json_schema_extra={"vmanage_key": "rule-id"},
- )
- method: AuthorizationMethod = Field(
- description="Configure Authorization Method",
- json_schema_extra={"vmanage_key": "method"},
- )
- level: Optional[Privilage] = Field(
- default=None,
- description="Privilege level when method is commands",
- json_schema_extra={"vmanage_key": "level"},
- )
- group: str = Field(
- description="List of groups.",
- json_schema_extra={"vmanage_key": "group"},
- )
- authenticated: Optional[BoolStr] = Field(
- default=False,
- description="Succeed if user has authenticated",
- json_schema_extra={"vmanage_key": "if-authenticated"},
- )
+ name: str
+ password: Optional[str] = None
+ secret: Optional[str] = None
+ privilege: Optional[str] = None
+ pubkey_chain: List[str] = Field(default=[], json_schema_extra={"vmanage_key": "pubkey-chain", "vip_type": "ignore"})
class RadiusServer(FeatureTemplateValidator):
model_config = ConfigDict(populate_by_name=True, coerce_numbers_to_str=True)
- address: str = Field(description="The IP address or hostname of the RADIUS server")
- auth_port: int = Field(
- default=1812,
- json_schema_extra={"vmanage_key": "auth-port"},
- description="The authentication port for the RADIUS server",
- )
- acct_port: int = Field(
- default=1813,
- json_schema_extra={"vmanage_key": "acct-port"},
- description="The accounting port for the RADIUS server",
- )
- timeout: int = Field(default=5, description="The timeout period in seconds for the RADIUS server")
- retransmit: int = Field(default=3, description="The number of retransmit attempts for the RADIUS server")
- key: str = Field(description="The key for the RADIUS server")
- secret_key: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "secret-key"},
- description="The secret key for the RADIUS server",
- )
- key_enum: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "key-enum"},
- description="The key enumeration for the RADIUS server",
- )
- key_type: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "key-type"},
- description="The key type for the RADIUS server",
- )
+ address: str
+ auth_port: int = Field(default=1812, json_schema_extra={"vmanage_key": "auth-port"})
+ acct_port: int = Field(default=1813, json_schema_extra={"vmanage_key": "acct-port"})
+ timeout: int = Field(default=5)
+ retransmit: int = 3
+ key: str
+ secret_key: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "secret-key"})
+ key_enum: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "key-enum"})
+ key_type: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "key-type"})
class RadiusGroup(FeatureTemplateValidator):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- group_name: str = Field(
- json_schema_extra={"vmanage_key": "group-name"},
- description="The name of the RADIUS group",
- )
- vpn: Optional[int] = Field(description="The VPN ID for the RADIUS group")
- source_interface: Optional[str] = Field(
- json_schema_extra={"vmanage_key": "source-interface"},
- description="The source interface for the RADIUS group",
- )
- server: List[RadiusServer] = Field(default=[], description="The list of RADIUS servers for the group")
+ group_name: str = Field(json_schema_extra={"vmanage_key": "group-name"})
+ vpn: Optional[int] = None
+ source_interface: Optional[str] = Field(json_schema_extra={"vmanage_key": "source-interface"})
+ server: List[RadiusServer] = []
-class RadiusVPN(FeatureTemplateValidator):
- name: str = Field(
- description="VPN ID",
- json_schema_extra={
- "vmanage_key": "name",
- },
- )
- server_key: str = Field(
- default=None,
- description="Specify a RADIUS client server-key",
- json_schema_extra={
- "vmanage_key": "server-key",
- },
- ) # needs enryption
-
-
-class RadiusClient(FeatureTemplateValidator):
- ip: str = Field(
- description="The Client IP",
- json_schema_extra={"vmanage_key": "ip"},
- )
- vpn: List[RadiusVPN] = Field(
- description="The VPN Configuration",
- json_schema_extra={"vmanage_key": "vpn"},
- )
+class DomainStripping(str, Enum):
+ YES = "yes"
+ NO = "no"
+ RIGHT_TO_LEFT = "right-to-left"
class TacacsServer(FeatureTemplateValidator):
model_config = ConfigDict(populate_by_name=True)
- address: str = Field(description="The IP address or hostname of the TACACS+ server")
- key: str = Field(description="The key for the TACACS+ server")
- port: int = Field(default=49, description="The port for the TACACS+ server")
- timeout: int = Field(default=5, description="The timeout period in seconds for the TACACS+ server")
- secret_key: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "secret-key"},
- description="The secret key for the TACACS+ server",
- )
- key_enum: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "key-enum"},
- description="The key enumeration for the TACACS+ server",
- )
+ address: str
+ port: int = 49
+ timeout: int = Field(default=5)
+ key: str
+ secret_key: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "secret-key"})
+ key_enum: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "key-enum"})
class TacacsGroup(FeatureTemplateValidator):
model_config = ConfigDict(populate_by_name=True)
- group_name: str = Field(
- json_schema_extra={"vmanage_key": "group-name"},
- description="The name of the TACACS+ group",
- )
- vpn: int = Field(default=0, description="The VPN ID for the TACACS+ group")
- source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "source-interface"},
- description="The source interface for the TACACS+ group",
- )
- server: List[TacacsServer] = Field(default=[], description="The list of TACACS+ servers for the group")
+ group_name: str = Field(json_schema_extra={"vmanage_key": "group-name"})
+ vpn: int = 0
+ source_interface: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "source-interface"})
+ server: List[TacacsServer] = []
class CiscoAAAModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco AAA Feature Template configuration"
- authentication_group: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["authentication", "dot1x", "default"],
- "vmanage_key": "authentication_group",
- },
- description="Whether to enable the authentication group, GUI equivalent: Authentication Param",
- )
- accounting_group: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={
- "data_path": ["accounting", "dot1x", "default", "start-stop"],
- "vmanage_key": "accounting_group",
- },
- description="Whether to enable the accounting group, GUI equivalent: Accounting Param",
- )
- server_auth_order: str = Field(
- default="local",
- json_schema_extra={"vmanage_key": "server-auth-order"},
- description="ServerGroups authentication order to user access",
- ) # example: "local,tacacs-5,radius-4"
- user: Optional[List[User]] = Field(default=None, description="List of local user configurations")
-
- accounting_rules: Optional[List[AccountingRule]] = Field(
- default=None,
- description="Configure the accounting rules",
- json_schema_extra={
- "data_path": ["accounting"],
- "vmanage_key": "accounting-rule",
- },
- )
-
- authorization_console: Optional[BoolStr] = Field(
- default=None,
- description="For enabling console authorization",
- json_schema_extra={
- "data_path": ["authorization"],
- "vmanage_key": "authorization-console",
- },
- )
- authorization_config_commands: Optional[BoolStr] = Field(
- default=None,
- description="For configuration mode commands",
- json_schema_extra={
- "data_path": ["authorization"],
- "vmanage_key": "authorization-config-commands",
- },
- )
- authorization_rules: Optional[List[AuthorizationRules]] = Field(
- default=None,
- description="Configure the accounting rules",
- json_schema_extra={
- "data_path": ["authorization"],
- "vmanage_key": "authorization-rule",
- },
- )
- radius: Optional[List[RadiusGroup]] = Field(default=None, description="List of Radius group configurations")
- radius_client: Optional[List[RadiusClient]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["radius-dynamic-author"],
- "vmanage_key": "radius-client",
- },
- description="Specify a RADIUS client",
- )
+ user: Optional[List[User]] = None
+ authentication_group: bool = Field(default=False, json_schema_extra={"vmanage_key": "authentication_group"})
+ accounting_group: bool = True
+ radius: Optional[List[RadiusGroup]] = None
domain_stripping: Optional[DomainStripping] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["radius-dynamic-author"],
- "vmanage_key": "domain-stripping",
- },
- description="The domain stripping configuration",
- )
- authentication_type: Optional[AuthenticationType] = Field(
- default="any",
- json_schema_extra={
- "data_path": ["radius-dynamic-author"],
- "vmanage_key": "auth-type",
- },
- description="Authentication Type",
- )
- port: Optional[int] = Field(
- default=1700,
- json_schema_extra={
- "data_path": ["radius-dynamic-author"],
- "vmanage_key": "port",
- },
- description="Specify Radius Dynamic Author Port",
- )
- server_key_password: Optional[str] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["radius-dynamic-author"],
- "vmanage_key": "rda-server-key",
- },
- description="Specify a radius dynamic author server-key",
- ) # needs encryption
-
- cts_authorization_list: Optional[str] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["radius-trustsec"],
- "vmanage_key": "cts-auth-list",
- },
- description="Specify a radius dynamic author server-key",
- )
- radius_trustsec_group: Optional[str] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["radius-trustsec"],
- "vmanage_key": "radius-trustsec-group",
- },
- description="RADIUS trustsec group",
+ default=None, json_schema_extra={"vmanage_key": "domain-stripping"}
)
- tacacs: Optional[List[TacacsGroup]] = Field(default=None, description="List of TACACS group configurations")
+ port: int = 1700
+ tacacs: Optional[List[TacacsGroup]] = None
+ server_auth_order: str = Field(default="local", json_schema_extra={"vmanage_key": "server-auth-order"})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cedge_aaa"
diff --git a/catalystwan/api/templates/models/cisco_banner_model.py b/catalystwan/api/templates/models/cisco_banner_model.py
index c4dfbab7..bbaf6873 100644
--- a/catalystwan/api/templates/models/cisco_banner_model.py
+++ b/catalystwan/api/templates/models/cisco_banner_model.py
@@ -10,18 +10,9 @@
class CiscoBannerModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco Banner configuration for login and message of the day (MOTD)"
- login_banner: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "login"},
- description="The login banner text displayed before authentication",
- )
- motd_banner: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "motd"},
- description="The message of the day (MOTD) banner text displayed after successful authentication",
- )
+ login_banner: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "login"})
+ motd_banner: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "motd"})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_banner"
diff --git a/catalystwan/api/templates/models/cisco_bfd_model.py b/catalystwan/api/templates/models/cisco_bfd_model.py
index 3a58825e..f9779b27 100644
--- a/catalystwan/api/templates/models/cisco_bfd_model.py
+++ b/catalystwan/api/templates/models/cisco_bfd_model.py
@@ -1,5 +1,6 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
from typing import ClassVar, List, Optional
@@ -7,7 +8,6 @@
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-from catalystwan.models.common import TLOCColor
DEFAULT_BFD_COLOR_MULTIPLIER = 7
DEFAULT_BFD_DSCP = 48
@@ -16,46 +16,51 @@
DEFAULT_BFD_MULTIPLIER = 6
-class Color(FeatureTemplateValidator):
- model_config = ConfigDict(populate_by_name=True)
+class ColorType(str, Enum):
+ DEFAULT = "default"
+ MPLS = "mpls"
+ METRO_ETHERNET = "metro-ethernet"
+ BIZ_INTERNET = "biz-internet"
+ PUBLIC_INTERNET = "public-internet"
+ LTE = "lte"
+ THREEG = "3g"
+ RED = "red"
+ GREEN = "green"
+ BLUE = "blue"
+ GOLD = "gold"
+ SILVER = "silver"
+ BRONZE = "bronze"
+ CUSTOM1 = "custom1"
+ CUSTOM2 = "custom2"
+ CUSTOM3 = "custom3"
+ PRIVATE1 = "private1"
+ PRIVATE2 = "private2"
+ PRIVATE3 = "private3"
+ PRIVATE4 = "private4"
+ PRIVATE5 = "private5"
+ PRIVATE6 = "private6"
+
- color: TLOCColor = Field(description="The color of the BFD session, representing various transport types")
+class Color(FeatureTemplateValidator):
+ color: ColorType
hello_interval: Optional[int] = Field(
- default=DEFAULT_BFD_HELLO_INTERVAL,
- json_schema_extra={"vmanage_key": "hello-interval"},
- description="The BFD hello interval in milliseconds",
- )
- multiplier: Optional[int] = Field(
- default=DEFAULT_BFD_COLOR_MULTIPLIER, description="The BFD multiplier for the color"
+ DEFAULT_BFD_HELLO_INTERVAL, json_schema_extra={"vmanage_key": "hello-interval"}
)
- pmtu_discovery: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "pmtu-discovery"},
- description="Whether to enable Path MTU Discovery",
- )
- dscp: Optional[int] = Field(default=DEFAULT_BFD_DSCP, description="The DSCP value used for BFD packets")
+ multiplier: Optional[int] = DEFAULT_BFD_COLOR_MULTIPLIER
+ pmtu_discovery: Optional[BoolStr] = Field(default=True, json_schema_extra={"vmanage_key": "pmtu-discovery"})
+ dscp: Optional[int] = DEFAULT_BFD_DSCP
+ model_config = ConfigDict(populate_by_name=True)
class CiscoBFDModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco Bidirectional Forwarding Detection (BFD) configuration"
- multiplier: Optional[int] = Field(
- default=DEFAULT_BFD_MULTIPLIER,
- json_schema_extra={"data_path": ["app-route"]},
- description="The default BFD multiplier for all colors",
- )
+ multiplier: Optional[int] = Field(DEFAULT_BFD_MULTIPLIER, json_schema_extra={"data_path": ["app-route"]})
poll_interval: Optional[int] = Field(
- default=DEFAULT_BFD_POLL_INTERVAL,
- json_schema_extra={"vmanage_key": "poll-interval", "data_path": ["app-route"]},
- description="The BFD poll interval in milliseconds",
- )
- default_dscp: Optional[int] = Field(
- default=DEFAULT_BFD_DSCP,
- json_schema_extra={"vmanage_key": "default-dscp"},
- description="The default DSCP value for BFD packets",
+ DEFAULT_BFD_POLL_INTERVAL, json_schema_extra={"vmanage_key": "poll-interval", "data_path": ["app-route"]}
)
- color: Optional[List[Color]] = Field(default=None, description="List of color-specific BFD configurations")
+ default_dscp: Optional[int] = Field(DEFAULT_BFD_DSCP, json_schema_extra={"vmanage_key": "default-dscp"})
+ color: Optional[List[Color]] = None
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_bfd"
diff --git a/catalystwan/api/templates/models/cisco_bgp_model.py b/catalystwan/api/templates/models/cisco_bgp_model.py
index 74b65c09..df0bdb0e 100644
--- a/catalystwan/api/templates/models/cisco_bgp_model.py
+++ b/catalystwan/api/templates/models/cisco_bgp_model.py
@@ -1,509 +1,258 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-NeighborFamilyType = Literal["ipv4-unicast", "vpnv4-unicast", "vpnv6-unicast"]
-Direction = Literal["in", "out"]
-Protocol = Literal["static", "connected", "ospf", "ospfv3", "omp", "eigrp", "nat"]
-AddressFamilyType = Literal["ipv4-unicast"]
-IPv6NeighborFamilyType = Literal["ipv6-unicast"]
-
class Export(FeatureTemplateValidator):
- asn_ip: str = Field(
- description="The ASN or IP address to be used as the export route target.",
- json_schema_extra={"vmanage_key": "asn-ip"},
- )
+ asn_ip: str = Field(json_schema_extra={"vmanage_key": "asn-ip"})
model_config = ConfigDict(populate_by_name=True)
class Import(FeatureTemplateValidator):
- asn_ip: str = Field(
- description="The ASN or IP address to be used as the import route target.",
- json_schema_extra={"vmanage_key": "asn-ip"},
- )
+ asn_ip: str = Field(json_schema_extra={"vmanage_key": "asn-ip"})
model_config = ConfigDict(populate_by_name=True)
class RouteTargetIpv4(FeatureTemplateValidator):
- vpn_id: int = Field(
- description="VPN identifier associated with the IPv4 route target.", json_schema_extra={"vmanage_key": "vpn-id"}
- )
- export: List[Export] = Field(description="List of export route targets.")
- import_: List[Import] = Field(
- description="List of import route targets.", json_schema_extra={"vmanage_key": "import"}
- )
+ vpn_id: int = Field(json_schema_extra={"vmanage_key": "vpn-id"})
+ export: List[Export]
+ import_: List[Import] = Field(json_schema_extra={"vmanage_key": "import"})
model_config = ConfigDict(populate_by_name=True)
class RouteTargetIpv6(FeatureTemplateValidator):
- vpn_id: int = Field(
- description="VPN identifier associated with the IPv6 route target.", json_schema_extra={"vmanage_key": "vpn-id"}
- )
- export: List[Export] = Field(description="List of export route targets.")
- import_: List[Import] = Field(
- description="List of import route targets.", json_schema_extra={"vmanage_key": "import"}
- )
+ vpn_id: int = Field(json_schema_extra={"vmanage_key": "vpn-id"})
+ export: List[Export]
+ import_: List[Import] = Field(json_schema_extra={"vmanage_key": "import"})
model_config = ConfigDict(populate_by_name=True)
class MplsInterface(FeatureTemplateValidator):
- if_name: Optional[str] = Field(
- default=None, description="Name of the MPLS interface.", json_schema_extra={"vmanage_key": "if-name"}
- )
+ if_name: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "if-name"})
model_config = ConfigDict(populate_by_name=True)
+class AddressFamilyType(str, Enum):
+ IPV4_UNICAST = "ipv4-unicast"
+
+
class AggregateAddress(FeatureTemplateValidator):
- prefix: str = Field(description="IP prefix to be aggregated.")
- as_set: Optional[BoolStr] = Field(
- default=None,
- description="Include AS_SET information in the aggregate route.",
- json_schema_extra={"vmanage_key": "as-set"},
- )
- summary_only: Optional[BoolStr] = Field(
- default=None,
- description="Advertise only the summary route, not more specific routes.",
- json_schema_extra={"vmanage_key": "summary-only"},
- )
+ prefix: str
+ as_set: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "as-set"})
+ summary_only: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "summary-only"})
model_config = ConfigDict(populate_by_name=True)
class Ipv6AggregateAddress(FeatureTemplateValidator):
- prefix: str = Field(description="IPv6 prefix to be aggregated.")
- as_set: Optional[bool] = Field(
- default=False,
- description="Include AS_SET information in the aggregate IPv6 route.",
- json_schema_extra={"vmanage_key": "as-set"},
- )
- summary_only: Optional[bool] = Field(
- default=False,
- description="Advertise only the summary IPv6 route, not more specific routes.",
- json_schema_extra={"vmanage_key": "summary-only"},
- )
+ prefix: str
+ as_set: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "as-set"})
+ summary_only: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "summary-only"})
model_config = ConfigDict(populate_by_name=True)
class Network(FeatureTemplateValidator):
- prefix: str = Field(description="IP network prefix to be advertised.")
+ prefix: str
class Ipv6Network(FeatureTemplateValidator):
- prefix: str = Field(description="IPv6 network prefix to be advertised.")
+ prefix: str
+
+
+class Protocol(str, Enum):
+ STATIC = "static"
+ CONNECTED = "connected"
+ OSPF = "ospf"
+ OSPFV3 = "ospfv3"
+ OMP = "omp"
+ EIGRP = "eigrp"
+ NAT = "nat"
class Redistribute(FeatureTemplateValidator):
- protocol: Protocol = Field(description="Routing protocol from which routes are to be redistributed.")
- route_policy: Optional[str] = Field(
- default=None,
- description="Name of the route policy to be applied during redistribution.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
+ protocol: Protocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class AddressFamily(FeatureTemplateValidator):
- family_type: AddressFamilyType = Field(
- description="Type of address family for BGP (e.g., IPv4 unicast).",
- json_schema_extra={"vmanage_key": "family-type"},
- )
+ family_type: AddressFamilyType = Field(json_schema_extra={"vmanage_key": "family-type"})
aggregate_address: Optional[List[AggregateAddress]] = Field(
- default=None,
- description="List of aggregate address configurations.",
- json_schema_extra={"vmanage_key": "aggregate-address"},
+ default=None, json_schema_extra={"vmanage_key": "aggregate-address"}
)
ipv6_aggregate_address: Optional[List[Ipv6AggregateAddress]] = Field(
- default=None,
- description="List of IPv6 aggregate address configurations.",
- json_schema_extra={"vmanage_key": "ipv6-aggregate-address"},
- )
- network: Optional[List[Network]] = Field(default=None, description="List of networks to be advertised by BGP.")
- ipv6_network: Optional[List[Ipv6Network]] = Field(
- default=None,
- description="List of IPv6 networks to be advertised by BGP.",
- json_schema_extra={"vmanage_key": "ipv6-network"},
- )
- paths: Optional[int] = Field(
- default=None,
- description="Maximum number of equal-cost paths for load sharing.",
- json_schema_extra={"data_path": ["maximum-paths"]},
- )
- originate: Optional[BoolStr] = Field(
- default=None,
- description="Whether to originate default route.",
- json_schema_extra={"data_path": ["default-information"]},
+ default=None, json_schema_extra={"vmanage_key": "ipv6-aggregate-address"}
)
+ network: Optional[List[Network]] = None
+ ipv6_network: Optional[List[Ipv6Network]] = Field(default=None, json_schema_extra={"vmanage_key": "ipv6-network"})
+ paths: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["maximum-paths"]})
+ originate: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["default-information"]})
policy_name: Optional[str] = Field(
- default=None,
- description="Name of the policy to apply to the address family.",
- json_schema_extra={"data_path": ["table-map"], "vmanage_key": "name"},
- )
- filter: Optional[BoolStr] = Field(
- default=None,
- description="Whether to filter routes according to the policy.",
- json_schema_extra={"data_path": ["table-map"]},
- )
- redistribute: Optional[List[Redistribute]] = Field(
- default=None, description="List of routing protocols and their respective redistribution configurations."
+ default=None, json_schema_extra={"data_path": ["table-map"], "vmanage_key": "name"}
)
+ filter: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["table-map"]})
+ redistribute: Optional[List[Redistribute]] = None
model_config = ConfigDict(populate_by_name=True)
+class NeighborFamilyType(str, Enum):
+ IPV4_UNICAST = "ipv4-unicast"
+ VPNV4_UNICAST = "vpnv4-unicast"
+ VPNV6_UNICAST = "vpnv6-unicast"
+
+
+class Direction(str, Enum):
+ IN = "in"
+ OUT = "out"
+
+
class RoutePolicy(FeatureTemplateValidator):
- direction: Direction = Field(
- description="Direction in which the route policy is to be applied (inbound or outbound)."
- )
- pol_name: str = Field(description="Name of the route policy.", json_schema_extra={"vmanage_key": "pol-name"})
+ direction: Direction
+ pol_name: str = Field(json_schema_extra={"vmanage_key": "pol-name"})
model_config = ConfigDict(populate_by_name=True)
class NeighborAddressFamily(FeatureTemplateValidator):
- """Configuration for a BGP neighbor's address family settings."""
-
- family_type: NeighborFamilyType = Field(
- description="The address family type associated with this neighbor (e.g., ipv4-unicast, vpnv4-unicast).",
- json_schema_extra={"vmanage_key": "family-type"},
- )
+ family_type: NeighborFamilyType = Field(json_schema_extra={"vmanage_key": "family-type"})
prefix_num: Optional[int] = Field(
- default=None,
- description="The maximum number of prefixes that can be received from a neighbor before taking action.",
- json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "prefix-num"},
- )
- threshold: Optional[int] = Field(
- default=None,
- description=(
- "The threshold percentage of maximum prefixes "
- "after which a warning is issued or further action is taken."
- ),
- json_schema_extra={"data_path": ["maximum-prefixes"]},
- )
- restart: Optional[int] = Field(
- default=None,
- description=(
- "The time in minutes to wait before re-establishing BGP peering"
- "after a maximum prefix limit has been exceeded."
- ),
- json_schema_extra={"data_path": ["maximum-prefixes"]},
+ default=None, json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "prefix-num"}
)
+ threshold: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["maximum-prefixes"]})
+ restart: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["maximum-prefixes"]})
warning_only: Optional[bool] = Field(
- default=None,
- description=(
- "Indicates whether only a warning message should be issued when the maximum prefix limit is exceeded,"
- " without dropping the BGP session."
- ),
- json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "warning-only"},
- )
- route_policy: Optional[List[RoutePolicy]] = Field(
- default=None,
- description="A list of route policies applied to incoming or outgoing routes for this address family.",
- json_schema_extra={"vmanage_key": "route-policy"},
+ default=None, json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "warning-only"}
)
+ route_policy: Optional[List[RoutePolicy]] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class Neighbor(FeatureTemplateValidator):
- address: str = Field(description="IP address of the BGP neighbor.")
- description: Optional[str] = Field(default=None, description="A textual description of the BGP neighbor.")
- shutdown: Optional[BoolStr] = Field(
- default=None, description="Indicates whether the BGP neighbor is administratively shut down."
- )
- remote_as: int = Field(
- description="The Autonomous System (AS) number of the BGP neighbor.",
- json_schema_extra={"vmanage_key": "remote-as"},
- )
- keepalive: Optional[int] = Field(
- default=None,
- description="Keepalive interval for the BGP neighbor in seconds.",
- json_schema_extra={"data_path": ["timers"]},
- )
- holdtime: Optional[int] = Field(
- default=None,
- description="Hold time interval for the BGP neighbor in seconds.",
- json_schema_extra={"data_path": ["timers"]},
- )
+ address: str
+ description: Optional[str] = None
+ shutdown: Optional[BoolStr] = None
+ remote_as: int = Field(json_schema_extra={"vmanage_key": "remote-as"})
+ keepalive: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["timers"]})
+ holdtime: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["timers"]})
if_name: Optional[str] = Field(
- default=None,
- description="Interface name to use as the source address for BGP packets.",
- json_schema_extra={"data_path": ["update-source"], "vmanage_key": "if-name"},
- )
- next_hop_self: Optional[BoolStr] = Field(
- default=None,
- description="Whether the BGP neighbor should use its own address as the next hop.",
- json_schema_extra={"vmanage_key": "next-hop-self"},
- )
- send_community: Optional[BoolStr] = Field(
- default=None,
- description="Whether to send standard community attributes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-community"},
- )
- send_ext_community: Optional[BoolStr] = Field(
- default=None,
- description="Whether to send extended community attributes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-ext-community"},
- )
- ebgp_multihop: Optional[int] = Field(
- default=None,
- description="The maximum number of hops allowed for eBGP sessions with this neighbor.",
- json_schema_extra={"vmanage_key": "ebgp-multihop"},
- )
- password: Optional[str] = Field(default=None, description="Password for BGP authentication with the neighbor.")
- send_label: Optional[BoolStr] = Field(
- default=None,
- description="Whether to send MPLS labels for routes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-label"},
- )
+ default=None, json_schema_extra={"data_path": ["update-source"], "vmanage_key": "if-name"}
+ )
+ next_hop_self: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "next-hop-self"})
+ send_community: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "send-community"})
+ send_ext_community: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "send-ext-community"})
+ ebgp_multihop: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "ebgp-multihop"})
+ password: Optional[str] = None
+ send_label: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "send-label"})
send_label_explicit: Optional[BoolStr] = Field(
- default=None,
- description="Whether to send MPLS labels explicitly for routes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-label-explicit"},
- )
- as_override: Optional[BoolStr] = Field(
- default=None,
- description="Whether to override the AS number in the AS_PATH for routes to this neighbor.",
- json_schema_extra={"vmanage_key": "as-override"},
+ default=None, json_schema_extra={"vmanage_key": "send-label-explicit"}
)
+ as_override: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "as-override"})
as_number: Optional[int] = Field(
- default=None,
- description="The number of occurrences of the local AS number allowed in the AS_PATH before it is ignored.",
- json_schema_extra={"data_path": ["allowas-in"], "vmanage_key": "as-number"},
+ default=None, json_schema_extra={"data_path": ["allowas-in"], "vmanage_key": "as-number"}
)
address_family: Optional[List[NeighborAddressFamily]] = Field(
- default=None,
- description="List of address family configurations for the BGP neighbor.",
- json_schema_extra={"vmanage_key": "address-family"},
+ default=None, json_schema_extra={"vmanage_key": "address-family"}
)
model_config = ConfigDict(populate_by_name=True)
+class IPv6NeighborFamilyType(str, Enum):
+ IPV6_UNICAST = "ipv6-unicast"
+
+
class IPv6NeighborAddressFamily(FeatureTemplateValidator):
- family_type: IPv6NeighborFamilyType = Field(
- description="The IPv6 address family type associated with this neighbor (e.g., ipv6-unicast).",
- json_schema_extra={"vmanage_key": "family-type"},
- )
+ family_type: IPv6NeighborFamilyType = Field(json_schema_extra={"vmanage_key": "family-type"})
prefix_num: Optional[int] = Field(
- default=0,
- description=("The maximum number of IPv6 prefixes that can be received from a neighbor before taking action."),
- json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "prefix-num"},
- )
- threshold: Optional[int] = Field(
- default=None,
- description=(
- "The threshold percentage of maximum IPv6 prefixes"
- " after which a warning is issued or further action is taken."
- ),
- json_schema_extra={"data_path": ["maximum-prefixes"]},
- )
- restart: Optional[int] = Field(
- default=None,
- description=(
- "The time in minutes to wait before re-establishing BGP peering "
- "after an IPv6 maximum prefix limit has been exceeded."
- ),
- json_schema_extra={"data_path": ["maximum-prefixes"]},
+ 0, json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "prefix-num"}
)
+ threshold: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["maximum-prefixes"]})
+ restart: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["maximum-prefixes"]})
warning_only: Optional[bool] = Field(
- default=False,
- description=(
- "Indicates whether only a warning message should be issued "
- "when the IPv6 maximum prefix limit is exceeded, without dropping the BGP session."
- ),
- json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "warning-only"},
- )
- route_policy: Optional[List[RoutePolicy]] = Field(
- default=None,
- description="A list of route policies applied to incoming or outgoing routes for this IPv6 address family.",
- json_schema_extra={"vmanage_key": "route-policy"},
+ False, json_schema_extra={"data_path": ["maximum-prefixes"], "vmanage_key": "warning-only"}
)
+ route_policy: Optional[List[RoutePolicy]] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class Ipv6Neighbor(FeatureTemplateValidator):
- address: str = Field(description="IPv6 address of the BGP neighbor.")
- description: Optional[str] = Field(default=None, description="A textual description of the BGP neighbor.")
- shutdown: Optional[BoolStr] = Field(
- default=None, description="Indicates whether the BGP neighbor is administratively shut down."
- )
- remote_as: Optional[int] = Field(
- default=None,
- description="The Autonomous System (AS) number of the BGP neighbor.",
- json_schema_extra={"vmanage_key": "remote-as"},
- )
- keepalive: Optional[int] = Field(
- default=None,
- description="Keepalive interval for the BGP neighbor in seconds.",
- json_schema_extra={"data_path": ["timers"]},
- )
- holdtime: Optional[int] = Field(
- default=None,
- description="Hold time interval for the BGP neighbor in seconds.",
- json_schema_extra={"data_path": ["timers"]},
- )
+ address: str
+ description: Optional[str] = None
+ shutdown: Optional[BoolStr] = None
+ remote_as: int = Field(default=None, json_schema_extra={"vmanage_key": "remote-as"})
+ keepalive: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["timers"]})
+ holdtime: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["timers"]})
if_name: Optional[str] = Field(
- default=None,
- description="Interface name to use as the source address for BGP packets.",
- json_schema_extra={"data_path": ["update-source"], "vmanage_key": "if-name"},
- )
- next_hop_self: Optional[BoolStr] = Field(
- default=False,
- description="Whether the BGP neighbor should use its own address as the next hop.",
- json_schema_extra={"vmanage_key": "next-hop-self"},
- )
- send_community: Optional[BoolStr] = Field(
- default=True,
- description="Whether to send standard community attributes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-community"},
- )
- send_ext_community: Optional[BoolStr] = Field(
- default=True,
- description="Whether to send extended community attributes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-ext-community"},
- )
- ebgp_multihop: Optional[int] = Field(
- default=1,
- description="The maximum number of hops allowed for eBGP sessions with this neighbor.",
- json_schema_extra={"vmanage_key": "ebgp-multihop"},
- )
- password: Optional[str] = Field(default=None, description="Password for BGP authentication with the neighbor.")
- send_label: Optional[BoolStr] = Field(
- default=False,
- description="Whether to send MPLS labels for routes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-label"},
- )
+ default=None, json_schema_extra={"data_path": ["update-source"], "vmanage_key": "if-name"}
+ )
+ next_hop_self: Optional[BoolStr] = Field(default=False, json_schema_extra={"vmanage_key": "next-hop-self"})
+ send_community: Optional[BoolStr] = Field(default=True, json_schema_extra={"vmanage_key": "send-community"})
+ send_ext_community: Optional[BoolStr] = Field(default=True, json_schema_extra={"vmanage_key": "send-ext-community"})
+ ebgp_multihop: Optional[int] = Field(1, json_schema_extra={"vmanage_key": "ebgp-multihop"})
+ password: Optional[str] = None
+ send_label: Optional[BoolStr] = Field(default=False, json_schema_extra={"vmanage_key": "send-label"})
send_label_explicit: Optional[BoolStr] = Field(
- default=False,
- description="Whether to send MPLS labels explicitly for routes to this neighbor.",
- json_schema_extra={"vmanage_key": "send-label-explicit"},
- )
- as_override: Optional[BoolStr] = Field(
- default=False,
- description="Whether to override the AS number in the AS_PATH for routes to this neighbor.",
- json_schema_extra={"vmanage_key": "as-override"},
+ default=False, json_schema_extra={"vmanage_key": "send-label-explicit"}
)
+ as_override: Optional[BoolStr] = Field(default=False, json_schema_extra={"vmanage_key": "as-override"})
as_number: Optional[int] = Field(
- default=None,
- description="The number of occurrences of the local AS number allowed in the AS_PATH before it is ignored.",
- json_schema_extra={"data_path": ["allowas-in"], "vmanage_key": "as-number"},
+ default=None, json_schema_extra={"data_path": ["allowas-in"], "vmanage_key": "as-number"}
)
address_family: Optional[List[IPv6NeighborAddressFamily]] = Field(
- default=None,
- description="List of IPv6 address family configurations for the BGP neighbor.",
- json_schema_extra={"vmanage_key": "address-family"},
+ default=None, json_schema_extra={"vmanage_key": "address-family"}
)
model_config = ConfigDict(populate_by_name=True)
class CiscoBGPModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco Border Gateway Protocol (BGP) configuration"
- as_num: Optional[str] = Field(
- default=None,
- description="Autonomous System number for the BGP process.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "as-num"},
- )
- shutdown: Optional[BoolStr] = Field(
- default=None,
- description="Indicates whether the BGP process is administratively shut down.",
- json_schema_extra={"data_path": ["bgp"]},
- )
- router_id: Optional[str] = Field(
- default=None,
- description="Router identifier for the BGP process.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "router-id"},
- )
+ as_num: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "as-num"})
+ shutdown: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["bgp"]})
+ router_id: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "router-id"})
propagate_aspath: Optional[bool] = Field(
- default=None,
- description="Option to enable or disable AS path propagation.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "propagate-aspath"},
+ default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "propagate-aspath"}
)
propagate_community: Optional[bool] = Field(
- default=None,
- description="Option to enable or disable community attribute propagation.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "propagate-community"},
+ default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "propagate-community"}
)
route_target_ipv4: List[RouteTargetIpv4] = Field(
- default=[],
- description="List of IPv4 route targets for BGP VPNs.",
- json_schema_extra={"data_path": ["bgp", "target"], "vmanage_key": "route-target-ipv4"},
+ [], json_schema_extra={"data_path": ["bgp", "target"], "vmanage_key": "route-target-ipv4"}
)
route_target_ipv6: List[RouteTargetIpv6] = Field(
- default=[],
- description="List of IPv6 route targets for BGP VPNs.",
- json_schema_extra={"data_path": ["bgp", "target"], "vmanage_key": "route-target-ipv6"},
+ [], json_schema_extra={"data_path": ["bgp", "target"], "vmanage_key": "route-target-ipv6"}
)
mpls_interface: Optional[List[MplsInterface]] = Field(
- default=None,
- description="List of MPLS interfaces associated with the BGP process.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "mpls-interface"},
- )
- external: Optional[int] = Field(
- default=None,
- description="Administrative distance for external BGP routes.",
- json_schema_extra={"data_path": ["bgp", "distance"]},
- )
- internal: Optional[int] = Field(
- default=None,
- description="Administrative distance for internal BGP routes.",
- json_schema_extra={"data_path": ["bgp", "distance"]},
- )
- local: Optional[int] = Field(
- default=None,
- description="Administrative distance for local BGP routes.",
- json_schema_extra={"data_path": ["bgp", "distance"]},
- )
- keepalive: Optional[int] = Field(
- default=None,
- description="Keepalive interval for BGP sessions in seconds.",
- json_schema_extra={"data_path": ["bgp", "timers"]},
- )
- holdtime: Optional[int] = Field(
- default=None,
- description="Hold time interval for BGP sessions in seconds.",
- json_schema_extra={"data_path": ["bgp", "timers"]},
+ default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "mpls-interface"}
)
+ external: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["bgp", "distance"]})
+ internal: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["bgp", "distance"]})
+ local: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["bgp", "distance"]})
+ keepalive: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["bgp", "timers"]})
+ holdtime: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["bgp", "timers"]})
always_compare: Optional[bool] = Field(
- default=None,
- description="Always compare MED for paths from neighbors in different ASes.",
- json_schema_extra={"data_path": ["bgp", "best-path", "med"], "vmanage_key": "always-compare"},
- )
- deterministic: Optional[BoolStr] = Field(
- default=None,
- description="Deterministic comparison of MED for paths from different neighbors.",
- json_schema_extra={"data_path": ["bgp", "best-path", "med"]},
+ default=None, json_schema_extra={"data_path": ["bgp", "best-path", "med"], "vmanage_key": "always-compare"}
)
+ deterministic: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["bgp", "best-path", "med"]})
missing_as_worst: Optional[BoolStr] = Field(
- default=None,
- description="Treat missing AS as worst path.",
- json_schema_extra={"data_path": ["bgp", "best-path", "med"], "vmanage_key": "missing-as-worst"},
+ default=None, json_schema_extra={"data_path": ["bgp", "best-path", "med"], "vmanage_key": "missing-as-worst"}
)
compare_router_id: Optional[BoolStr] = Field(
- default=None,
- description="Compare router ID for identical EBGP paths.",
- json_schema_extra={"data_path": ["bgp", "best-path"], "vmanage_key": "compare-router-id"},
+ default=None, json_schema_extra={"data_path": ["bgp", "best-path"], "vmanage_key": "compare-router-id"}
)
multipath_relax: Optional[BoolStr] = Field(
- default=None,
- description="Option to enable or disable relaxation of the BGP multipath selection criteria.",
- json_schema_extra={"data_path": ["bgp", "best-path", "as-path"], "vmanage_key": "multipath-relax"},
+ default=None, json_schema_extra={"data_path": ["bgp", "best-path", "as-path"], "vmanage_key": "multipath-relax"}
)
address_family: Optional[List[AddressFamily]] = Field(
- default=None,
- description="List of address family configurations for the BGP process.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "address-family"},
- )
- neighbor: Optional[List[Neighbor]] = Field(
- default=None, description="List of IPv4 BGP neighbor configurations.", json_schema_extra={"data_path": ["bgp"]}
+ default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "address-family"}
)
+ neighbor: Optional[List[Neighbor]] = Field(default=None, json_schema_extra={"data_path": ["bgp"]})
ipv6_neighbor: Optional[List[Ipv6Neighbor]] = Field(
- default=None,
- description="List of IPv6 BGP neighbor configurations.",
- json_schema_extra={"data_path": ["bgp"], "vmanage_key": "ipv6-neighbor"},
+ default=None, json_schema_extra={"data_path": ["bgp"], "vmanage_key": "ipv6-neighbor"}
)
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
diff --git a/catalystwan/api/templates/models/cisco_logging_model.py b/catalystwan/api/templates/models/cisco_logging_model.py
index b487ec8e..275282c7 100644
--- a/catalystwan/api/templates/models/cisco_logging_model.py
+++ b/catalystwan/api/templates/models/cisco_logging_model.py
@@ -1,122 +1,85 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-Version = Literal["TLSv1.1", "TLSv1.2"]
+class Version(str, Enum):
+ TLSV11 = "TLSv1.1"
+ TLSV12 = "TLSv1.2"
-AuthType = Literal["Server", "Mutual"]
+
+class AuthType(str, Enum):
+ SERVER = "Server"
+ MUTUAL = "Mutual"
class TlsProfile(FeatureTemplateValidator):
- profile: str = Field(description="The name of the TLS profile")
- version: Optional[Version] = Field(
- default="TLSv1.1", json_schema_extra={"data_path": ["tls-version"]}, description="The TLS version"
- )
- auth_type: AuthType = Field(
- json_schema_extra={"vmanage_key": "auth-type"}, description="The authentication type for the TLS connection"
- )
- ciphersuite_list: Optional[List[str]] = Field(
- default=None,
- json_schema_extra={"data_path": ["ciphersuite"], "vmanage_key": "ciphersuite-list"},
- description="The list of ciphersuites for the TLS connection",
+ profile: str
+ version: Optional[Version] = Field(Version.TLSV11, json_schema_extra={"data_path": ["tls-version"]})
+ auth_type: AuthType = Field(json_schema_extra={"vmanage_key": "auth-type"})
+ ciphersuite_list: Optional[List] = Field(
+ default=None, json_schema_extra={"data_path": ["ciphersuite"], "vmanage_key": "ciphersuite-list"}
)
model_config = ConfigDict(populate_by_name=True)
-Priority = Literal["information", "debugging", "notice", "warn", "error", "critical", "alert", "emergency"]
+class Priority(str, Enum):
+ INFORMATION = "information"
+ DEBUGGING = "debugging"
+ NOTICE = "notice"
+ WARN = "warn"
+ ERROR = "error"
+ CRITICAL = "critical"
+ ALERT = "alert"
+ EMERGENCY = "emergency"
class Server(FeatureTemplateValidator):
- name: str = Field(description="The hostname/IPv4 address of the server")
- vpn: Optional[int] = Field(description="The VPN ID for the server")
- source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "source-interface"},
- description="The source interface for the server",
- )
- priority: Optional[Priority] = Field(default="information", description="The priority level for logging messages")
+ name: str
+ vpn: Optional[int] = None
+ source_interface: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "source-interface"})
+ priority: Optional[Priority] = Priority.INFORMATION
enable_tls: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"data_path": ["tls"], "vmanage_key": "enable-tls"},
- description="Whether to enable TLS encryption",
+ default=False, json_schema_extra={"data_path": ["tls"], "vmanage_key": "enable-tls"}
)
custom_profile: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"data_path": ["tls", "tls-properties"], "vmanage_key": "custom-profile"},
- description="Whether to use a custom TLS profile",
- )
- profile: Optional[str] = Field(
- default=None,
- json_schema_extra={"data_path": ["tls", "tls-properties"]},
- description="The custom TLS profile to use",
+ default=False, json_schema_extra={"data_path": ["tls", "tls-properties"], "vmanage_key": "custom-profile"}
)
+ profile: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["tls", "tls-properties"]})
model_config = ConfigDict(populate_by_name=True)
class Ipv6Server(FeatureTemplateValidator):
- name: str = Field(description="The name of the IPv6 server")
- vpn: Optional[int] = Field(description="The VPN ID for the IPv6 server")
- source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "source-interface"},
- description="The source interface for the IPv6 server",
- )
- priority: Optional[Priority] = Field(
- default="information", description="The priority level for logging messages to the IPv6 server"
- )
+ name: str
+ vpn: Optional[int] = None
+ source_interface: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "source-interface"})
+ priority: Optional[Priority] = Priority.INFORMATION
enable_tls: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"data_path": ["tls"], "vmanage_key": "enable-tls"},
- description="Whether to enable TLS encryption for the IPv6 server",
+ default=False, json_schema_extra={"data_path": ["tls"], "vmanage_key": "enable-tls"}
)
custom_profile: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"data_path": ["tls", "tls-properties"], "vmanage_key": "custom-profile"},
- description="Whether to use a custom TLS profile for the IPv6 server",
- )
- profile: Optional[str] = Field(
- default=None,
- json_schema_extra={"data_path": ["tls", "tls-properties"]},
- description="The custom TLS profile to use for the IPv6 server",
+ default=False, json_schema_extra={"data_path": ["tls", "tls-properties"], "vmanage_key": "custom-profile"}
)
+ profile: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["tls", "tls-properties"]})
model_config = ConfigDict(populate_by_name=True)
class CiscoLoggingModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco Logging Feature Template configuration"
- enable: Optional[BoolStr] = Field(
- default=None, json_schema_extra={"data_path": ["disk"]}, description="Whether logging to disk is enabled"
- )
- size: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["disk", "file"]},
- description="The maximum file size for the log file",
- )
- rotate: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["disk", "file"]},
- description="The number of log files to maintain before rotating",
- )
- tls_profile: Optional[List[TlsProfile]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tls-profile"},
- description="List of TLS profiles configurations",
- )
- server: Optional[List[Server]] = Field(default=None, description="List of server configurations for logging")
- ipv6_server: Optional[List[Ipv6Server]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "ipv6-server"},
- description="List of IPv6 server configurations for logging",
- )
+ enable: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["disk"]})
+ size: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["disk", "file"]})
+ rotate: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["disk", "file"]})
+ tls_profile: Optional[List[TlsProfile]] = Field(default=None, json_schema_extra={"vmanage_key": "tls-profile"})
+ server: Optional[List[Server]] = None
+ ipv6_server: Optional[List[Ipv6Server]] = Field(default=None, json_schema_extra={"vmanage_key": "ipv6-server"})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_logging"
diff --git a/catalystwan/api/templates/models/cisco_ntp_model.py b/catalystwan/api/templates/models/cisco_ntp_model.py
index fe00fc36..2116fb1f 100644
--- a/catalystwan/api/templates/models/cisco_ntp_model.py
+++ b/catalystwan/api/templates/models/cisco_ntp_model.py
@@ -12,49 +12,30 @@
class Server(FeatureTemplateValidator):
model_config = ConfigDict(populate_by_name=True)
- name: str = Field(description="The hostname or IP address of the NTP server")
- key: Optional[int] = Field(default=None, description="The identifier for the authentication key")
- vpn: Optional[int] = Field(default=None, description="The VPN ID associated with the NTP server")
- version: Optional[int] = Field(default=None, description="The NTP version used")
- source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "source-interface"},
- description="The source interface for NTP messages",
- )
- prefer: Optional[BoolStr] = Field(default=None, description="Whether this server is preferred over others")
+ name: str
+ key: Optional[int] = None
+ vpn: Optional[int] = None
+ version: Optional[int] = None
+ source_interface: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "source-interface"})
+ prefer: Optional[BoolStr] = None
class Authentication(FeatureTemplateValidator):
model_config = ConfigDict(populate_by_name=True)
- number: int = Field(description="The authentication key number")
- md5: str = Field(description="The MD5 hash used for authentication")
+ number: int
+ md5: str
class CiscoNTPModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco NTP Feature Template configuration"
-
- server: List[Server] = Field(default=[], description="List of NTP servers")
- authentication: Optional[List[Authentication]] = Field(
- default=None, json_schema_extra={"data_path": ["keys"]}, description="List of authentication keys"
- )
- trusted: Optional[List[int]] = Field(
- default=None, json_schema_extra={"data_path": ["keys"]}, description="List of trusted key numbers"
- )
- enable: Optional[BoolStr] = Field(
- default=None, json_schema_extra={"data_path": ["master"]}, description="Whether the device is an NTP master"
- )
- stratum: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["master"]},
- description="The stratum level if the device is an NTP master",
- )
- source: Optional[str] = Field(
- default=None,
- json_schema_extra={"data_path": ["master"]},
- description="The source interface for NTP messages if the device is an NTP master",
- )
+
+ server: List[Server] = Field(default=[])
+ authentication: Optional[List[Authentication]] = Field(default=None, json_schema_extra={"data_path": ["keys"]})
+ trusted: Optional[List[int]] = Field(default=None, json_schema_extra={"data_path": ["keys"]})
+ enable: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["master"]})
+ stratum: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["master"]})
+ source: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["master"]})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_ntp"
diff --git a/catalystwan/api/templates/models/cisco_omp_model.py b/catalystwan/api/templates/models/cisco_omp_model.py
index 609855a9..baebfc8f 100644
--- a/catalystwan/api/templates/models/cisco_omp_model.py
+++ b/catalystwan/api/templates/models/cisco_omp_model.py
@@ -1,7 +1,8 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
@@ -16,106 +17,95 @@
DEFAULT_OMP_ECMP_LIMIT = 4
-IPv4AdvertiseProtocol = Literal["bgp", "ospf", "ospfv3", "connected", "static", "eigrp", "lisp", "isis"]
-IPv6AdvertiseProtocol = Literal["bgp", "ospf", "connected", "static", "eigrp", "lisp", "isis"]
-TransportGateway = Literal["prefer", "ecmp-with-direct-path"]
-SiteTypes = Literal["type-1", "type-2", "type-3", "cloud", "branch", "br", "spoke"]
-Route = Literal["external"]
+class IPv4AdvertiseProtocol(str, Enum):
+ BGP = "bgp"
+ OSPF = "ospf"
+ OSPFV3 = "ospfv3"
+ CONNECTED = "connected"
+ STATIC = "static"
+ EIGRP = "eigrp"
+ LISP = "lisp"
+ ISIS = "isis"
+
+
+class Route(str, Enum):
+ EXTERNAL = "external"
class IPv4Advertise(FeatureTemplateValidator):
- protocol: IPv4AdvertiseProtocol = Field(description="The IPv4 routing protocol whose routes are to be advertised.")
- route: Optional[Route] = Field(
- default=None,
- description="The type of IPv4 routes to be advertised. For example, 'external' for external routes.",
- )
+ protocol: IPv4AdvertiseProtocol
+ route: Optional[Route] = None
+
+
+class IPv6AdvertiseProtocol(str, Enum):
+ BGP = "bgp"
+ OSPF = "ospf"
+ CONNECTED = "connected"
+ STATIC = "static"
+ EIGRP = "eigrp"
+ LISP = "lisp"
+ ISIS = "isis"
class IPv6Advertise(FeatureTemplateValidator):
- protocol: IPv6AdvertiseProtocol = Field(description="The IPv6 routing protocol whose routes are to be advertised.")
+ protocol: IPv6AdvertiseProtocol
+
+
+class TransportGateway(str, Enum):
+ PREFER = "prefer"
+ ECMP_WITH_DIRECT_PATH = "ecmp-with-direct-path"
+
+
+class SiteTypes(str, Enum):
+ TYPE_1 = "type-1"
+ TYPE_2 = "type-2"
+ TYPE_3 = "type-3"
+ CLOUD = "cloud"
+ BRANCH = "branch"
+ BR = "br"
+ SPOKE = "spoke"
class CiscoOMPModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Configuration settings for the Cisco Overlay Management Protocol (OMP) feature template."
- graceful_restart: Optional[BoolStr] = Field(
- default=True,
- description="Enable or disable graceful restart for OMP.",
- json_schema_extra={"vmanage_key": "graceful-restart"},
- )
- overlay_as: Optional[int] = Field(
- default=None,
- description="The autonomous system number used for the overlay.",
- json_schema_extra={"vmanage_key": "overlay-as"},
- )
+ graceful_restart: Optional[BoolStr] = Field(default=True, json_schema_extra={"vmanage_key": "graceful-restart"})
+ overlay_as: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "overlay-as"})
send_path_limit: Optional[int] = Field(
- default=DEFAULT_OMP_SENDPATH_LIMIT,
- ge=1,
- le=32,
- description="The maximum number of paths that can be sent for each prefix.",
- json_schema_extra={"vmanage_key": "send-path-limit"},
- )
- ecmp_limit: Optional[int] = Field(
- default=DEFAULT_OMP_ECMP_LIMIT,
- description="The maximum number of equal-cost multi-path routes.",
- json_schema_extra={"vmanage_key": "ecmp-limit"},
+ DEFAULT_OMP_SENDPATH_LIMIT, json_schema_extra={"vmanage_key": "send-path-limit"}
)
- shutdown: Optional[BoolStr] = Field(default=None, description="Enable or disable the shutdown of OMP.")
+ ecmp_limit: Optional[int] = Field(DEFAULT_OMP_ECMP_LIMIT, json_schema_extra={"vmanage_key": "ecmp-limit"})
+ shutdown: Optional[BoolStr] = None
omp_admin_distance_ipv4: Optional[int] = Field(
- default=None,
- description="The administrative distance for IPv4 routes learned via OMP.",
- json_schema_extra={"vmanage_key": "omp-admin-distance-ipv4"},
+ default=None, json_schema_extra={"vmanage_key": "omp-admin-distance-ipv4"}
)
omp_admin_distance_ipv6: Optional[int] = Field(
- default=None,
- description="The administrative distance for IPv6 routes learned via OMP.",
- json_schema_extra={"vmanage_key": "omp-admin-distance-ipv6"},
+ default=None, json_schema_extra={"vmanage_key": "omp-admin-distance-ipv6"}
)
advertisement_interval: Optional[int] = Field(
- default=DEFAULT_OMP_ADVERTISEMENT_INTERVAL,
- description="The interval between sending unsolicited OMP route advertisements.",
+ DEFAULT_OMP_ADVERTISEMENT_INTERVAL,
json_schema_extra={"vmanage_key": "advertisement-interval", "data_path": ["timers"]},
)
graceful_restart_timer: Optional[int] = Field(
- default=DEFAULT_OMP_GRACEFUL_RESTART_TIMER,
- description="The timer for graceful restart, specifying the period during which peerings are preserved.",
+ DEFAULT_OMP_GRACEFUL_RESTART_TIMER,
json_schema_extra={"vmanage_key": "graceful-restart-timer", "data_path": ["timers"]},
)
eor_timer: Optional[int] = Field(
- default=DEFAULT_OMP_EOR_TIMER,
- description="End-of-RIB (EOR) timer which indicates stability of the route table.",
- json_schema_extra={"vmanage_key": "eor-timer", "data_path": ["timers"]},
+ DEFAULT_OMP_EOR_TIMER, json_schema_extra={"vmanage_key": "eor-timer", "data_path": ["timers"]}
)
- holdtime: Optional[int] = Field(
- default=DEFAULT_OMP_HOLDTIME,
- description="The amount of time that the routes are preserved while the peer is unreachable.",
- json_schema_extra={"data_path": ["timers"]},
- )
- advertise: Optional[List[IPv4Advertise]] = Field(default=None, description="A list of IPv4 advertise rules.")
+ holdtime: Optional[int] = Field(DEFAULT_OMP_HOLDTIME, json_schema_extra={"data_path": ["timers"]})
+ advertise: Optional[List[IPv4Advertise]] = None
ipv6_advertise: Optional[List[IPv6Advertise]] = Field(
- default=None, description="A list of IPv6 advertise rules.", json_schema_extra={"vmanage_key": "ipv6-advertise"}
+ default=None, json_schema_extra={"vmanage_key": "ipv6-advertise"}
)
ignore_region_path_length: Optional[BoolStr] = Field(
- default=False,
- description="Whether to ignore the region part of the path length for OMP routes.",
- json_schema_extra={"vmanage_key": "ignore-region-path-length"},
+ default=False, json_schema_extra={"vmanage_key": "ignore-region-path-length"}
)
transport_gateway: Optional[TransportGateway] = Field(
- default=None,
- description="Specifies the preferred transport gateway selection strategy.",
- json_schema_extra={"vmanage_key": "transport-gateway"},
- )
- site_types: Optional[List[SiteTypes]] = Field(
- default=None,
- description="A list of site types that are allowed to participate in the overlay network.",
- json_schema_extra={"vmanage_key": "site-types"},
- )
- auto_translate: Optional[BoolStr] = Field(
- default=False,
- description="Enable or disable automatic translation of network settings.",
- json_schema_extra={"vmanage_key": "auto-translate"},
+ default=None, json_schema_extra={"vmanage_key": "transport-gateway"}
)
+ site_types: Optional[List[SiteTypes]] = Field(default=None, json_schema_extra={"vmanage_key": "site-types"})
+ auto_translate: Optional[BoolStr] = Field(default=False, json_schema_extra={"vmanage_key": "auto-translate"})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_omp"
diff --git a/catalystwan/api/templates/models/cisco_ospf.py b/catalystwan/api/templates/models/cisco_ospf.py
index 19effd16..3df7ca66 100644
--- a/catalystwan/api/templates/models/cisco_ospf.py
+++ b/catalystwan/api/templates/models/cisco_ospf.py
@@ -1,8 +1,9 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
import ipaddress
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
@@ -22,220 +23,150 @@
DEFAULT_OSPF_MAX_HOLD = 10000
-Protocol = Literal["static", "connected", "bgp", "omp", "nat", "eigrp"]
+class MetricType(str, Enum):
+ TYPE1 = "type1"
+ TYPE2 = "type2"
-AdType = Literal["administrative", "on-startup"]
-Direction = Literal["in"]
-
-Network = Literal["broadcast", "point-to-point", "non-broadcast", "point-to-multipoint"]
-
-Type = Literal["simple", "message-digest", "null"]
-
-MetricType = Literal["type1", "type2"]
+class Protocol(str, Enum):
+ STATIC = "static"
+ CONNECTED = "connected"
+ BGP = "bgp"
+ OMP = "omp"
+ NAT = "nat"
+ EIGRP = "eigrp"
class Redistribute(FeatureTemplateValidator):
- protocol: Protocol = Field(description="The routing protocol from which routes are to be redistributed into OSPF.")
- route_policy: Optional[str] = Field(
- default=None,
- description="Name of the route policy to control the redistribution.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
- dia: Optional[BoolStr] = Field(
- default=True, description="Default information originate, which controls the advertisement of default route."
- )
+ protocol: Protocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
+ dia: Optional[BoolStr] = True
model_config = ConfigDict(populate_by_name=True)
+class AdType(str, Enum):
+ ADMINISTRATIVE = "administrative"
+ ON_STARTUP = "on-startup"
+
+
class RouterLsa(FeatureTemplateValidator):
- ad_type: AdType = Field(
- description="Type of advertisement for the router LSA.", json_schema_extra={"vmanage_key": "ad-type"}
- )
- time: int = Field(description="Time in seconds for advertisement.")
+ ad_type: AdType = Field(json_schema_extra={"vmanage_key": "ad-type"})
+ time: int
model_config = ConfigDict(populate_by_name=True)
-class RoutePolicy(FeatureTemplateValidator):
- direction: Direction = Field(description="Direction of the route policy (e.g., 'in' for incoming).")
- pol_name: str = Field(description="Name of the route policy.", json_schema_extra={"vmanage_key": "pol-name"})
+class Direction(str, Enum):
+ IN = "in"
+
+class RoutePolicy(FeatureTemplateValidator):
+ direction: Direction
+ pol_name: str = Field(json_schema_extra={"vmanage_key": "pol-name"})
model_config = ConfigDict(populate_by_name=True)
+class Network(str, Enum):
+ BROADCAST = "broadcast"
+ POINT_TO_POINT = "point-to-point"
+ NON_BROADCAST = "non-broadcast"
+ POINT_TO_MULTIPOINT = "point-to-multipoint"
+
+
+class Type(str, Enum):
+ SIMPLE = "simple"
+ MESSAGE_DIGEST = "message-digest"
+ NULL = "null"
+
+
class Interface(FeatureTemplateValidator):
- name: str = Field(description="The name of the OSPF interface.")
+ name: str
hello_interval: Optional[int] = Field(
- DEFAULT_OSPF_HELLO_INTERVAL,
- description="The interval between the OSPF Hello packets that the router sends on the interface.",
- json_schema_extra={"vmanage_key": "hello-interval"},
- )
- dead_interval: Optional[int] = Field(
- DEFAULT_OSPF_DEAD_INTERVAL,
- description=(
- "The time interval an OSPF router waits for a Hello packet before declaring the sending router down."
- ),
- json_schema_extra={"vmanage_key": "dead-interval"},
+ DEFAULT_OSPF_DEAD_INTERVAL, json_schema_extra={"vmanage_key": "hello-interval"}
)
+ dead_interval: Optional[int] = Field(DEFAULT_OSPF_DEAD_INTERVAL, json_schema_extra={"vmanage_key": "dead-interval"})
retransmit_interval: Optional[int] = Field(
- DEFAULT_OSPF_RETRANSMIT_INTERVAL,
- description="The interval between LSA retransmissions for adjacencies belonging to the interface.",
- json_schema_extra={"vmanage_key": "retransmit-interval"},
- )
- cost: Optional[int] = Field(default=None, description="The OSPF cost (metric) for this interface.")
- priority: Optional[int] = Field(
- default=DEFAULT_OSPF_INTERFACE_PRIORITY, description="The OSPF priority of the interface."
- )
- network: Optional[Network] = Field(default="broadcast", description="The OSPF network type for the interface.")
- passive_interface: Optional[BoolStr] = Field(
- default=False,
- description="Whether the interface is a passive OSPF interface.",
- json_schema_extra={"vmanage_key": "passive-interface"},
- )
- type: Optional[Type] = Field(
- default=None,
- description="The OSPF authentication type for the interface.",
- json_schema_extra={"data_path": ["authentication"]},
+ DEFAULT_OSPF_RETRANSMIT_INTERVAL, json_schema_extra={"vmanage_key": "retransmit-interval"}
)
+ cost: Optional[int] = None
+ priority: Optional[int] = DEFAULT_OSPF_INTERFACE_PRIORITY
+ network: Optional[Network] = Network.BROADCAST
+ passive_interface: Optional[BoolStr] = Field(default=False, json_schema_extra={"vmanage_key": "passive-interface"})
+ type: Optional[Type] = Field(default=None, json_schema_extra={"data_path": ["authentication"]})
message_digest_key: Optional[int] = Field(
default=None,
- description="The message-digest key ID for OSPF authentication.",
json_schema_extra={"vmanage_key": "message-digest-key", "data_path": ["authentication", "message-digest"]},
)
- md5: Optional[str] = Field(
- default=None,
- description="The MD5 string for OSPF message-digest authentication.",
- json_schema_extra={"data_path": ["authentication", "message-digest"]},
- )
+ md5: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["authentication", "message-digest"]})
model_config = ConfigDict(populate_by_name=True)
class Range(FeatureTemplateValidator):
- address: ipaddress.IPv4Interface = Field(description="The IPv4 network address to be advertised as an OSPF range.")
- cost: Optional[int] = Field(default=None, description="The OSPF cost (metric) for this range.")
- no_advertise: Optional[BoolStr] = Field(
- default=False,
- description="Whether to suppress advertising this range.",
- json_schema_extra={"vmanage_key": "no-advertise"},
- )
-
+ address: ipaddress.IPv4Interface
+ cost: Optional[int] = None
+ no_advertise: Optional[BoolStr] = Field(default=False, json_schema_extra={"vmanage_key": "no-advertise"})
model_config = ConfigDict(populate_by_name=True)
class Area(FeatureTemplateValidator):
- a_num: int = Field(description="The OSPF area number.", json_schema_extra={"vmanage_key": "a-num"})
+ a_num: int = Field(json_schema_extra={"vmanage_key": "a-num"})
stub: Optional[BoolStr] = Field(
- default=None,
- description="Configuration for the OSPF area to be a stub area. If set, no-summary can be applied.",
- json_schema_extra={"vmanage_key": "no-summary", "data_path": ["stub"]},
+ default=None, json_schema_extra={"vmanage_key": "no-summary", "data_path": ["stub"]}
)
nssa: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Configuration for the OSPF area to be a Not-So-Stubby Area (NSSA). If set, no-summary can be applied."
- ),
- json_schema_extra={"vmanage_key": "no-summary", "data_path": ["nssa"]},
- )
- interface: Optional[List[Interface]] = Field(
- default=None, description="A list of OSPF interface configurations associated with this area."
- )
- range: Optional[List[Range]] = Field(
- default=None, description="A list of OSPF range entries to be associated with this area."
+ default=None, json_schema_extra={"vmanage_key": "no-summary", "data_path": ["nssa"]}
)
+ interface: Optional[List[Interface]] = None
+ range: Optional[List[Range]] = None
model_config = ConfigDict(populate_by_name=True)
class CiscoOSPFModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco OSPF (Open Shortest Path First) configuration"
router_id: Optional[str] = Field(
- default=None,
- description="The router ID of the OSPF process.",
- json_schema_extra={"vmanage_key": "router-id", "data_path": ["ospf"]},
+ default=None, json_schema_extra={"vmanage_key": "router-id", "data_path": ["ospf"]}
)
reference_bandwidth: Optional[int] = Field(
DEFAULT_OSPF_REFERENCE_BANDWIDTH,
- description="The reference bandwidth used by OSPF for cost calculation.",
json_schema_extra={"data_path": ["ospf", "auto-cost"], "vmanage_key": "reference-bandwidth"},
)
- rfc1583: Optional[BoolStr] = Field(
- default=True,
- description="Compatibility switch for RFC 1583.",
- json_schema_extra={"data_path": ["ospf", "compatible"]},
- )
- originate: Optional[BoolStr] = Field(
- default=None,
- description="Controls the origination of default information into the OSPF domain.",
- json_schema_extra={"data_path": ["ospf", "default-information"]},
- )
+ rfc1583: Optional[BoolStr] = Field(default=True, json_schema_extra={"data_path": ["ospf", "compatible"]})
+ originate: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["ospf", "default-information"]})
always: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Ensures that the default route is always advertised,"
- " regardless of the existence of a default route in the routing table."
- ),
- json_schema_extra={"data_path": ["ospf", "default-information", "originate"]},
+ default=None, json_schema_extra={"data_path": ["ospf", "default-information", "originate"]}
)
metric: Optional[int] = Field(
- default=None,
- description="The metric value to be set for the default route advertised by OSPF.",
- json_schema_extra={"data_path": ["ospf", "default-information", "originate"]},
+ default=None, json_schema_extra={"data_path": ["ospf", "default-information", "originate"]}
)
metric_type: Optional[MetricType] = Field(
default=None,
- description="The metric type (Type 1 or Type 2) for OSPF external routes.",
json_schema_extra={"vmanage_key": "metric-type", "data_path": ["ospf", "default-information", "originate"]},
)
- external: Optional[int] = Field(
- DEFAULT_OSPF_EXTERNAL,
- description="The OSPF external route metric.",
- json_schema_extra={"data_path": ["ospf", "distance"]},
- )
+ external: Optional[int] = Field(DEFAULT_OSPF_EXTERNAL, json_schema_extra={"data_path": ["ospf", "distance"]})
inter_area: Optional[int] = Field(
- DEFAULT_OSPF_INTER_AREA,
- description="The OSPF inter-area route metric.",
- json_schema_extra={"data_path": ["ospf", "distance"], "vmanage_key": "inter-area"},
+ DEFAULT_OSPF_INTER_AREA, json_schema_extra={"data_path": ["ospf", "distance"], "vmanage_key": "inter-area"}
)
intra_area: Optional[int] = Field(
- DEFAULT_OSPF_INTRA_AREA,
- description="The OSPF intra-area route metric.",
- json_schema_extra={"data_path": ["ospf", "distance"], "vmanage_key": "intra-area"},
- )
- delay: Optional[int] = Field(
- DEFAULT_OSPF_DELAY,
- description="The OSPF Shortest Path First (SPF) delay time.",
- json_schema_extra={"data_path": ["ospf", "timers", "spf"]},
+ DEFAULT_OSPF_INTRA_AREA, json_schema_extra={"data_path": ["ospf", "distance"], "vmanage_key": "intra-area"}
)
+ delay: Optional[int] = Field(DEFAULT_OSPF_DELAY, json_schema_extra={"data_path": ["ospf", "timers", "spf"]})
initial_hold: Optional[int] = Field(
DEFAULT_OSPF_INITIAL_HOLD,
- description="The initial hold time between consecutive SPF calculations.",
json_schema_extra={"vmanage_key": "initial-hold", "data_path": ["ospf", "timers", "spf"]},
)
max_hold: Optional[int] = Field(
- DEFAULT_OSPF_MAX_HOLD,
- description="The maximum hold time between consecutive SPF calculations.",
- json_schema_extra={"vmanage_key": "max-hold", "data_path": ["ospf", "timers", "spf"]},
+ DEFAULT_OSPF_MAX_HOLD, json_schema_extra={"vmanage_key": "max-hold", "data_path": ["ospf", "timers", "spf"]}
)
redistribute: Optional[List[Redistribute]] = Field(
- default=None,
- description="A list of OSPF redistribution configurations.",
- json_schema_extra={"vmanage_key": "redistribute", "data_path": ["ospf"]},
+ default=None, json_schema_extra={"vmanage_key": "redistribute", "data_path": ["ospf"]}
)
router_lsa: Optional[List[RouterLsa]] = Field(
- default=None,
- description="Configuration options for the Router LSA in OSPF.",
- json_schema_extra={"vmanage_key": "router-lsa", "data_path": ["ospf", "max-metric"]},
+ default=None, json_schema_extra={"vmanage_key": "router-lsa", "data_path": ["ospf", "max-metric"]}
)
route_policy: Optional[List[RoutePolicy]] = Field(
- default=None,
- description="A list of OSPF route policies.",
- json_schema_extra={"vmanage_key": "route-policy", "data_path": ["ospf"]},
- )
- area: Optional[List[Area]] = Field(
- default=None,
- description="A list of OSPF areas and their configurations.",
- json_schema_extra={"vmanage_key": "area", "data_path": ["ospf"]},
+ default=None, json_schema_extra={"vmanage_key": "route-policy", "data_path": ["ospf"]}
)
+ area: Optional[List[Area]] = Field(default=None, json_schema_extra={"vmanage_key": "area", "data_path": ["ospf"]})
+
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_ospf"
diff --git a/catalystwan/api/templates/models/cisco_ospfv3.py b/catalystwan/api/templates/models/cisco_ospfv3.py
index 26c187a8..244b4cf3 100644
--- a/catalystwan/api/templates/models/cisco_ospfv3.py
+++ b/catalystwan/api/templates/models/cisco_ospfv3.py
@@ -1,214 +1,152 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
import ipaddress
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-MetricType = Literal["type1", "type2"]
-Protocol = Literal["bgp", "connected", "eigrp", "isis", "lisp", "nat-route", "omp", "static"]
-AdType = Literal["on-startup"]
-Translate = Literal["always"]
-Network = Literal["broadcast", "point-to-point", "non-broadcast", "point-to-multipoint"]
-Type = Literal["md5", "sha1"]
+
+class MetricType(str, Enum):
+ TYPE1 = "type1"
+ TYPE2 = "type2"
+
+
+class Protocol(str, Enum):
+ BGP = "bgp"
+ CONNECTED = "connected"
+ EIGRP = "eigrp"
+ ISIS = "isis"
+ LISP = "lisp"
+ NAT_ROUTE = "nat-route"
+ OMP = "omp"
+ STATIC = "static"
class Redistribute(FeatureTemplateValidator):
- protocol: Protocol = Field(description="The routing protocol for redistribution")
- route_policy: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "route-policy"},
- description="The route policy to filter routes for redistribution",
- )
- dia: Optional[BoolStr] = Field(
- default=True, description="Whether to include Direct Internet Access (DIA) routes in redistribution"
- )
+ protocol: Protocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
+ dia: Optional[BoolStr] = True
model_config = ConfigDict(populate_by_name=True)
+class AdType(str, Enum):
+ ON_STARTUP = "on-startup"
+
+
class RouterLsa(FeatureTemplateValidator):
- ad_type: AdType = Field(
- json_schema_extra={"vmanage_key": "ad-type"}, description="Advertisement type for the router LSA"
- )
- time: int = Field(description="Time configuration for the router LSA advertisement")
+ ad_type: AdType = Field(json_schema_extra={"vmanage_key": "ad-type"})
+ time: int
model_config = ConfigDict(populate_by_name=True)
+class Translate(str, Enum):
+ ALWAYS = "always"
+
+
+class Network(str, Enum):
+ BROADCAST = "broadcast"
+ POINT_TO_POINT = "point-to-point"
+ NON_BROADCAST = "non-broadcast"
+ POINT_TO_MULTIPOINT = "point-to-multipoint"
+
+
+class Type(str, Enum):
+ MD5 = "md5"
+ SHA1 = "sha1"
+
+
class Interface(FeatureTemplateValidator):
- name: str = Field(description="The name of the interface")
- hello_interval: Optional[int] = Field(
- default=10,
- json_schema_extra={"vmanage_key": "hello-interval"},
- description="The interval between HELLO packets in seconds",
- )
- dead_interval: Optional[int] = Field(
- default=40,
- json_schema_extra={"vmanage_key": "dead-interval"},
- description="The interval after which a neighbor is declared down if no HELLO packets are received",
- )
- retransmit_interval: Optional[int] = Field(
- default=5,
- json_schema_extra={"vmanage_key": "retransmit-interval"},
- description="The interval between LSA retransmissions",
- )
- cost: Optional[int] = Field(description="The cost metric for the interface")
- network: Optional[Network] = Field(default="broadcast", description="The network type for the OSPF interface")
- passive_interface: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "passive-interface"},
- description="Whether the interface is passive (not sending OSPF packets)",
- )
- type: Type = Field(
- json_schema_extra={"data_path": ["authentication"]},
- description="The type of authentication for OSPF (MD5 or SHA1)",
- )
+ name: str
+ hello_interval: Optional[int] = Field(10, json_schema_extra={"vmanage_key": "hello-interval"})
+ dead_interval: Optional[int] = Field(40, json_schema_extra={"vmanage_key": "dead-interval"})
+ retransmit_interval: Optional[int] = Field(5, json_schema_extra={"vmanage_key": "retransmit-interval"})
+ cost: Optional[int] = None
+ network: Optional[Network] = Network.BROADCAST
+ passive_interface: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "passive-interface"})
+ type: Type = Field(json_schema_extra={"data_path": ["authentication"]})
authentication_key: str = Field(
- json_schema_extra={"vmanage_key": "authentication-key", "data_path": ["authentication"]},
- description="The authentication key for OSPF",
- )
- spi: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["authentication", "ipsec"]},
- description="The Security Parameter Index for IPsec authentication",
+ json_schema_extra={"vmanage_key": "authentication-key", "data_path": ["authentication"]}
)
+ spi: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["authentication", "ipsec"]})
model_config = ConfigDict(populate_by_name=True)
class Range(FeatureTemplateValidator):
- address: ipaddress.IPv4Interface = Field(..., description="The IPv4 interface address and subnet")
- cost: Optional[int] = Field(default=None, description="The cost metric for the address range")
- no_advertise: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "no-advertise"},
- description="Whether to advertise this range or not",
- )
+ address: ipaddress.IPv4Interface
+ cost: Optional[int] = None
+ no_advertise: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "no-advertise"})
model_config = ConfigDict(populate_by_name=True)
class Area(FeatureTemplateValidator):
- a_num: int = Field(json_schema_extra={"vmanage_key": "a-num"}, description="The area number for OSPF configuration")
+ a_num: int = Field(json_schema_extra={"vmanage_key": "a-num"})
stub: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "no-summary", "data_path": ["stub"]},
- description="Configuration for the stub area type with the option to suppress summary LSA",
+ default=None, json_schema_extra={"vmanage_key": "no-summary", "data_path": ["stub"]}
)
nssa: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "no-summary", "data_path": ["nssa"]},
- description="Configuration for the NSSA area type with the option to suppress summary LSA",
- )
- translate: Optional[Translate] = Field(
- default=None,
- json_schema_extra={"data_path": ["nssa"]},
- description="Control for translating type 7 LSAs to type 5 LSAs in NSSA",
+ default=None, json_schema_extra={"vmanage_key": "no-summary", "data_path": ["nssa"]}
)
- normal: Optional[BoolStr] = Field(description="Whether the area is a normal OSPF area")
- interface: Optional[List[Interface]] = Field(
- default=None, description="List of OSPF interface configurations for the area"
- )
- range: Optional[List[Range]] = Field(default=None, description="List of address ranges for the area")
+ translate: Optional[Translate] = Field(default=None, json_schema_extra={"data_path": ["nssa"]})
+ normal: Optional[BoolStr] = None
+ interface: Optional[List[Interface]] = None
+ range: Optional[List[Range]] = None
model_config = ConfigDict(populate_by_name=True)
class RedistributeV6(FeatureTemplateValidator):
- protocol: Protocol = Field(description="The IPv6 routing protocol for redistribution")
- route_policy: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "route-policy"},
- description="The route policy to filter IPv6 routes for redistribution",
- )
+ protocol: Protocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class InterfaceV6(FeatureTemplateValidator):
- name: str = Field(description="The name of the IPv6 interface")
- hello_interval: Optional[int] = Field(
- default=10,
- json_schema_extra={"vmanage_key": "hello-interval"},
- description="The interval between HELLO packets in seconds for IPv6",
- )
- dead_interval: Optional[int] = Field(
- default=40,
- json_schema_extra={"vmanage_key": "dead-interval"},
- description="The interval after which a neighbor is declared down if no HELLO packets are received for IPv6",
- )
- retransmit_interval: Optional[int] = Field(
- default=5,
- json_schema_extra={"vmanage_key": "retransmit-interval"},
- description="The interval between LSA retransmissions for IPv6",
- )
- cost: Optional[int] = Field(description="The cost metric for the IPv6 interface")
- network: Optional[Network] = Field(default="broadcast", description="The network type for the OSPFv3 interface")
- passive_interface: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "passive-interface"},
- description="Whether the IPv6 interface is passive (not sending OSPF packets)",
- )
- type: Type = Field(
- json_schema_extra={"data_path": ["authentication"]},
- description="The type of authentication for OSPFv3 (MD5 or SHA1)",
- )
+ name: str
+ hello_interval: Optional[int] = Field(10, json_schema_extra={"vmanage_key": "hello-interval"})
+ dead_interval: Optional[int] = Field(40, json_schema_extra={"vmanage_key": "dead-interval"})
+ retransmit_interval: Optional[int] = Field(5, json_schema_extra={"vmanage_key": "retransmit-interval"})
+ cost: Optional[int] = None
+ network: Optional[Network] = Network.BROADCAST
+ passive_interface: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "passive-interface"})
+ type: Type = Field(json_schema_extra={"data_path": ["authentication"]})
authentication_key: str = Field(
- json_schema_extra={"vmanage_key": "authentication-key", "data_path": ["authentication"]},
- description="The authentication key for OSPFv3",
- )
- spi: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["authentication", "ipsec"]},
+ json_schema_extra={"vmanage_key": "authentication-key", "data_path": ["authentication"]}
)
+ spi: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["authentication", "ipsec"]})
model_config = ConfigDict(populate_by_name=True)
class RangeV6(FeatureTemplateValidator):
- address: ipaddress.IPv6Interface = Field(..., description="The IPv6 interface address and subnet")
- cost: Optional[int] = Field(default=None, description="The cost metric for the IPv6 address range")
- no_advertise: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "no-advertise"},
- description="Whether to advertise this IPv6 range or not",
- )
+ address: ipaddress.IPv6Interface
+ cost: Optional[int] = None
+ no_advertise: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "no-advertise"})
model_config = ConfigDict(populate_by_name=True)
class AreaV6(FeatureTemplateValidator):
- a_num: int = Field(
- json_schema_extra={"vmanage_key": "a-num"}, description="The IPv6 area number for OSPFv3 configuration"
- )
+ a_num: int = Field(json_schema_extra={"vmanage_key": "a-num"})
stub: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "no-summary", "data_path": ["stub"]},
- description="Configuration for the IPv6 stub area type with the option to suppress summary LSA",
+ default=None, json_schema_extra={"vmanage_key": "no-summary", "data_path": ["stub"]}
)
nssa: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "no-summary", "data_path": ["nssa"]},
- description="Configuration for the IPv6 NSSA area type with the option to suppress summary LSA",
- )
- translate: Optional[Translate] = Field(
- default=None,
- json_schema_extra={"data_path": ["nssa"]},
- description="Control for translating type 7 LSAs to type 5 LSAs in NSSA for IPv6",
+ default=None, json_schema_extra={"vmanage_key": "no-summary", "data_path": ["nssa"]}
)
- normal: Optional[BoolStr] = Field(description="Whether the IPv6 area is a normal OSPFv3 area")
- interface: Optional[List[InterfaceV6]] = Field(
- default=None, description="List of OSPFv3 interface configurations for the IPv6 area"
- )
- range: Optional[List[RangeV6]] = Field(default=None, description="List of IPv6 address ranges for the OSPFv3 area")
+ translate: Optional[Translate] = Field(default=None, json_schema_extra={"data_path": ["nssa"]})
+ normal: Optional[BoolStr] = None
+ interface: Optional[List[InterfaceV6]] = None
+ range: Optional[List[RangeV6]] = None
model_config = ConfigDict(populate_by_name=True)
class CiscoOspfv3Model(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco OSPFv3 (Open Shortest Path First v3) configuration"
router_id_v4: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "router-id", "data_path": ["ospfv3", "address-family", "ipv4"]},
- description="IPv4 address to be used as the router ID for the OSPFv3 process",
+ default=None, json_schema_extra={"vmanage_key": "router-id", "data_path": ["ospfv3", "address-family", "ipv4"]}
)
reference_bandwidth_v4: Optional[int] = Field(
100,
@@ -216,12 +154,10 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "reference-bandwidth",
"data_path": ["ospfv3", "address-family", "ipv4", "auto-cost"],
},
- description="Reference bandwidth in Mbps for calculating the OSPFv3 cost on IPv4 interfaces",
)
rfc1583_v4: Optional[BoolStr] = Field(
default=True,
json_schema_extra={"vmanage_key": "rfc1583", "data_path": ["ospfv3", "address-family", "ipv4", "compatible"]},
- description="Compatibility flag for RFC 1583 to influence OSPFv3 route selection and preferences on IPv4",
)
originate_v4: Optional[BoolStr] = Field(
default=None,
@@ -229,7 +165,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "originate",
"data_path": ["ospfv3", "address-family", "ipv4", "default-information"],
},
- description="Flag to control the origination of default information/routes into the OSPFv3 domain for IPv4",
)
always_v4: Optional[BoolStr] = Field(
default=None,
@@ -237,10 +172,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "always",
"data_path": ["ospfv3", "address-family", "ipv4", "default-information", "originate"],
},
- description=(
- "Flag indicating if the default route should always be advertised in OSPFv3 for IPv4, "
- "irrespective of its presence in the routing table"
- ),
)
metric_v4: Optional[int] = Field(
default=None,
@@ -248,7 +179,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "metric",
"data_path": ["ospfv3", "address-family", "ipv4", "default-information", "originate"],
},
- description="The OSPFv3 metric value to use for the default route advertisement in IPv4",
)
metric_type_v4: Optional[MetricType] = Field(
default=None,
@@ -256,7 +186,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "metric-type",
"data_path": ["ospfv3", "address-family", "ipv4", "default-information", "originate"],
},
- description="The OSPFv3 metric type (E1 or E2) for the default route advertisement in IPv4",
)
external_v4: Optional[int] = Field(
110,
@@ -264,7 +193,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "external",
"data_path": ["ospfv3", "address-family", "ipv4", "distance-ipv4", "ospf"],
},
- description="Administrative distance for OSPFv3 external routes in IPv4",
)
inter_area_v4: Optional[int] = Field(
110,
@@ -272,7 +200,13 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "inter-area",
"data_path": ["ospfv3", "address-family", "ipv4", "distance-ipv4", "ospf"],
},
- description="Administrative distance for OSPFv3 inter-area routes in IPv4",
+ )
+ intra_area_v4: Optional[int] = Field(
+ 110,
+ json_schema_extra={
+ "vmanage_key": "intra-area",
+ "data_path": ["ospfv3", "address-family", "ipv4", "distance-ipv4", "ospf"],
+ },
)
delay_v4: Optional[int] = Field(
200,
@@ -280,10 +214,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "delay",
"data_path": ["ospfv3", "address-family", "ipv4", "timers", "throttle", "spf"],
},
- description=(
- "Initial delay time in milliseconds before the OSPFv3 SPF algorithm starts "
- "after a topology change for IPv4"
- ),
)
initial_hold_v4: Optional[int] = Field(
1000,
@@ -291,10 +221,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "initial-hold",
"data_path": ["ospfv3", "address-family", "ipv4", "timers", "throttle", "spf"],
},
- description=(
- "Initial hold time in milliseconds for the OSPFv3 SPF algorithm to wait "
- "between two successive SPF calculations for IPv4"
- ),
)
max_hold_v4: Optional[int] = Field(
10000,
@@ -302,10 +228,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "max-hold",
"data_path": ["ospfv3", "address-family", "ipv4", "timers", "throttle", "spf"],
},
- description=(
- "Maximum hold time in milliseconds for the OSPFv3 SPF algorithm to wait "
- "between two successive SPF calculations for IPv4"
- ),
)
distance_v4: Optional[int] = Field(
110,
@@ -313,22 +235,18 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "distance",
"data_path": ["ospfv3", "address-family", "ipv4", "distance-ipv4"],
},
- description="Administrative distance for OSPFv3 routes in IPv4",
)
name_v4: Optional[str] = Field(
default=None,
json_schema_extra={"vmanage_key": "name", "data_path": ["ospfv3", "address-family", "ipv4", "table-map"]},
- description="Name of the route map used for OSPFv3 IPv4 route redistribution",
)
filter_v4: Optional[BoolStr] = Field(
default=None,
json_schema_extra={"vmanage_key": "filter", "data_path": ["ospfv3", "address-family", "ipv4", "table-map"]},
- description="Flag indicating whether filtering is applied to OSPFv3 IPv4 routes using the specified route map",
)
redistribute_v4: Optional[List[Redistribute]] = Field(
default=None,
json_schema_extra={"vmanage_key": "redistribute", "data_path": ["ospfv3", "address-family", "ipv4"]},
- description="List of redistribution configurations for OSPFv3 IPv4 address family",
)
router_lsa_v4: Optional[List[RouterLsa]] = Field(
default=None,
@@ -336,19 +254,12 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "router-lsa",
"data_path": ["ospfv3", "address-family", "ipv4", "max-metric"],
},
- description=(
- "List of configurations to set the maximum metric for router LSAs in the OSPFv3 IPv4 address family"
- ),
)
area_v4: Optional[List[Area]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "area", "data_path": ["ospfv3", "address-family", "ipv4"]},
- description="List of OSPFv3 area configurations for the IPv4 address family",
+ default=None, json_schema_extra={"vmanage_key": "area", "data_path": ["ospfv3", "address-family", "ipv4"]}
)
router_id_v6: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "router-id", "data_path": ["ospfv3", "address-family", "ipv6"]},
- description="IPv4 address to be used as the router ID for the OSPFv3 process for IPv6",
+ default=None, json_schema_extra={"vmanage_key": "router-id", "data_path": ["ospfv3", "address-family", "ipv6"]}
)
reference_bandwidth_v6: Optional[int] = Field(
100,
@@ -356,12 +267,10 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "reference-bandwidth",
"data_path": ["ospfv3", "address-family", "ipv6", "auto-cost"],
},
- description="Reference bandwidth in Mbps for calculating the OSPFv3 cost on IPv6 interfaces",
)
rfc1583_v6: Optional[BoolStr] = Field(
default=True,
json_schema_extra={"vmanage_key": "rfc1583", "data_path": ["ospfv3", "address-family", "ipv6", "compatible"]},
- description="Compatibility flag for RFC 1583 to influence OSPFv3 route selection and preferences on IPv6",
)
originate_v6: Optional[BoolStr] = Field(
default=None,
@@ -369,7 +278,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "originate",
"data_path": ["ospfv3", "address-family", "ipv6", "default-information"],
},
- description="Flag to control the origination of default information/routes into the OSPFv3 domain for IPv6",
)
always_v6: Optional[BoolStr] = Field(
default=None,
@@ -377,10 +285,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "always",
"data_path": ["ospfv3", "address-family", "ipv6", "default-information", "originate"],
},
- description=(
- "Flag indicating if the default route should always be advertised in OSPFv3 for IPv6, "
- "irrespective of its presence in the routing table"
- ),
)
metric_v6: Optional[int] = Field(
default=None,
@@ -388,7 +292,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "metric",
"data_path": ["ospfv3", "address-family", "ipv6", "default-information", "originate"],
},
- description="The OSPFv3 metric value to use for the default route advertisement in IPv6",
)
metric_type_v6: Optional[MetricType] = Field(
default=None,
@@ -396,7 +299,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "metric-type",
"data_path": ["ospfv3", "address-family", "ipv6", "default-information", "originate"],
},
- description="The OSPFv3 metric type (E1 or E2) for the default route advertisement in IPv6",
)
external_v6: Optional[int] = Field(
110,
@@ -404,7 +306,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "external",
"data_path": ["ospfv3", "address-family", "ipv6", "distance-ipv6", "ospf"],
},
- description="Administrative distance for OSPFv3 external routes in IPv6",
)
inter_area_v6: Optional[int] = Field(
110,
@@ -412,7 +313,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "inter-area",
"data_path": ["ospfv3", "address-family", "ipv6", "distance-ipv6", "ospf"],
},
- description="Administrative distance for OSPFv3 inter-area routes in IPv6",
)
intra_area_v6: Optional[int] = Field(
110,
@@ -420,7 +320,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "intra-area",
"data_path": ["ospfv3", "address-family", "ipv6", "distance-ipv6", "ospf"],
},
- description="Administrative distance for OSPFv3 intra-area routes in IPv6",
)
delay_v6: Optional[int] = Field(
200,
@@ -428,10 +327,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "delay",
"data_path": ["ospfv3", "address-family", "ipv6", "timers", "throttle", "spf"],
},
- description=(
- "Initial delay time in milliseconds before the OSPFv3 SPF algorithm starts "
- "after a topology change for IPv6"
- ),
)
initial_hold_v6: Optional[int] = Field(
1000,
@@ -439,10 +334,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "initial-hold",
"data_path": ["ospfv3", "address-family", "ipv6", "timers", "throttle", "spf"],
},
- description=(
- "Initial hold time in milliseconds for the OSPFv3 SPF algorithm to "
- "wait between two successive SPF calculations for IPv6"
- ),
)
max_hold_v6: Optional[int] = Field(
10000,
@@ -450,10 +341,6 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "max-hold",
"data_path": ["ospfv3", "address-family", "ipv6", "timers", "throttle", "spf"],
},
- description=(
- "Maximum hold time in milliseconds for the OSPFv3 SPF algorithm "
- "to wait between two successive SPF calculations for IPv6"
- ),
)
distance_v6: Optional[int] = Field(
110,
@@ -461,22 +348,18 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "distance",
"data_path": ["ospfv3", "address-family", "ipv6", "distance-ipv6"],
},
- description="Administrative distance for OSPFv3 routes in IPv6",
)
name_v6: Optional[str] = Field(
default=None,
json_schema_extra={"vmanage_key": "name", "data_path": ["ospfv3", "address-family", "ipv6", "table-map"]},
- description="Name of the route map used for OSPFv3 IPv6 route redistribution",
)
filter_v6: Optional[BoolStr] = Field(
default=None,
json_schema_extra={"vmanage_key": "filter", "data_path": ["ospfv3", "address-family", "ipv6", "table-map"]},
- description="Flag indicating whether filtering is applied to OSPFv3 IPv6 routes using the specified route map",
)
redistribute_v6: Optional[List[RedistributeV6]] = Field(
default=None,
json_schema_extra={"vmanage_key": "redistribute", "data_path": ["ospfv3", "address-family", "ipv6"]},
- description="List of redistribution configurations for OSPFv3 IPv6 address family",
)
router_lsa_v6: Optional[List[RouterLsa]] = Field(
default=None,
@@ -484,14 +367,9 @@ class CiscoOspfv3Model(FeatureTemplate):
"vmanage_key": "router-lsa",
"data_path": ["ospfv3", "address-family", "ipv6", "max-metric"],
},
- description=(
- "List of configurations to set the maximum metric for router LSAs in the OSPFv3 IPv6 address family"
- ),
)
area_v6: Optional[List[AreaV6]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "area", "data_path": ["ospfv3", "address-family", "ipv6"]},
- description="List of OSPFv3 area configurations for the IPv6 address family",
+ default=None, json_schema_extra={"vmanage_key": "area", "data_path": ["ospfv3", "address-family", "ipv6"]}
)
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
diff --git a/catalystwan/api/templates/models/cisco_secure_internet_gateway.py b/catalystwan/api/templates/models/cisco_secure_internet_gateway.py
index c5267035..b7bf6e20 100644
--- a/catalystwan/api/templates/models/cisco_secure_internet_gateway.py
+++ b/catalystwan/api/templates/models/cisco_secure_internet_gateway.py
@@ -1,8 +1,9 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
import ipaddress
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
@@ -25,344 +26,198 @@
DEFAULT_SERVICE_REFRESH_TIME = 0
-Application = Literal["sig"]
-TunnelSet = Literal["secure-internet-gateway-umbrella", "secure-internet-gateway-zscaler"]
-TunnelDcPreference = Literal["primary-dc", "secondary-dc"]
-IkeCiphersuite = Literal["aes256-cbc-sha1", "aes256-cbc-sha2", "aes128-cbc-sha1", "aes128-cbc-sha2"]
-IkeGroup = Literal["2", "14", "15", "16"]
-IpsecCiphersuite = Literal[
- "aes256-cbc-sha1",
- "aes256-cbc-sha384",
- "aes256-cbc-sha256",
- "aes256-cbc-sha512",
- "aes256-gcm",
- "null-sha1",
- "null-sha384",
- "null-sha256",
- "null-sha512",
-]
-PerfectForwardSecrecy = Literal["group-2", "group-14", "group-15", "group-16", "none"]
-DisplayTimeUnit = Literal["MINUTE", "HOUR", "DAY"]
-RefreshTimeUnit = Literal["MINUTE", "HOUR", "DAY"]
-TrackerType = Literal["SIG"]
-SvcType = Literal["sig"]
+class Application(str, Enum):
+ SIG = "sig"
+
+
+class TunnelSet(str, Enum):
+ SECURE_INTERNET_GATEWAY_UMBRELLA = "secure-internet-gateway-umbrella"
+ SECURE_INTERNET_GATEWAY_ZSCALER = "secure-internet-gateway-zscaler"
+
+
+class TunnelDcPreference(str, Enum):
+ PRIMARY_DC = "primary-dc"
+ SECONDARY_DC = "secondary-dc"
+
+
+class IkeCiphersuite(str, Enum):
+ AES256_CBC_SHA1 = "aes256-cbc-sha1"
+ AES256_CBC_SHA2 = "aes256-cbc-sha2"
+ AES128_CBC_SHA1 = "aes128-cbc-sha1"
+ AES128_CBC_SHA2 = "aes128-cbc-sha2"
+
+
+class IkeGroup(str, Enum):
+ TWO = "2"
+ FOURTEEN = "14"
+ FIFTEEN = "15"
+ SIXTEEN = "16"
+
+
+class IpsecCiphersuite(str, Enum):
+ AES256_CBC_SHA1 = "aes256-cbc-sha1"
+ AES256_CBC_SHA384 = "aes256-cbc-sha384"
+ AES256_CBC_SHA256 = "aes256-cbc-sha256"
+ AES256_CBC_SHA512 = "aes256-cbc-sha512"
+ AES256_GCM = "aes256-gcm"
+ NULL_SHA1 = "null-sha1"
+ NULL_SHA384 = "null-sha384"
+ NULL_SHA256 = "null-sha256"
+ NULL_SHA512 = "null-sha512"
+
+
+class PerfectForwardSecrecy(str, Enum):
+ GROUP_2 = "group-2"
+ GROUP_14 = "group-14"
+ GROUP_15 = "group-15"
+ GROUP_16 = "group-16"
+ NONE = "none"
class Interface(FeatureTemplateValidator):
- if_name: str = Field(
- ..., # Ellipsis indicates a required field
- json_schema_extra={"vmanage_key": "if-name"},
- description="Name of the interface.",
- )
- auto: bool = Field(..., description="Flag to indicate if the interface should be automatically configured.")
- shutdown: bool = Field(..., description="Flag to indicate if the interface is administratively down (shutdown).")
- description: Optional[str] = Field(default=None, description="Description for the interface.")
- unnumbered: bool = Field(default=True, description="Flag to indicate if the interface should be unnumbered.")
- address: Optional[ipaddress.IPv4Interface] = Field(
- default=None, description="IPv4 address and subnet mask for the interface."
- )
+ if_name: str = Field(json_schema_extra={"vmanage_key": "if-name"})
+ auto: bool
+ shutdown: bool
+ description: Optional[str] = None
+ unnumbered: bool = True
+ address: Optional[ipaddress.IPv4Interface] = None
tunnel_source: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tunnel-source"},
- description="IPv4 address used as the source of the tunnel.",
+ default=None, json_schema_extra={"vmanage_key": "tunnel-source"}
)
tunnel_source_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tunnel-source-interface"},
- description="Interface name used as the source of the tunnel.",
- )
- tunnel_route_via: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tunnel-route-via"},
- description="The route via which tunnel traffic should be sent.",
+ default=None, json_schema_extra={"vmanage_key": "tunnel-source-interface"}
)
- tunnel_destination: str = Field(
- ...,
- json_schema_extra={"vmanage_key": "tunnel-destination"},
- description="The destination address for the tunnel.",
- )
- application: Application = Field(default="sig", description="Application type for the Secure Internet Gateway.")
+ tunnel_route_via: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "tunnel-route-via"})
+ tunnel_destination: str = Field(json_schema_extra={"vmanage_key": "tunnel-destination"})
+ application: Application = Application.SIG
tunnel_set: TunnelSet = Field(
- default="secure-internet-gateway-umbrella",
- json_schema_extra={"vmanage_key": "tunnel-set"},
- description="Tunnel set used for the Secure Internet Gateway.",
+ TunnelSet.SECURE_INTERNET_GATEWAY_UMBRELLA, json_schema_extra={"vmanage_key": "tunnel-set"}
)
tunnel_dc_preference: TunnelDcPreference = Field(
- default="primary-dc",
- json_schema_extra={"vmanage_key": "tunnel-dc-preference"},
- description="Data center preference for the tunnel.",
- )
- tcp_mss_adjust: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tcp-mss-adjust"},
- description="TCP Maximum Segment Size (MSS) adjust value.",
- )
- mtu: int = Field(
- default=DEFAULT_INTERFACE_MTU, description="MTU (Maximum Transmission Unit) size for the interface."
+ TunnelDcPreference.PRIMARY_DC, json_schema_extra={"vmanage_key": "tunnel-dc-preference"}
)
+ tcp_mss_adjust: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tcp-mss-adjust"})
+ mtu: int = DEFAULT_INTERFACE_MTU
dpd_interval: Optional[int] = Field(
- default=DEFAULT_INTERFACE_DPD_INTERVAL,
- json_schema_extra={"vmanage_key": "dpd-interval"},
- description="Dead Peer Detection (DPD) interval in seconds.",
- )
- dpd_retries: Optional[int] = Field(
- default=DEFAULT_INTERFACE_DPD_RETRIES,
- json_schema_extra={"vmanage_key": "dpd-retries"},
- description="Number of retries for Dead Peer Detection (DPD).",
- )
- ike_version: int = Field(
- default=DEFAULT_INTERFACE_IKE_VERSION,
- json_schema_extra={"vmanage_key": "ike-version"},
- description="Internet Key Exchange (IKE) protocol version.",
- )
- pre_shared_secret: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "pre-shared-secret"},
- description="Pre-shared secret key for IKE authentication.",
+ DEFAULT_INTERFACE_DPD_INTERVAL, json_schema_extra={"vmanage_key": "dpd-interval"}
)
+ dpd_retries: Optional[int] = Field(DEFAULT_INTERFACE_DPD_RETRIES, json_schema_extra={"vmanage_key": "dpd-retries"})
+ ike_version: int = Field(DEFAULT_INTERFACE_IKE_VERSION, json_schema_extra={"vmanage_key": "ike-version"})
+ pre_shared_secret: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "pre-shared-secret"})
ike_rekey_interval: Optional[int] = Field(
- default=DEFAULT_INTERFACE_IKE_REKEY_INTERVAL,
- json_schema_extra={"vmanage_key": "ike-rekey-interval"},
- description="Interval for rekeying the IKE security association.",
+ DEFAULT_INTERFACE_IKE_REKEY_INTERVAL, json_schema_extra={"vmanage_key": "ike-rekey-interval"}
)
ike_ciphersuite: Optional[IkeCiphersuite] = Field(
- default="aes256-cbc-sha1",
- json_schema_extra={"vmanage_key": "ike-ciphersuite"},
- description="Ciphersuite for IKE security association establishment.",
- )
- ike_group: IkeGroup = Field(
- default="14",
- json_schema_extra={"vmanage_key": "ike-group"},
- description="Diffie-Hellman group used for IKE key exchange.",
- )
- pre_shared_key_dynamic: bool = Field(
- default=True,
- json_schema_extra={"vmanage_key": "pre-shared-key-dynamic"},
- description="Flag indicating if the pre-shared key is dynamic.",
- )
- ike_local_id: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "ike-local-id"},
- description="Local identifier for IKE authentication.",
- )
- ike_remote_id: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "ike-remote-id"},
- description="Remote identifier for IKE authentication.",
+ IkeCiphersuite.AES256_CBC_SHA1, json_schema_extra={"vmanage_key": "ike-ciphersuite"}
)
+ ike_group: IkeGroup = Field(IkeGroup.FOURTEEN, json_schema_extra={"vmanage_key": "ike-group"})
+ pre_shared_key_dynamic: bool = Field(True, json_schema_extra={"vmanage_key": "pre-shared-key-dynamic"})
+ ike_local_id: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "ike-local-id"})
+ ike_remote_id: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "ike-remote-id"})
ipsec_rekey_interval: Optional[int] = Field(
- default=DEFAULT_INTERFACE_IPSEC_REKEY_INTERVAL,
- json_schema_extra={"vmanage_key": "ipsec-rekey-interval"},
- description="Interval for rekeying the IPsec security association.",
+ DEFAULT_INTERFACE_IPSEC_REKEY_INTERVAL, json_schema_extra={"vmanage_key": "ipsec-rekey-interval"}
)
ipsec_replay_window: Optional[int] = Field(
- default=DEFAULT_INTERFACE_IPSEC_REPLAY_WINDOW,
- json_schema_extra={"vmanage_key": "ipsec-replay-window"},
- description="Replay window size for IPsec security association.",
+ DEFAULT_INTERFACE_IPSEC_REPLAY_WINDOW, json_schema_extra={"vmanage_key": "ipsec-replay-window"}
)
ipsec_ciphersuite: IpsecCiphersuite = Field(
- default="aes256-gcm",
- json_schema_extra={"vmanage_key": "ipsec-ciphersuite"},
- description="Ciphersuite for IPsec security association establishment.",
+ IpsecCiphersuite.AES256_GCM, json_schema_extra={"vmanage_key": "ipsec-ciphersuite"}
)
perfect_forward_secrecy: PerfectForwardSecrecy = Field(
- default="none",
- json_schema_extra={"vmanage_key": "perfect-forward-secrecy"},
- description="Perfect Forward Secrecy (PFS) setting for IPsec key exchange.",
- )
- tracker: Optional[bool] = Field(default=None, description="Flag indicating if interface tracking is enabled.")
- track_enable: Optional[bool] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "track-enable"},
- description="Flag indicating if tracking is enabled for the interface.",
+ PerfectForwardSecrecy.NONE, json_schema_extra={"vmanage_key": "perfect-forward-secrecy"}
)
- tunnel_public_ip: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- description="Public IP required to setup GRE tunnel to Zscaler",
- json_schema_extra={"vmanage_key": "tunnel-public-ip"},
- )
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ tracker: Optional[bool] = None
+ track_enable: Optional[bool] = Field(True, json_schema_extra={"vmanage_key": "track-enable"})
+ model_config = ConfigDict(populate_by_name=True)
+
+
+class SvcType(str, Enum):
+ SIG = "sig"
class InterfacePair(FeatureTemplateValidator):
- active_interface: str = Field(
- ..., json_schema_extra={"vmanage_key": "active-interface"}, description="Name of the active interface."
- )
+ active_interface: str = Field(json_schema_extra={"vmanage_key": "active-interface"})
active_interface_weight: int = Field(
- default=DEFAULT_INTERFACE_PAIR_ACTIVE_INTERFACE_WEIGHT,
- json_schema_extra={"vmanage_key": "active-interface-weight"},
- description="Weighting factor for the active interface, used in failover decisions.",
- )
- backup_interface: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "backup-interface"},
- description="Name of the backup interface. Can be 'None' if no backup interface is defined.",
+ DEFAULT_INTERFACE_PAIR_ACTIVE_INTERFACE_WEIGHT, json_schema_extra={"vmanage_key": "active-interface-weight"}
)
+ backup_interface: Optional[str] = Field("None", json_schema_extra={"vmanage_key": "backup-interface"})
backup_interface_weight: int = Field(
- default=DEFAULT_INTERFACE_PAIR_BACKUP_INTERFACE_WEIGHT,
- json_schema_extra={"vmanage_key": "backup-interface-weight"},
- description="Weighting factor for the backup interface, used in failover decisions.",
+ DEFAULT_INTERFACE_PAIR_BACKUP_INTERFACE_WEIGHT, json_schema_extra={"vmanage_key": "backup-interface-weight"}
)
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ model_config = ConfigDict(populate_by_name=True)
+
+
+class DisplayTimeUnit(str, Enum):
+ MINUTE = "MINUTE"
+ HOUR = "HOUR"
+ DAY = "DAY"
+
+
+class RefreshTimeUnit(str, Enum):
+ MINUTE = "MINUTE"
+ HOUR = "HOUR"
+ DAY = "DAY"
class Service(FeatureTemplateValidator):
- svc_type: SvcType = Field(
- default="sig", json_schema_extra={"vmanage_key": "svc-type"}, description="Type of service configured."
- )
+ svc_type: SvcType = Field(SvcType.SIG, json_schema_extra={"vmanage_key": "svc-type"})
interface_pair: List[InterfacePair] = Field(
- ...,
- json_schema_extra={"data_path": ["ha-pairs"], "vmanage_key": "interface-pair"},
- description="List of high-availability interface pairs.",
- )
- auth_required: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "auth-required"},
- description="Flag indicating if authentication is required for the service.",
- )
- xff_forward_enabled: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "xff-forward-enabled"},
- description="Flag indicating if X-Forwarded-For HTTP header is enabled.",
- )
- ofw_enabled: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "ofw-enabled"},
- description="Flag indicating if on-premise firewall is enabled.",
- )
- ips_control: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "ips-control"},
- description="Flag indicating if Intrusion Prevention System (IPS) control is enabled.",
- )
- caution_enabled: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "caution-enabled"},
- description="Flag indicating if caution warnings are enabled.",
- )
- primary_data_center: Optional[str] = Field(
- default="Auto",
- json_schema_extra={"vmanage_key": "primary-data-center"},
- description="Primary data center for the service. 'Auto' for automatic selection.",
- )
- secondary_data_center: Optional[str] = Field(
- default="Auto",
- json_schema_extra={"vmanage_key": "secondary-data-center"},
- description="Secondary data center for the service. 'Auto' for automatic selection.",
- )
- ip: Optional[bool] = Field(
- default=None, description="Flag indicating if IP filtering or processing is enabled for the service."
- )
- idle_time: Optional[int] = Field(
- default=DEFAULT_SERVICE_IDLE_TIME,
- json_schema_extra={"vmanage_key": "idle-time"},
- description="Idle time before a session is considered inactive.",
- )
-
+ json_schema_extra={"data_path": ["ha-pairs"], "vmanage_key": "interface-pair"}
+ )
+ auth_required: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "auth-required"})
+ xff_forward_enabled: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "xff-forward-enabled"})
+ ofw_enabled: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "ofw-enabled"})
+ ips_control: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "ips-control"})
+ caution_enabled: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "caution-enabled"})
+ primary_data_center: Optional[str] = Field("Auto", json_schema_extra={"vmanage_key": "primary-data-center"})
+ secondary_data_center: Optional[str] = Field("Auto", json_schema_extra={"vmanage_key": "secondary-data-center"})
+ ip: Optional[bool] = None
+ idle_time: Optional[int] = Field(DEFAULT_SERVICE_IDLE_TIME, json_schema_extra={"vmanage_key": "idle-time"})
display_time_unit: Optional[DisplayTimeUnit] = Field(
- default="MINUTE",
- json_schema_extra={"vmanage_key": "display-time-unit"},
- description="Unit of time used for displaying time-related settings.",
+ DisplayTimeUnit.MINUTE, json_schema_extra={"vmanage_key": "display-time-unit"}
)
ip_enforced_for_known_browsers: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "ip-enforced-for-known-browsers"},
- description="Flag indicating if IP is enforced for known browsers.",
- )
- refresh_time: Optional[int] = Field(
- default=DEFAULT_SERVICE_REFRESH_TIME,
- json_schema_extra={"vmanage_key": "refresh-time"},
- description="Time after which the service information is refreshed.",
+ False, json_schema_extra={"vmanage_key": "ip-enforced-for-known-browsers"}
)
+ refresh_time: Optional[int] = Field(DEFAULT_SERVICE_REFRESH_TIME, json_schema_extra={"vmanage_key": "refresh-time"})
refresh_time_unit: Optional[RefreshTimeUnit] = Field(
- default="MINUTE",
- json_schema_extra={"vmanage_key": "refresh-time-unit"},
- description="Unit of time used for the refresh time setting.",
+ RefreshTimeUnit.MINUTE, json_schema_extra={"vmanage_key": "refresh-time-unit"}
)
- enabled: Optional[bool] = Field(default=None, description="Flag indicating if the service is enabled.")
+ enabled: Optional[bool] = None
block_internet_until_accepted: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "block-internet-until-accepted"},
- description="Flag indicating if Internet access is blocked until the service is accepted.",
- )
- force_ssl_inspection: Optional[bool] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "force-ssl-inspection"},
- description="Flag indicating if SSL inspection is forced.",
+ False, json_schema_extra={"vmanage_key": "block-internet-until-accepted"}
)
- timeout: Optional[int] = Field(
- default=None, description="Timeout value for the service, after which the session is considered inactive."
- )
- location_name: Optional[str] = Field(
- default="Auto",
- json_schema_extra={"vmanage_key": "location-name"},
- description="Secondary data center for the service. 'Auto' for automatic selection.",
- )
- data_center_primary: Optional[str] = Field(
- default="Auto",
- json_schema_extra={"vmanage_key": "data-center-primary"},
- description="Zscaler location name (optional)",
- )
- data_center_secondary: Optional[str] = Field(
- default="Auto",
- json_schema_extra={"vmanage_key": "data-center-secondary"},
- description=(
- "Secondary data center for the service. 'Auto' for automatic selection "
- "or a specific identifier for a manual selection."
- ),
- )
-
+ force_ssl_inspection: Optional[bool] = Field(False, json_schema_extra={"vmanage_key": "force-ssl-inspection"})
+ timeout: Optional[int] = None
+ data_center_primary: Optional[str] = Field("Auto", json_schema_extra={"vmanage_key": "data-center-primary"})
+ data_center_secondary: Optional[str] = Field("Auto", json_schema_extra={"vmanage_key": "data-center-secondary"})
model_config = ConfigDict(populate_by_name=True)
+class TrackerType(str, Enum):
+ SIG = "SIG"
+
+
class Tracker(FeatureTemplateValidator):
- name: str = Field(..., description="Name of the tracker.")
- endpoint_api_url: str = Field(
- ...,
- json_schema_extra={"vmanage_key": "endpoint-api-url"},
- description="URL of the endpoint API used by the tracker for health checks.",
- )
- threshold: Optional[int] = Field(
- default=DEFAULT_TRACKER_THRESHOLD, description="Threshold value for the tracker to trigger an alert or action."
- )
- interval: Optional[int] = Field(
- default=DEFAULT_TRACKER_INTERVAL, description="Interval at which the tracker performs health checks."
- )
- multiplier: Optional[int] = Field(
- default=DEFAULT_TRACKER_MULTIPLIER,
- description="Multiplier value used by the tracker to escalate repeated failures.",
- )
- tracker_type: TrackerType = Field(
- ..., json_schema_extra={"vmanage_key": "tracker-type"}, description="Type of tracker used for monitoring."
- )
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ name: str
+ endpoint_api_url: str = Field(json_schema_extra={"vmanage_key": "endpoint-api-url"})
+ threshold: Optional[int] = DEFAULT_TRACKER_THRESHOLD
+ interval: Optional[int] = DEFAULT_TRACKER_INTERVAL
+ multiplier: Optional[int] = DEFAULT_TRACKER_MULTIPLIER
+ tracker_type: TrackerType = Field(json_schema_extra={"vmanage_key": "tracker-type"})
+ model_config = ConfigDict(populate_by_name=True)
class CiscoSecureInternetGatewayModel(FeatureTemplate):
- model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco Secure Internet Gateway feature template configuration"
+ model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- vpn_id: int = Field(
- default=DEFAULT_SIG_VPN_ID,
- json_schema_extra={"vmanage_key": "vpn-id"},
- description="VPN ID associated with the Cisco Secure Internet Gateway service.",
- )
- child_org_id: str = Field(
- default="",
- json_schema_extra={"vmanage_key": "childOrgId"},
- description="Child Organization Id",
- )
- interface: List[Interface] = Field(description="List of interface configurations associated with the service.")
- service: List[Service] = Field(description="List of service configurations for the Cisco Secure Internet Gateway.")
+ vpn_id: int = Field(DEFAULT_SIG_VPN_ID, json_schema_extra={"vmanage_key": "vpn-id"})
+ interface: List[Interface]
+ service: List[Service]
tracker_src_ip: Optional[ipaddress.IPv4Interface] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tracker-src-ip"},
- description="Source IP address used by the tracker for sending health check packets.",
- )
- tracker: Optional[List[Tracker]] = Field(
- default=None,
- description="List of trackers for monitoring the health of the Cisco Secure Internet Gateway service.",
+ default=None, json_schema_extra={"vmanage_key": "tracker-src-ip"}
)
+ tracker: Optional[List[Tracker]] = None
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_secure_internet_gateway"
diff --git a/catalystwan/api/templates/models/cisco_snmp_model.py b/catalystwan/api/templates/models/cisco_snmp_model.py
index 813f1089..ca6c1fe8 100644
--- a/catalystwan/api/templates/models/cisco_snmp_model.py
+++ b/catalystwan/api/templates/models/cisco_snmp_model.py
@@ -1,102 +1,88 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-Authorization = Literal["read-only"]
-SecurityLevel = Literal["no-auth-no-priv", "auth-no-priv", "auth-priv"]
-Auth = Literal["md5", "sha"]
-Priv = Literal["aes-cfb-128", "aes-256-cfb-128"]
-
class Oid(FeatureTemplateValidator):
- id: str = Field(description="The OID (Object Identifier) to include or exclude in the view")
- exclude: Optional[BoolStr] = Field(
- default=None, description="Indicates whether the OID should be excluded from the view"
- )
+ id: str
+ exclude: Optional[BoolStr] = None
class View(FeatureTemplateValidator):
- name: str = Field(description="The name of the SNMP view")
- oid: Optional[List[Oid]] = Field(default=None, description="List of OIDs to include or exclude in the view")
+ name: str
+ oid: Optional[List[Oid]] = None
+
+
+class Authorization(str, Enum):
+ READ_ONLY = "read-only"
class Community(FeatureTemplateValidator):
- name: str = Field(description="The name of the SNMP community")
- view: str = Field(description="The SNMP view associated with the community")
- authorization: Authorization = Field(description="The authorization level of the community")
+ name: str
+ view: str
+ authorization: Authorization
+
+
+class SecurityLevel(str, Enum):
+ NOAUTHNOPRIV = "no-auth-no-priv"
+ AUTHNOPRIV = "auth-no-priv"
+ AUTHPRIV = "auth-priv"
class Group(FeatureTemplateValidator):
- name: str = Field(description="The name of the SNMP group")
- security_level: SecurityLevel = Field(
- description="The security level associated with the group", json_schema_extra={"vmanage_key": "security-level"}
- )
- view: str = Field(description="The SNMP view associated with the group")
+ name: str
+ security_level: SecurityLevel = Field(json_schema_extra={"vmanage_key": "security-level"})
+ view: str
model_config = ConfigDict(populate_by_name=True)
+class Auth(str, Enum):
+ MD5 = "md5"
+ SHA = "sha"
+
+
+class Priv(str, Enum):
+ AES_CFB_128 = "aes-cfb-128"
+
+
class User(FeatureTemplateValidator):
- name: str = Field(description="The name of the SNMP user")
- auth: Optional[Auth] = Field(default=None, description="The authentication protocol used")
- auth_password: Optional[str] = Field(
- default=None, description="The password for authentication", json_schema_extra={"vmanage_key": "auth-password"}
- )
- priv: Optional[Priv] = Field(default=None, description="The privacy (encryption) protocol used")
- priv_password: Optional[str] = Field(
- default=None, description="The password for privacy", json_schema_extra={"vmanage_key": "priv-password"}
- )
- group: str = Field(description="The group to which the user belongs")
+ name: str
+ auth: Optional[Auth] = None
+ auth_password: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "auth-password"})
+ priv: Optional[Priv] = None
+ priv_password: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "priv-password"})
+ group: str
model_config = ConfigDict(populate_by_name=True)
class Target(FeatureTemplateValidator):
- vpn_id: int = Field(
- description="The VPN ID where the SNMP target resides", json_schema_extra={"vmanage_key": "vpn-id"}
- )
- ip: str = Field(description="The IP address of the SNMP target")
- port: int = Field(description="The port number for the SNMP target")
- community_name: Optional[str] = Field(
- default=None,
- description="The community name for the SNMP target",
- json_schema_extra={"vmanage_key": "community-name"},
- )
- user: Optional[str] = Field(default=None, description="The user name for the SNMP target")
- source_interface: Optional[str] = Field(
- default=None,
- description="The source interface for sending SNMP traps",
- json_schema_extra={"vmanage_key": "source-interface"},
- )
+ vpn_id: int = Field(json_schema_extra={"vmanage_key": "vpn-id"})
+ ip: str
+ port: int
+ community_name: str = Field(default=None, json_schema_extra={"vmanage_key": "community-name"})
+ user: Optional[str] = None
+ source_interface: str = Field(default=None, json_schema_extra={"vmanage_key": "source-interface"})
model_config = ConfigDict(populate_by_name=True)
class CiscoSNMPModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco SNMP Feature Template configuration"
-
- shutdown: Optional[BoolStr] = Field(
- default=True, description="Indicates whether SNMP is administratively shut down"
- )
- contact: Optional[str] = Field(default=None, description="The contact information for the SNMP administrator")
- location: Optional[str] = Field(default=None, description="The physical location information for the SNMP agent")
- view: Optional[List[View]] = Field(default=None, description="List of SNMP views for controlling access to OIDs")
- community: Optional[List[Community]] = Field(
- default=None, description="List of SNMP communities for different access rights"
- )
- group: Optional[List[Group]] = Field(
- default=None, description="List of SNMP groups defining security models and access rights"
- )
- user: Optional[List[User]] = Field(
- default=None, description="List of SNMP users with authentication and privacy configurations"
- )
- target: Optional[List[Target]] = Field(
- default=None, json_schema_extra={"data_path": ["trap"]}, description="List of SNMP targets for sending traps"
- )
+
+ shutdown: Optional[BoolStr] = True
+ contact: Optional[str] = None
+ location: Optional[str] = None
+ view: Optional[List[View]] = None
+ community: Optional[List[Community]] = None
+ group: Optional[List[Group]] = None
+ user: Optional[List[User]] = None
+ target: Optional[List[Target]] = Field(default=None, json_schema_extra={"data_path": ["trap"]})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_snmp"
diff --git a/catalystwan/api/templates/models/cisco_system.py b/catalystwan/api/templates/models/cisco_system.py
index a1654bdb..6532cc5c 100644
--- a/catalystwan/api/templates/models/cisco_system.py
+++ b/catalystwan/api/templates/models/cisco_system.py
@@ -1,318 +1,207 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.device_variable import DeviceVariable
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-from catalystwan.models.common import Protocol, Timezone
-
-SiteType = Literal["type-1", "type-2", "type-3", "cloud", "branch", "br", "spoke"]
-ConsoleBaudRate = Literal["1200", "2400", "4800", "9600", "19200", "38400", "57600", "115200"]
-Boolean = Literal["or", "and"]
-Type = Literal["interface", "static-route"]
-Role = Literal["edge-router", "border-router"]
-EnableMrfMigration = Literal["enabled", "enabled-from-bgp-core"]
-Epfr = Literal["disabled", "aggressive", "moderate", "conservative"]
+from catalystwan.utils.timezone import Timezone
class MobileNumber(FeatureTemplateValidator):
- number: str = Field(description="The mobile phone number used for notification or security purposes.")
+ number: str
+
+
+class SiteType(str, Enum):
+ TYPE_1 = "type-1"
+ TYPE_2 = "type-2"
+ TYPE_3 = "type-3"
+ CLOUD = "cloud"
+ BRANCH = "branch"
+ BR = "br"
+ SPOKE = "spoke"
+
+
+class ConsoleBaudRate(str, Enum):
+ _1200 = "1200"
+ _2400 = "2400"
+ _4800 = "4800"
+ _9600 = "9600"
+ _19200 = "19200"
+ _38400 = "38400"
+ _57600 = "57600"
+ _115200 = "115200"
+
+
+class Protocol(str, Enum):
+ TCP = "tcp"
+ UDP = "udp"
+
+
+class Boolean(str, Enum):
+ OR = "or"
+ AND = "and"
+
+
+class Type(str, Enum):
+ INTERFACE = "interface"
+ STATIC_ROUTE = "static-route"
class Tracker(FeatureTemplateValidator):
- name: str = Field(description="Name for the Tracker")
- endpoint_ip: Optional[str] = Field(
- default=None,
- description="The IP address of the endpoint to track.",
- json_schema_extra={"vmanage_key": "endpoint-ip"},
- )
+ name: str
+ endpoint_ip: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "endpoint-ip"})
endpoint_ip_transport_port: Optional[str] = Field(
- default=None,
- description="The transport port of the endpoint IP address.",
- json_schema_extra={"vmanage_key": "endpoint-ip", "data_path": ["endpoint-ip-transport-port"]},
- )
- protocol: Optional[Protocol] = Field(
- default=None,
- description="The protocol used for the tracker (TCP or UDP).",
- json_schema_extra={"data_path": ["endpoint-ip-transport-port"]},
- )
- port: Optional[int] = Field(
- default=None,
- description="The port number used for the tracker.",
- json_schema_extra={"data_path": ["endpoint-ip-transport-port"]},
- )
- endpoint_dns_name: Optional[str] = Field(
- default=None,
- description="The DNS name of the endpoint to track.",
- json_schema_extra={"vmanage_key": "endpoint-dns-name"},
- )
- endpoint_api_url: Optional[str] = Field(
- default=None,
- description="The API URL of the endpoint to track.",
- json_schema_extra={"vmanage_key": "endpoint-api-url"},
- )
- elements: Optional[List[str]] = Field(default=None, description="A list of elements to track.")
- boolean: Optional[Boolean] = Field(
- default="or", description="The boolean condition to use when evaluating multiple elements."
- )
- threshold: Optional[int] = Field(default=300, description="The threshold for triggering the tracker.")
- interval: Optional[int] = Field(default=60, description="The interval at which the tracker checks the elements.")
- multiplier: Optional[int] = Field(default=3, description="The multiplier used for determining the loss threshold.")
- type: Optional[Type] = Field(default="interface", description="The type of tracker (interface or static route).")
-
+ default=None, json_schema_extra={"vmanage_key": "endpoint-ip", "data_path": ["endpoint-ip-transport-port"]}
+ )
+ protocol: Optional[Protocol] = Field(default=None, json_schema_extra={"data_path": ["endpoint-ip-transport-port"]})
+ port: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["endpoint-ip-transport-port"]})
+ endpoint_dns_name: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "endpoint-dns-name"})
+ endpoint_api_url: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "endpoint-api-url"})
+ elements: Optional[List[str]] = None
+ boolean: Optional[Boolean] = Boolean.OR
+ threshold: Optional[int] = 300
+ interval: Optional[int] = 60
+ multiplier: Optional[int] = 3
+ type: Optional[Type] = Type.INTERFACE
model_config = ConfigDict(populate_by_name=True)
class Object(FeatureTemplateValidator):
- number: int = Field(description="The unique identifier for the object.")
+ number: int
class ObjectTrack(FeatureTemplateValidator):
- object_number: int = Field(
- description="The tracking object number.", json_schema_extra={"vmanage_key": "object-number"}
- )
- interface: str = Field(description="The name of the interface to track.")
- sig: str = Field(description="The signature associated with the tracking object.")
- ip: str = Field(description="The IP address used for tracking.")
- mask: Optional[str] = Field(
- default="0.0.0.0", description="The subnet mask associated with the IP address for tracking."
- )
- vpn: int = Field(description="The VPN instance associated with the tracking object.")
- object: List[Object] = Field(description="A list of objects related to the tracking.")
- boolean: Boolean = Field(description="The boolean condition to use when evaluating multiple objects.")
+ object_number: int = Field(json_schema_extra={"vmanage_key": "object-number"})
+ interface: str
+ sig: str
+ ip: str
+ mask: Optional[str] = "0.0.0.0"
+ vpn: int
+ object: List[Object]
+ boolean: Boolean
model_config = ConfigDict(populate_by_name=True)
+class Role(str, Enum):
+ EDGE_ROUTER = "edge-router"
+ BORDER_ROUTER = "border-router"
+
+
class AffinityPerVrf(FeatureTemplateValidator):
affinity_group_number: Optional[int] = Field(
- default=None,
- description="The affinity group number for VRF binding.",
- json_schema_extra={"vmanage_key": "affinity-group-number"},
- )
- vrf_range: Optional[str] = Field(
- default=None,
- description="The range of VRFs associated with the affinity group.",
- json_schema_extra={"vmanage_key": "vrf-range"},
+ default=None, json_schema_extra={"vmanage_key": "affinity-group-number"}
)
+ vrf_range: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "vrf-range"})
model_config = ConfigDict(populate_by_name=True)
+class EnableMrfMigration(str, Enum):
+ ENABLE = "enabled"
+ ENABLE_FROM_BGP_CORE = "enabled-from-bgp-core"
+
+
class Vrf(FeatureTemplateValidator):
- vrf_id: int = Field(
- description="The VRF (VPN Routing and Forwarding) instance ID.", json_schema_extra={"vmanage_key": "vrf-id"}
- )
+ vrf_id: int = Field(json_schema_extra={"vmanage_key": "vrf-id"})
gateway_preference: Optional[List[int]] = Field(
- default=None,
- description="List of affinity group preferences for VRF",
- json_schema_extra={"vmanage_key": "gateway-preference"},
+ default=None, json_schema_extra={"vmanage_key": "gateway-preference"}
)
model_config = ConfigDict(populate_by_name=True)
+class Epfr(str, Enum):
+ DISABLED = "disabled"
+ AGGRESSIVE = "aggressive"
+ MODERATE = "moderate"
+ CONSERVATIVE = "conservative"
+
+
class CiscoSystemModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco System configuration settings for SD-WAN devices."
- timezone: Optional[Timezone] = Field(
- default=None, description="The timezone setting for the system.", json_schema_extra={"data_path": ["clock"]}
- )
- description: Optional[str] = Field(default=None, description="Set a text description of the device")
+ timezone: Optional[Timezone] = Field(default=None, json_schema_extra={"data_path": ["clock"]})
hostname: DeviceVariable = Field(
default=DeviceVariable(name="system_host_name"),
validate_default=True,
- description="The hostname for the device.",
json_schema_extra={"vmanage_key": "host-name"},
)
- location: Optional[str] = Field(default=None, description="The physical location of the device.")
- latitude: Optional[float] = Field(
- default=None,
- description="The latitude coordinate for the device's location.",
- json_schema_extra={"data_path": ["gps-location"]},
- )
- longitude: Optional[float] = Field(
- default=None,
- description="The longitude coordinate for the device's location.",
- json_schema_extra={"data_path": ["gps-location"]},
- )
- range: Optional[int] = Field(
- default=100,
- description="The range for geo-fencing feature.",
- json_schema_extra={"data_path": ["gps-location", "geo-fencing"]},
- )
+ location: Optional[str] = None
+ latitude: Optional[float] = Field(default=None, json_schema_extra={"data_path": ["gps-location"]})
+ longitude: Optional[float] = Field(default=None, json_schema_extra={"data_path": ["gps-location"]})
+ range: Optional[int] = Field(100, json_schema_extra={"data_path": ["gps-location", "geo-fencing"]})
enable_fencing: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable geo-fencing.",
- json_schema_extra={"data_path": ["gps-location", "geo-fencing"], "vmanage_key": "enable"},
+ default=None, json_schema_extra={"data_path": ["gps-location", "geo-fencing"], "vmanage_key": "enable"}
)
mobile_number: Optional[List[MobileNumber]] = Field(
default=None,
- description="List of mobile numbers for SMS notifications.",
json_schema_extra={"vmanage_key": "mobile-number", "data_path": ["gps-location", "geo-fencing", "sms"]},
)
enable_sms: Optional[BoolStr] = Field(
- default=False,
- description="Enable or disable SMS notifications.",
- json_schema_extra={"data_path": ["gps-location", "geo-fencing", "sms"], "vmanage_key": "enable"},
- )
- device_groups: Optional[List[str]] = Field(
- default=None,
- description="List of device groups the device belongs to.",
- json_schema_extra={"vmanage_key": "device-groups"},
+ default=False, json_schema_extra={"data_path": ["gps-location", "geo-fencing", "sms"], "vmanage_key": "enable"}
)
+ device_groups: Optional[List[str]] = Field(default=None, json_schema_extra={"vmanage_key": "device-groups"})
controller_group_list: Optional[List[int]] = Field(
- default=None,
- description="List of controller groups the device is associated with.",
- json_schema_extra={"vmanage_key": "controller-group-list"},
+ default=None, json_schema_extra={"vmanage_key": "controller-group-list"}
)
system_ip: DeviceVariable = Field(
- default=DeviceVariable(name="system_system_ip"),
- description="The system IP address of the device.",
- json_schema_extra={"vmanage_key": "system-ip"},
- )
- overlay_id: Optional[int] = Field(
- default=None, description="The overlay ID of the device.", json_schema_extra={"vmanage_key": "overlay-id"}
- )
- site_id: int = Field(
- default=DeviceVariable(name="system_site_id"),
- description="The site ID of the device.",
- json_schema_extra={"vmanage_key": "site-id"},
- )
- site_type: Optional[List[SiteType]] = Field(
- default=None,
- description="The site type classification for the device.",
- json_schema_extra={"vmanage_key": "site-type"},
- )
- port_offset: Optional[int] = Field(
- default=None, description="The port offset for the device.", json_schema_extra={"vmanage_key": "port-offset"}
- )
- port_hop: Optional[BoolStr] = Field(
- default=None, description="Enable or disable port hopping.", json_schema_extra={"vmanage_key": "port-hop"}
- )
- control_session_pps: Optional[int] = Field(
- default=None,
- description="Control session packets per second setting.",
- json_schema_extra={"vmanage_key": "control-session-pps"},
- )
- track_transport: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable transport tracking.",
- json_schema_extra={"vmanage_key": "track-transport"},
- )
- track_interface_tag: Optional[int] = Field(
- default=None,
- description="The tag of the interface to be tracked.",
- json_schema_extra={"vmanage_key": "track-interface-tag"},
- )
-
+ default=DeviceVariable(name="system_system_ip"), json_schema_extra={"vmanage_key": "system-ip"}
+ )
+ overlay_id: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "overlay-id"})
+ site_id: int = Field(default=DeviceVariable(name="system_site_id"), json_schema_extra={"vmanage_key": "site-id"})
+ site_type: Optional[List[SiteType]] = Field(default=None, json_schema_extra={"vmanage_key": "site-type"})
+ port_offset: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "port-offset"})
+ port_hop: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "port-hop"})
+ control_session_pps: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "control-session-pps"})
+ track_transport: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "track-transport"})
+ track_interface_tag: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "track-interface-tag"})
console_baud_rate: Optional[ConsoleBaudRate] = Field(
- default=None,
- description="The console baud rate setting for the device.",
- json_schema_extra={"vmanage_key": "console-baud-rate"},
- )
- max_omp_sessions: Optional[int] = Field(
- default=None,
- description="The maximum number of OMP (Overlay Management Protocol) sessions.",
- json_schema_extra={"vmanage_key": "max-omp-sessions"},
- )
- multi_tenant: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable multi-tenant support.",
- json_schema_extra={"vmanage_key": "multi-tenant"},
+ default=None, json_schema_extra={"vmanage_key": "console-baud-rate"}
)
+ max_omp_sessions: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "max-omp-sessions"})
+ multi_tenant: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "multi-tenant"})
track_default_gateway: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable default gateway tracking.",
- json_schema_extra={"vmanage_key": "track-default-gateway"},
+ default=None, json_schema_extra={"vmanage_key": "track-default-gateway"}
)
admin_tech_on_failure: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable automatic generation of admin technical details on failure.",
- json_schema_extra={"vmanage_key": "admin-tech-on-failure"},
+ default=None, json_schema_extra={"vmanage_key": "admin-tech-on-failure"}
)
enable_tunnel: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable tunnel functionality.",
- json_schema_extra={"vmanage_key": "enable", "data_path": ["on-demand"]},
- )
- idle_timeout: Optional[int] = Field(
- default=None,
- description="The idle timeout setting for tunnels.",
- json_schema_extra={"vmanage_key": "idle-timeout"},
+ default=None, json_schema_extra={"vmanage_key": "enable", "data_path": ["on-demand"]}
)
+ idle_timeout: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "idle-timeout"})
on_demand_idle_timeout_min: Optional[int] = Field(
- default=None,
- description="The minimum idle timeout for on-demand tunnels.",
- json_schema_extra={"vmanage_key": "idle-timeout", "data_path": ["on-demand"]},
- )
- tracker: Optional[List[Tracker]] = Field(default=None, description="List of tracker configurations.")
- object_track: Optional[List[ObjectTrack]] = Field(
- default=None,
- description="List of object tracking configurations.",
- json_schema_extra={"vmanage_key": "object-track"},
- )
- region_id: Optional[int] = Field(
- default=None, description="The region ID of the device.", json_schema_extra={"vmanage_key": "region-id"}
- )
- secondary_region: Optional[int] = Field(
- default=None,
- description="The secondary region ID of the device.",
- json_schema_extra={"vmanage_key": "secondary-region"},
- )
- role: Optional[Role] = Field(
- default=None,
- description="The role of the device in the network.",
+ default=None, json_schema_extra={"vmanage_key": "idle-timeout", "data_path": ["on-demand"]}
)
+ tracker: Optional[List[Tracker]] = None
+ object_track: Optional[List[ObjectTrack]] = Field(default=None, json_schema_extra={"vmanage_key": "object-track"})
+ region_id: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "region-id"})
+ secondary_region: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "secondary-region"})
+ role: Optional[Role] = None
affinity_group_number: Optional[int] = Field(
- default=None,
- description="The affinity group number for VRF binding.",
- json_schema_extra={"vmanage_key": "affinity-group-number", "data_path": ["affinity-group"]},
- )
- preference: Optional[List[int]] = Field(
- default=None,
- description="List of affinity group preferences.",
- json_schema_extra={"data_path": ["affinity-group"]},
- )
- preference_auto: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable automatic preference setting for affinity groups.",
- json_schema_extra={"vmanage_key": "preference-auto", "data_path": ["affinity-group"]},
+ default=None, json_schema_extra={"vmanage_key": "affinity-group-number", "data_path": ["affinity-group"]}
)
+ preference: Optional[List[int]] = Field(default=None, json_schema_extra={"data_path": ["affinity-group"]})
+ preference_auto: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "preference-auto"})
affinity_per_vrf: Optional[List[AffinityPerVrf]] = Field(
- default=None,
- description="List of affinity configurations per VRF.",
- json_schema_extra={"vmanage_key": "affinity-per-vrf", "data_path": ["affinity-group"]},
- )
- transport_gateway: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable the transport gateway feature.",
- json_schema_extra={"vmanage_key": "transport-gateway"},
+ default=None, json_schema_extra={"vmanage_key": "affinity-per-vrf"}
)
+ transport_gateway: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "transport-gateway"})
enable_mrf_migration: Optional[EnableMrfMigration] = Field(
- default=None,
- description="Enable Multicast Routing Framework (MRF) migration settings.",
- json_schema_extra={"vmanage_key": "enable-mrf-migration"},
+ default=None, json_schema_extra={"vmanage_key": "enable-mrf-migration"}
)
migration_bgp_community: Optional[int] = Field(
- default=None,
- description="BGP community value for MRF migration.",
- json_schema_extra={"vmanage_key": "migration-bgp-community"},
+ default=None, json_schema_extra={"vmanage_key": "migration-bgp-community"}
)
enable_management_region: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable management region configuration.",
- json_schema_extra={"vmanage_key": "enable-management-region"},
- )
- vrf: Optional[List[Vrf]] = Field(default=None, description="List of VRF configurations.")
- management_gateway: Optional[BoolStr] = Field(
- default=None,
- description="Enable or disable the management gateway feature.",
- json_schema_extra={"vmanage_key": "management-gateway"},
+ default=None, json_schema_extra={"vmanage_key": "enable-management-region"}
)
- epfr: Optional[Epfr] = Field(default=None, description="Edge Policy-based Framework Routing (EPFR) setting.")
+ vrf: Optional[List[Vrf]] = None
+ management_gateway: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "management-gateway"})
+ epfr: Optional[Epfr] = None
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_system"
diff --git a/catalystwan/api/templates/models/cisco_vpn_interface_model.py b/catalystwan/api/templates/models/cisco_vpn_interface_model.py
index f05f8b45..66b82d12 100644
--- a/catalystwan/api/templates/models/cisco_vpn_interface_model.py
+++ b/catalystwan/api/templates/models/cisco_vpn_interface_model.py
@@ -1,14 +1,14 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
import ipaddress
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-from catalystwan.models.common import Protocol, StaticNatDirection, TLOCColor
DEFAULT_STATIC_NAT64_SOURCE_VPN_ID = 0
DEFAULT_STATIC_NAT_SOURCE_VPN_ID = 0
@@ -22,800 +22,443 @@
DEFAULT_IPV6_VRRP_TIMER = 1000
-Direction = Literal["in", "out"]
-NatChoice = Literal["Interface", "Pool", "Loopback"]
-CoreRegion = Literal["core", "core-shared"]
-SecondaryRegion = Literal["off", "secondary-only", "secondary-shared"]
-Encap = Literal["gre", "ipsec"]
-Mode = Literal["hub", "spoke"]
-Carrier = Literal[
- "default", "carrier1", "carrier2", "carrier3", "carrier4", "carrier5", "carrier6", "carrier7", "carrier8"
-]
-MediaType = Literal["auto-select", "rj45", "sfp"]
-Speed = Literal["10", "100", "1000", "2500", "10000"]
-Duplex = Literal["full", "half", "auto"]
-TrackAction = Literal["Decrement", "Shutdown"]
-
-
class SecondaryIPv4Address(FeatureTemplateValidator):
- address: Optional[ipaddress.IPv4Interface] = Field(
- default=None, description="IPv4 address with CIDR notation for the secondary interface."
- )
+ address: Optional[ipaddress.IPv4Interface] = None
class SecondaryIPv6Address(FeatureTemplateValidator):
- address: Optional[ipaddress.IPv6Interface] = Field(
- default=None, description="IPv6 address with CIDR notation for the secondary interface."
- )
+ address: Optional[ipaddress.IPv6Interface] = None
+
+
+class Direction(str, Enum):
+ IN = "in"
+ OUT = "out"
class AccessList(FeatureTemplateValidator):
- direction: Direction = Field(..., description="Direction of the traffic flow for applying the ACL ('in' or 'out').")
- acl_name: str = Field(
- ..., json_schema_extra={"vmanage_key": "acl-name"}, description="Name of the access control list."
- )
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ direction: Direction
+ acl_name: str = Field(json_schema_extra={"vmanage_key": "acl-name"})
+ model_config = ConfigDict(populate_by_name=True)
class DhcpHelperV6(FeatureTemplateValidator):
- address: ipaddress.IPv6Address = Field(..., description="IPv6 address of the DHCP server or relay.")
- vpn: Optional[int] = Field(default=None, description="Optional VPN ID where the DHCP helper is configured.")
+ address: ipaddress.IPv6Address
+ vpn: Optional[int] = None
+
+
+class NatChoice(str, Enum):
+ INTERFACE = "Interface"
+ POOL = "Pool"
+ LOOPBACK = "Loopback"
class StaticNat66(FeatureTemplateValidator):
- source_prefix: ipaddress.IPv6Interface = Field(
- ...,
- json_schema_extra={"vmanage_key": "source-prefix"},
- description="IPv6 network prefix that is to be translated.",
- )
- translated_source_prefix: str = Field(
- ...,
- json_schema_extra={"vmanage_key": "translated-source-prefix"},
- description="IPv6 network prefix to which the source prefix is translated.",
- )
- source_vpn_id: int = Field(
- default=DEFAULT_STATIC_NAT64_SOURCE_VPN_ID,
- json_schema_extra={"vmanage_key": "source-vpn-id"},
- description="VPN ID associated with the source network prefix.",
- )
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ source_prefix: ipaddress.IPv6Interface = Field(json_schema_extra={"vmanage_key": "source-prefix"})
+ translated_source_prefix: str = Field(json_schema_extra={"vmanage_key": "translated-source-prefix"})
+ source_vpn_id: int = Field(DEFAULT_STATIC_NAT64_SOURCE_VPN_ID, json_schema_extra={"vmanage_key": "source-vpn-id"})
+ model_config = ConfigDict(populate_by_name=True)
+
+
+class StaticNatDirection(str, Enum):
+ INSIDE = "inside"
+ OUTSIDE = "outside"
class Static(FeatureTemplateValidator):
- source_ip: ipaddress.IPv4Address = Field(
- ..., json_schema_extra={"vmanage_key": "source-ip"}, description="IPv4 address of the source IP for static NAT."
- )
- translate_ip: ipaddress.IPv4Address = Field(
- ...,
- json_schema_extra={"vmanage_key": "translate-ip"},
- description="IPv4 address used for translation in static NAT.",
- )
+ source_ip: ipaddress.IPv4Address = Field(json_schema_extra={"vmanage_key": "source-ip"})
+ translate_ip: ipaddress.IPv4Address = Field(json_schema_extra={"vmanage_key": "translate-ip"})
static_nat_direction: StaticNatDirection = Field(
- default="inside",
- json_schema_extra={"vmanage_key": "static-nat-direction"},
- description="Direction of static NAT mapping ('inside' or 'outside').",
- )
- source_vpn: int = Field(
- default=DEFAULT_STATIC_NAT_SOURCE_VPN_ID,
- json_schema_extra={"vmanage_key": "source-vpn"},
- description="VPN ID associated with the source IP for static NAT.",
+ StaticNatDirection.INSIDE, json_schema_extra={"vmanage_key": "static-nat-direction"}
)
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ source_vpn: int = Field(DEFAULT_STATIC_NAT_SOURCE_VPN_ID, json_schema_extra={"vmanage_key": "source-vpn"})
+ model_config = ConfigDict(populate_by_name=True)
+
+
+class Proto(str, Enum):
+ TCP = "tcp"
+ UDP = "udp"
class StaticPortForward(FeatureTemplateValidator):
- source_ip: ipaddress.IPv4Address = Field(
- ...,
- json_schema_extra={"vmanage_key": "source-ip"},
- description="IPv4 address of the source IP for port forwarding.",
- )
- translate_ip: ipaddress.IPv4Address = Field(
- ...,
- json_schema_extra={"vmanage_key": "translate-ip"},
- description="IPv4 address used for translation in port forwarding.",
- )
+ source_ip: ipaddress.IPv4Address = Field(json_schema_extra={"vmanage_key": "source-ip"})
+ translate_ip: ipaddress.IPv4Address = Field(json_schema_extra={"vmanage_key": "translate-ip"})
static_nat_direction: StaticNatDirection = Field(
- default="inside",
- json_schema_extra={"vmanage_key": "static-nat-direction"},
- description="Direction of port forwarding mapping ('inside' or 'outside').",
- )
- source_port: int = Field(
- default=DEFAULT_STATIC_PORT_FORWARD_SOURCE_PORT,
- json_schema_extra={"vmanage_key": "source-port"},
- description="Source port number for port forwarding.",
+ StaticNatDirection.INSIDE, json_schema_extra={"vmanage_key": "static-nat-direction"}
)
+ source_port: int = Field(DEFAULT_STATIC_PORT_FORWARD_SOURCE_PORT, json_schema_extra={"vmanage_key": "source-port"})
translate_port: int = Field(
- default=DEFAULT_STATIC_PORT_FORWARD_TRANSLATE_PORT,
- json_schema_extra={"vmanage_key": "translate-port"},
- description="Translated port number for port forwarding.",
- )
- proto: Protocol = Field(..., description="Protocol used for port forwarding (TCP/UDP).")
- source_vpn: int = Field(
- default=DEFAULT_STATIC_PORT_FORWARD_SOURCE_VPN,
- json_schema_extra={"vmanage_key": "source-vpn"},
- description="VPN ID associated with the source IP for port forwarding.",
+ DEFAULT_STATIC_PORT_FORWARD_TRANSLATE_PORT, json_schema_extra={"vmanage_key": "translate-port"}
)
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ proto: Proto
+ source_vpn: int = Field(DEFAULT_STATIC_PORT_FORWARD_SOURCE_VPN, json_schema_extra={"vmanage_key": "source-vpn"})
+ model_config = ConfigDict(populate_by_name=True)
+
+
+class CoreRegion(str, Enum):
+ CORE = "core"
+ CORE_SHARED = "core-shared"
+
+
+class SecondaryRegion(str, Enum):
+ OFF = "off"
+ SECONDARY_ONLY = "secondary-only"
+ SECONDARY_SHARED = "secondary-shared"
+
+
+class Encap(str, Enum):
+ GRE = "gre"
+ IPSEC = "ipsec"
class Encapsulation(FeatureTemplateValidator):
- encap: Encap = Field(..., description="Type of encapsulation used for the VPN tunnel (GRE/IPsec).")
- preference: Optional[int] = Field(
- default=None, description="Preference value for the encapsulation type (lower values have higher priority)."
- )
- weight: int = Field(
- default=DEFAULT_ENCAPSULATION_WEIGHT,
- description="Weight for the encapsulation type used in load balancing decisions.",
- )
+ encap: Encap
+ preference: Optional[int] = None
+ weight: int = DEFAULT_ENCAPSULATION_WEIGHT
+
+
+class Mode(str, Enum):
+ HUB = "hub"
+ SPOKE = "spoke"
+
+
+class Value(str, Enum):
+ DEFAULT = "default"
+ MPLS = "mpls"
+ METRO_ETHERNET = "metro-ethernet"
+ BIZ_INTERNET = "biz-internet"
+ PUBLIC_INTERNET = "public-internet"
+ LTE = "lte"
+ THREEG = "3g"
+ RED = "red"
+ GREEN = "green"
+ BLUE = "blue"
+ GOLD = "gold"
+ SILVER = "silver"
+ BRONZE = "bronze"
+ CUSTOM1 = "custom1"
+ CUSTOM2 = "custom2"
+ CUSTOM3 = "custom3"
+ PRIVATE1 = "private1"
+ PRIVATE2 = "private2"
+ PRIVATE3 = "private3"
+ PRIVATE4 = "private4"
+ PRIVATE5 = "private5"
+ PRIVATE6 = "private6"
+
+
+class Carrier(str, Enum):
+ DEFAULT = "default"
+ CARRIER1 = "carrier1"
+ CARRIER2 = "carrier2"
+ CARRIER3 = "carrier3"
+ CARRIER4 = "carrier4"
+ CARRIER5 = "carrier5"
+ CARRIER6 = "carrier6"
+ CARRIER7 = "carrier7"
+ CARRIER8 = "carrier8"
+
+
+class MediaType(str, Enum):
+ AUTO_SELECT = "auto-select"
+ RJ45 = "rj45"
+ SFP = "sfp"
+
+
+class Speed(str, Enum):
+ TEN = "10"
+ HUNDRED = "100"
+ THOUSAND = "1000"
+ TWOANDAHALFTHOUSAND = "2500"
+ TENTHOUSAND = "10000"
+
+
+class Duplex(str, Enum):
+ FULL = "full"
+ HALF = "half"
+ AUTO = "auto"
class Ip(FeatureTemplateValidator):
- addr: ipaddress.IPv4Address = Field(..., description="IPv4 address for the interface.")
- mac: str = Field(..., description="MAC address associated with the IPv4 address.")
+ addr: ipaddress.IPv4Address
+ mac: str
class Ipv4Secondary(FeatureTemplateValidator):
- address: ipaddress.IPv4Address = Field(..., description="IPv4 address for the secondary interface.")
+ address: ipaddress.IPv4Address
+
+
+class TrackAction(str, Enum):
+ DECREMENT = "Decrement"
+ SHUTDOWN = "Shutdown"
class TrackingObject(FeatureTemplateValidator):
- name: int = Field(..., description="Unique identifier for the tracking object.")
- track_action: TrackAction = Field(
- default="Decrement",
- json_schema_extra={"vmanage_key": "track-action"},
- description="Action to take when the tracked object state changes (e.g., decrement priority or shutdown).",
- )
- decrement: int = Field(
- ..., description="Value by which to decrement the VRRP priority when the tracked object is down."
- )
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ name: int
+ track_action: TrackAction = Field(TrackAction.DECREMENT, json_schema_extra={"vmanage_key": "track-action"})
+ decrement: int
+ model_config = ConfigDict(populate_by_name=True)
class Vrrp(FeatureTemplateValidator):
- grp_id: int = Field(..., json_schema_extra={"vmanage_key": "grp-id"}, description="VRRP group ID.")
- priority: int = Field(
- default=DEFAULT_VRRP_PRIORITY, description="Priority value for the VRRP group (higher values take precedence)."
- )
- timer: int = Field(default=DEFAULT_VRRP_TIMER, description="VRRP advertisement interval timer in milliseconds.")
- track_omp: BoolStr = Field(
- default=False,
- json_schema_extra={"vmanage_key": "track-omp"},
- description="Flag to track Overlay Management Protocol (OMP) session state.",
- )
- track_prefix_list: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "track-prefix-list"},
- description="Name of the prefix-list used for tracking specific routes.",
- )
+ grp_id: int = Field(json_schema_extra={"vmanage_key": "grp-id"})
+ priority: int = DEFAULT_VRRP_PRIORITY
+ timer: int = DEFAULT_VRRP_TIMER
+ track_omp: BoolStr = Field(default=False, json_schema_extra={"vmanage_key": "track-omp"})
+ track_prefix_list: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "track-prefix-list"})
address: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- json_schema_extra={"data_path": ["ipv4"], "vmanage_key": "address"},
- description="Virtual IP address used by the VRRP group.",
+ default=None, json_schema_extra={"data_path": ["ipv4"], "vmanage_key": "address"}
)
ipv4_secondary: Optional[List[Ipv4Secondary]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "ipv4-secondary"},
- description="List of secondary IPv4 addresses for the VRRP group.",
- )
- tloc_change_pref: BoolStr = Field(
- default=False,
- json_schema_extra={"vmanage_key": "tloc-change-pref"},
- description="Flag to change preference based on TLOC status.",
+ default=None, json_schema_extra={"vmanage_key": "ipv4-secondary"}
)
- value: int = Field(..., description="VRRP value to determine the primary node for the VRRP group.")
+ tloc_change_pref: BoolStr = Field(default=False, json_schema_extra={"vmanage_key": "tloc-change-pref"})
+ value: int
tracking_object: Optional[List[TrackingObject]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tracking-object"},
- description="List of tracking objects associated with the VRRP configuration.",
+ default=None, json_schema_extra={"vmanage_key": "tracking-object"}
)
- model_config: ClassVar[ConfigDict] = ConfigDict(populate_by_name=True)
+ model_config = ConfigDict(populate_by_name=True)
class Ipv6(FeatureTemplateValidator):
- ipv6_link_local: ipaddress.IPv6Address = Field(
- ...,
- json_schema_extra={"vmanage_key": "ipv6-link-local"},
- description="IPv6 link-local address for the interface.",
- )
- prefix: Optional[ipaddress.IPv6Interface] = Field(
- default=None, description="Optional IPv6 prefix for the interface, with CIDR notation."
- )
+ ipv6_link_local: ipaddress.IPv6Address = Field(json_schema_extra={"vmanage_key": "ipv6-link-local"})
+ prefix: Optional[ipaddress.IPv6Interface] = None
model_config = ConfigDict(populate_by_name=True)
class Ipv6Vrrp(FeatureTemplateValidator):
- grp_id: int = Field(..., json_schema_extra={"vmanage_key": "grp-id"}, description="IPv6 VRRP group ID.")
- priority: int = Field(
- default=DEFAULT_IPV6_VRRP_PRIORITY,
- description="Priority value for the IPv6 VRRP group (higher values take precedence).",
- )
- timer: int = Field(
- default=DEFAULT_IPV6_VRRP_TIMER, description="IPv6 VRRP advertisement interval timer in milliseconds."
- )
- track_omp: BoolStr = Field(
- default=False,
- json_schema_extra={"vmanage_key": "track-omp"},
- description="Flag to track Overlay Management Protocol (OMP) session state for IPv6.",
- )
- track_prefix_list: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "track-prefix-list"},
- description="Name of the IPv6 prefix-list used for tracking specific routes.",
- )
- ipv6: Optional[List[Ipv6]] = Field(
- default=None, description="List of IPv6 configurations associated with the VRRP group."
- )
+ grp_id: int = Field(json_schema_extra={"vmanage_key": "grp-id"})
+ priority: int = DEFAULT_IPV6_VRRP_PRIORITY
+ timer: int = DEFAULT_IPV6_VRRP_TIMER
+ track_omp: BoolStr = Field(default=False, json_schema_extra={"vmanage_key": "track-omp"})
+ track_prefix_list: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "track-prefix-list"})
+ ipv6: Optional[List[Ipv6]] = None
model_config = ConfigDict(populate_by_name=True)
class CiscoVpnInterfaceModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco VPN Interface Feature Template configuration"
- if_name: Optional[str] = Field(
- default=None, description="The name of the interface.", json_schema_extra={"vmanage_key": "if-name"}
- )
- interface_description: Optional[str] = Field(
- default=None, description="A description for the interface.", json_schema_extra={"vmanage_key": "description"}
- )
- poe: Optional[BoolStr] = Field(
- default=None,
- description="Power over Ethernet setting for the interface. True if enabled, False otherwise.",
- )
- ipv4_address: Optional[str] = Field(
- default=None,
- description="The primary IPv4 address assigned to the interface.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "address"},
- )
+ if_name: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "if-name"})
+ interface_description: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "description"})
+ poe: Optional[BoolStr] = None
+ ipv4_address: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["ip"], "vmanage_key": "address"})
secondary_ipv4_address: Optional[List[SecondaryIPv4Address]] = Field(
- default=None,
- description="A list of secondary IPv4 addresses assigned to the interface.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "secondary-address"},
+ default=None, json_schema_extra={"data_path": ["ip"], "vmanage_key": "secondary-address"}
)
dhcp_ipv4_client: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Whether DHCP client is enabled on the interface for IPv4 addressing. True if enabled, False otherwise."
- ),
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "dhcp-client"},
- )
- dhcp_distance: Optional[int] = Field(
- default=None,
- description="Administrative distance for DHCP routes on the interface.",
- json_schema_extra={"vmanage_key": "dhcp-distance"},
+ default=None, json_schema_extra={"data_path": ["ip"], "vmanage_key": "dhcp-client"}
)
+ dhcp_distance: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "dhcp-distance"})
ipv6_address: Optional[ipaddress.IPv6Interface] = Field(
- default=None,
- description="The primary IPv6 address assigned to the interface.",
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "address"},
+ default=None, json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "address"}
)
dhcp_ipv6_client: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Whether DHCP client is enabled on the interface for IPv6 addressing. True if enabled, False otherwise."
- ),
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "dhcp-client"},
+ default=None, json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "dhcp-client"}
)
secondary_ipv6_address: Optional[List[SecondaryIPv6Address]] = Field(
- default=None,
- description="A list of secondary IPv6 addresses assigned to the interface.",
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "secondary-address"},
- )
- access_list_ipv4: Optional[List[AccessList]] = Field(
- default=None,
- description="A list of IPv4 access control lists (ACLs) applied to the interface.",
- json_schema_extra={"vmanage_key": "access-list"},
+ default=None, json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "secondary-address"}
)
+ access_list_ipv4: Optional[List[AccessList]] = Field(default=None, json_schema_extra={"vmanage_key": "access-list"})
dhcp_helper: Optional[List[ipaddress.IPv4Address]] = Field(
- default=None,
- description="A list of DHCP helper addresses configured on the interface.",
- json_schema_extra={"vmanage_key": "dhcp-helper"},
+ default=None, json_schema_extra={"vmanage_key": "dhcp-helper"}
)
dhcp_helper_v6: Optional[List[DhcpHelperV6]] = Field(
- default=None,
- description="A list of DHCPv6 helper configurations applied to the interface.",
- json_schema_extra={"vmanage_key": "dhcp-helper-v6"},
- )
- tracker: Optional[List[str]] = Field(
- default=None,
- description="A list of tracker identifiers associated with the interface.",
+ default=None, json_schema_extra={"vmanage_key": "dhcp-helper-v6"}
)
+ tracker: Optional[List[str]] = None
auto_bandwidth_detect: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Whether automatic bandwidth detection is enabled on the interface. True if enabled, False otherwise."
- ),
- json_schema_extra={"vmanage_key": "auto-bandwidth-detect"},
+ default=None, json_schema_extra={"vmanage_key": "auto-bandwidth-detect"}
)
iperf_server: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- description="The IP address of the iPerf server used for performance testing from this interface.",
- json_schema_extra={"vmanage_key": "iperf-server"},
- )
- nat: Optional[BoolStr] = Field(
- default=None,
- description="Indicates whether Network Address Translation (NAT) is enabled on the interface.",
- )
- nat_choice: Optional[NatChoice] = Field(
- default=None,
- description="The type of NAT configured on the interface, if applicable.",
- json_schema_extra={"vmanage_key": "nat-choice"},
- )
- udp_timeout: Optional[int] = Field(
- default=None,
- description="The timeout value in seconds for UDP connections through the NAT on this interface.",
- json_schema_extra={"vmanage_key": "udp-timeout"},
- )
- tcp_timeout: Optional[int] = Field(
- default=None,
- description="The timeout value in seconds for TCP connections through the NAT on this interface.",
- json_schema_extra={"vmanage_key": "tcp-timeout"},
+ default=None, json_schema_extra={"vmanage_key": "iperf-server"}
)
+ nat: Optional[BoolStr] = None
+ nat_choice: Optional[NatChoice] = Field(default=None, json_schema_extra={"vmanage_key": "nat-choice"})
+ udp_timeout: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "udp-timeout"})
+ tcp_timeout: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tcp-timeout"})
nat_range_start: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- description="The starting IP address in the range used for NAT on this interface.",
- json_schema_extra={"vmanage_key": "range-start"},
- )
- nat_range_end: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- description="The ending IP address in the range used for NAT on this interface.",
- json_schema_extra={"vmanage_key": "range-end"},
- )
- overload: Optional[BoolStr] = Field(
- default=None,
- description="Indicates if NAT overload (PAT - Port Address Translation) is enabled.",
- )
- loopback_interface: Optional[str] = Field(
- default=None,
- description="The associated loopback interface, if any, for the VPN interface.",
- json_schema_extra={"vmanage_key": "loopback-interface"},
- )
- prefix_length: Optional[int] = Field(
- default=None,
- description="The prefix length for the interface's IP address, indicating the size of the subnet.",
- json_schema_extra={"vmanage_key": "prefix-length"},
- )
- enable: Optional[BoolStr] = Field(
- default=None,
- description="Indicates whether the interface is enabled or disabled.",
- )
- nat64: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Indicates whether NAT64 is enabled on the interface, "
- "allowing IPv6 addresses to communicate with IPv4 services."
- ),
- )
- nat66: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Indicates whether NAT66 is enabled on the interface, translating IPv6 addresses into IPv6 addresses."
- ),
- )
- static_nat66: Optional[List[StaticNat66]] = Field(
- default=None,
- description="List of static NAT66 entries for translating IPv6 addresses into other IPv6 addresses.",
- json_schema_extra={"vmanage_key": "static-nat66"},
- )
-
+ default=None, json_schema_extra={"vmanage_key": "range-start"}
+ )
+ nat_range_end: Optional[ipaddress.IPv4Address] = Field(default=None, json_schema_extra={"vmanage_key": "range-end"})
+ overload: Optional[BoolStr] = None
+ loopback_interface: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "loopback-interface"})
+ prefix_length: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "prefix-length"})
+ enable: Optional[BoolStr] = None
+ nat64: Optional[BoolStr] = None
+ nat66: Optional[BoolStr] = None
+ static_nat66: Optional[List[StaticNat66]] = Field(default=None, json_schema_extra={"vmanage_key": "static-nat66"})
static: Optional[List[Static]] = Field(
- default=None,
- description="List of static NAT entries for configuring one-to-one address mappings.",
- json_schema_extra={"data_path": ["nat"], "vmanage_key": "static"},
+ default=None, json_schema_extra={"data_path": ["nat"], "vmanage_key": "static"}
)
static_port_forward: Optional[List[StaticPortForward]] = Field(
- default=None,
- description="List of static port forwarding entries for the interface.",
- json_schema_extra={"vmanage_key": "static-port-forward"},
- )
- enable_core_region: Optional[BoolStr] = Field(
- default=None,
- description="Indicates if the interface is part of the core network region for centralized services.",
- json_schema_extra={"vmanage_key": "enable-core-region"},
- )
- core_region: Optional[CoreRegion] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "core-region"},
- description="Configuration details for the core region.",
+ default=None, json_schema_extra={"vmanage_key": "static-port-forward"}
)
+ enable_core_region: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "enable-core-region"})
+ core_region: Optional[CoreRegion] = Field(default=None, json_schema_extra={"vmanage_key": "core-region"})
secondary_region: Optional[SecondaryRegion] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "secondary-region"},
- description="Configuration details for a secondary region.",
+ default=None, json_schema_extra={"vmanage_key": "secondary-region"}
)
tloc_encapsulation: Optional[List[Encapsulation]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "encapsulation", "data_path": ["tunnel-interface"]},
- description="Transport Location (TLOC) encapsulation settings.",
- )
- border: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"]},
- description="Defines if the interface is at the border of a network segment.",
- )
- per_tunnel_qos: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "per-tunnel-qos"},
- description="Enable or disable per-tunnel Quality of Service (QoS).",
+ default=None, json_schema_extra={"vmanage_key": "encapsulation", "data_path": ["tunnel-interface"]}
)
+ border: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface"]})
+ per_tunnel_qos: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "per-tunnel-qos"})
per_tunnel_qos_aggregator: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "per-tunnel-qos-aggregator"},
- description="Enable or disable per-tunnel QoS aggregator.",
- )
- mode: Optional[Mode] = Field(default=None, description="Defines the operating mode for the interface.")
- tunnels_bandwidth: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tunnels-bandwidth"},
- description="Specifies the total bandwidth available across all tunnels.",
- )
- group: Optional[List[int]] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"]},
- description="Identifies the group or groups the interface belongs to.",
- )
- value: Optional[TLOCColor] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "color"]},
- description=(
- "The value field often corresponds to a specific attribute or setting, such as color in this context."
- ),
+ default=None, json_schema_extra={"vmanage_key": "per-tunnel-qos-aggregator"}
)
+ mode: Optional[Mode] = None
+ tunnels_bandwidth: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tunnels-bandwidth"})
+ group: Optional[List[int]] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface"]})
+ value: Optional[Value] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface", "color"]})
max_control_connections: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "max-control-connections", "data_path": ["tunnel-interface"]},
- description="Maximum number of control connections that can be established on the interface.",
+ default=None, json_schema_extra={"vmanage_key": "max-control-connections", "data_path": ["tunnel-interface"]}
)
control_connections: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "control-connections", "data_path": ["tunnel-interface"]},
- description="Enables or disables control connections on the interface.",
+ default=None, json_schema_extra={"vmanage_key": "control-connections", "data_path": ["tunnel-interface"]}
)
vbond_as_stun_server: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "vbond-as-stun-server", "data_path": ["tunnel-interface"]},
- description="Configures the vBond orchestrator to act as a STUN server for the interface.",
+ default=None, json_schema_extra={"vmanage_key": "vbond-as-stun-server", "data_path": ["tunnel-interface"]}
)
exclude_controller_group_list: Optional[List[int]] = Field(
default=None,
json_schema_extra={"vmanage_key": "exclude-controller-group-list", "data_path": ["tunnel-interface"]},
- description="List of controller groups to exclude from connections.",
)
vmanage_connection_preference: Optional[int] = Field(
default=None,
json_schema_extra={"vmanage_key": "vmanage-connection-preference", "data_path": ["tunnel-interface"]},
- description="Preference value for establishing vManage connections.",
)
port_hop: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "port-hop", "data_path": ["tunnel-interface"]},
- description="Enables or disables port hopping for the interface to evade port blocking.",
- )
- restrict: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "color"]},
- description="Indicates whether the interface color is restricted for use.",
+ default=None, json_schema_extra={"vmanage_key": "port-hop", "data_path": ["tunnel-interface"]}
)
+ restrict: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface", "color"]})
dst_ip: Optional[ipaddress.IPv4Address] = Field(
default=None,
json_schema_extra={"vmanage_key": "dst-ip", "data_path": ["tunnel-interface", "tloc-extension-gre-to"]},
- description="Destination IP address for GRE (Generic Routing Encapsulation) tunnel extension.",
- )
- carrier: Optional[Carrier] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"]},
- description="Specifies the carrier information for the tunnel interface.",
)
+ carrier: Optional[Carrier] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface"]})
nat_refresh_interval: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "nat-refresh-interval", "data_path": ["tunnel-interface"]},
- description="Interval in seconds to refresh NAT (Network Address Translation) mappings.",
+ default=None, json_schema_extra={"vmanage_key": "nat-refresh-interval", "data_path": ["tunnel-interface"]}
)
hello_interval: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "hello-interval", "data_path": ["tunnel-interface"]},
- description="Time interval in seconds between successive hello packets sent over the tunnel interface.",
+ default=None, json_schema_extra={"vmanage_key": "hello-interval", "data_path": ["tunnel-interface"]}
)
hello_tolerance: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "hello-tolerance", "data_path": ["tunnel-interface"]},
- description="Time in seconds to wait before declaring a neighbor down due to missing hello packets.",
- )
- bind: Optional[str] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"]},
- description="Interface or IP address to which the tunnel interface is bound.",
+ default=None, json_schema_extra={"vmanage_key": "hello-tolerance", "data_path": ["tunnel-interface"]}
)
+ bind: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface"]})
last_resort_circuit: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "last-resort-circuit", "data_path": ["tunnel-interface"]},
- description="Marks the interface as a last resort circuit for traffic to fall back to.",
+ default=None, json_schema_extra={"vmanage_key": "last-resort-circuit", "data_path": ["tunnel-interface"]}
)
low_bandwidth_link: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "low-bandwidth-link", "data_path": ["tunnel-interface"]},
- description="Indicates if the link is considered a low bandwidth link.",
+ default=None, json_schema_extra={"vmanage_key": "low-bandwidth-link", "data_path": ["tunnel-interface"]}
)
tunnel_tcp_mss_adjust: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tunnel-tcp-mss-adjust", "data_path": ["tunnel-interface"]},
- description="Adjusts the Maximum Segment Size (MSS) value for TCP connections over the tunnel.",
+ default=None, json_schema_extra={"vmanage_key": "tunnel-tcp-mss-adjust", "data_path": ["tunnel-interface"]}
)
clear_dont_fragment: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "clear-dont-fragment", "data_path": ["tunnel-interface"]},
- description="Enables or disables the clearing of the 'Don't Fragment' (DF) bit in the IP header.",
+ default=None, json_schema_extra={"vmanage_key": "clear-dont-fragment", "data_path": ["tunnel-interface"]}
)
propagate_sgt: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"], "vmanage_key": "propagate-sgt"},
- description="Enables or disables the propagation of Security Group Tags (SGTs) across the tunnel interface.",
+ default=None, json_schema_extra={"data_path": ["tunnel-interface"], "vmanage_key": "propagate-sgt"}
)
network_broadcast: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "network-broadcast", "data_path": ["tunnel-interface"]},
- description="Allows or disallows network broadcast traffic through the tunnel interface.",
- )
- all: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Permits or denies all services through the tunnel interface.",
- )
- bgp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Border Gateway Protocol (BGP) traffic through the tunnel interface.",
+ default=None, json_schema_extra={"vmanage_key": "network-broadcast", "data_path": ["tunnel-interface"]}
)
+ all: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]})
+ bgp: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]})
dhcp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Enables or disables Dynamic Host Configuration Protocol (DHCP) on the tunnel interface.",
- )
- dns: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Domain Name System (DNS) queries through the tunnel interface.",
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
+ dns: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]})
icmp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description=(
- "Enables or disables Internet Control Message Protocol (ICMP) "
- "for ping and traceroute through the tunnel interface."
- ),
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
sshd: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Secure Shell (SSH) daemon access through the tunnel interface.",
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
netconf: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Enables or disables NETCONF protocol support on the tunnel interface.",
- )
- ntp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Network Time Protocol (NTP) synchronization through the tunnel interface.",
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
+ ntp: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]})
ospf: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description=(
- "Permits or denies Open Shortest Path First (OSPF) routing protocol traffic through the tunnel interface."
- ),
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
stun: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Enables or disables Session Traversal Utilities for NAT (STUN) on the tunnel interface.",
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
snmp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Simple Network Management Protocol (SNMP) through the tunnel interface.",
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
)
https: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Permits or denies HTTPS traffic through the tunnel interface.",
- )
- media_type: Optional[MediaType] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "media-type"},
- description="Specifies the media type used by the interface, such as copper or fiber.",
- )
- intrf_mtu: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "intrf-mtu"},
- description="Sets the Maximum Transmission Unit (MTU) size for the interface.",
- )
- mtu: Optional[int] = Field(default=None, description="Specifies the MTU size for the tunnel or logical interface.")
- tcp_mss_adjust: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tcp-mss-adjust"},
- description="Adjusts the TCP Maximum Segment Size (MSS) value for connections over the interface.",
- )
- tloc_extension: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tloc-extension"},
- description="Defines the Transport Location (TLOC) extension for the interface.",
- )
- load_interval: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "load-interval"},
- description="Sets the time interval in seconds for calculating interface load statistics.",
- )
+ default=None, json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]}
+ )
+ media_type: Optional[MediaType] = Field(default=None, json_schema_extra={"vmanage_key": "media-type"})
+ intrf_mtu: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "intrf-mtu"})
+ mtu: Optional[int] = None
+ tcp_mss_adjust: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tcp-mss-adjust"})
+ tloc_extension: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "tloc-extension"})
+ load_interval: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "load-interval"})
src_ip: Optional[ipaddress.IPv4Address] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "src-ip", "data_path": ["tloc-extension-gre-from"]},
- description="Source IP address for GRE tunnel extension.",
- )
- xconnect: Optional[str] = Field(
- default=None,
- json_schema_extra={"data_path": ["tloc-extension-gre-from"]},
- description="Cross-connect identifier for the GRE tunnel extension.",
- )
- mac_address: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "mac-address"},
- description="Specifies the MAC address for the interface.",
- )
- speed: Optional[Speed] = Field(
- default=None, description="Defines the speed of the interface, such as 10Mbps, 100Mbps, or 1Gbps."
- )
- duplex: Optional[Duplex] = Field(
- default=None, description="Sets the duplex mode for the interface, such as full or half duplex."
- )
- shutdown: Optional[BoolStr] = Field(default=False, description="Enables or disables (shuts down) the interface.")
- arp_timeout: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "arp-timeout"},
- description="Time in seconds before an ARP cache entry is timed out.",
- )
- autonegotiate: Optional[BoolStr] = Field(
- default=None, description="Enables or disables autonegotiation of speed and duplex settings on the interface."
- )
+ default=None, json_schema_extra={"vmanage_key": "src-ip", "data_path": ["tloc-extension-gre-from"]}
+ )
+ xconnect: Optional[str] = Field(default=None, json_schema_extra={"data_path": ["tloc-extension-gre-from"]})
+ mac_address: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "mac-address"})
+ speed: Optional[Speed] = None
+ duplex: Optional[Duplex] = None
+ shutdown: Optional[BoolStr] = False
+ arp_timeout: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "arp-timeout"})
+ autonegotiate: Optional[BoolStr] = None
ip_directed_broadcast: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "ip-directed-broadcast"},
- description="Allows or disallows IP directed broadcasts on the interface.",
+ default=None, json_schema_extra={"vmanage_key": "ip-directed-broadcast"}
)
icmp_redirect_disable: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "icmp-redirect-disable"},
- description="Enables or disables ICMP redirect messages on the interface.",
- )
- qos_adaptive: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "qos-adaptive"},
- description="Activates or deactivates adaptive QoS on the interface.",
- )
- period: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["qos-adaptive"]},
- description="Time period in seconds for measuring and adapting QoS settings.",
+ default=None, json_schema_extra={"vmanage_key": "icmp-redirect-disable"}
)
+ qos_adaptive: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "qos-adaptive"})
+ period: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["qos-adaptive"]})
bandwidth_down: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "bandwidth-down", "data_path": ["qos-adaptive", "downstream"]},
- description="Specifies the downstream bandwidth in Kbps for adaptive QoS calculations.",
- )
- dmin: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["qos-adaptive", "downstream", "range"]},
- description="Specifies the minimum downstream bandwidth in Kbps for adaptive QoS.",
- )
- dmax: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["qos-adaptive", "downstream", "range"]},
- description="Specifies the maximum downstream bandwidth in Kbps for adaptive QoS.",
+ default=None, json_schema_extra={"vmanage_key": "bandwidth-down", "data_path": ["qos-adaptive", "downstream"]}
)
+ dmin: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["qos-adaptive", "downstream", "range"]})
+ dmax: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["qos-adaptive", "downstream", "range"]})
bandwidth_up: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "bandwidth-up", "data_path": ["qos-adaptive", "upstream"]},
- description="Specifies the upstream bandwidth in Kbps for adaptive QoS calculations.",
- )
- umin: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["qos-adaptive", "upstream", "range"]},
- description="Specifies the minimum upstream bandwidth in Kbps for adaptive QoS.",
- )
- umax: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["qos-adaptive", "upstream", "range"]},
- description="Specifies the maximum upstream bandwidth in Kbps for adaptive QoS.",
- )
- shaping_rate: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "shaping-rate"},
- description="Defines the traffic shaping rate for the interface.",
- )
- qos_map: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "qos-map"},
- description="Associates a QoS map with the interface for traffic classification and prioritization.",
- )
- qos_map_vpn: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "qos-map-vpn"},
- description="Associates a QoS map with a VPN for traffic classification and prioritization within the VPN.",
- )
- service_provider: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "service-provider"},
- description="Identifies the service provider associated with the interface.",
- )
- bandwidth_upstream: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "bandwidth-upstream"},
- description="Specifies the upstream bandwidth in Kbps available on the interface.",
- )
- bandwidth_downstream: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "bandwidth-downstream"},
- description="Specifies the downstream bandwidth in Kbps available on the interface.",
- )
+ default=None, json_schema_extra={"vmanage_key": "bandwidth-up", "data_path": ["qos-adaptive", "upstream"]}
+ )
+ umin: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["qos-adaptive", "upstream", "range"]})
+ umax: Optional[int] = Field(default=None, json_schema_extra={"data_path": ["qos-adaptive", "upstream", "range"]})
+ shaping_rate: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "shaping-rate"})
+ qos_map: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "qos-map"})
+ qos_map_vpn: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "qos-map-vpn"})
+ service_provider: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "service-provider"})
+ bandwidth_upstream: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "bandwidth-upstream"})
+ bandwidth_downstream: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "bandwidth-downstream"})
block_non_source_ip: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "block-non-source-ip"},
- description="Enables or disables blocking of traffic with non-matching source IP addresses.",
+ default=None, json_schema_extra={"vmanage_key": "block-non-source-ip"}
)
rule_name: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "rule-name", "data_path": ["rewrite-rule"]},
- description="Specifies the name of the rewrite rule applied to the interface.",
+ default=None, json_schema_extra={"vmanage_key": "rule-name", "data_path": ["rewrite-rule"]}
)
access_list_ipv6: Optional[List[AccessList]] = Field(
- default=None,
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "access-list"},
- description="Defines a list of access control entries for IPv6 traffic filtering.",
- )
- ip: Optional[List[Ip]] = Field(
- default=None,
- json_schema_extra={"data_path": ["arp"]},
- description="A list of IP configurations for Address Resolution Protocol (ARP) settings.",
- )
- vrrp: Optional[List[Vrrp]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "vrrp"},
- description="A list of Virtual Router Redundancy Protocol (VRRP) configurations for IPv4.",
- )
- ipv6_vrrp: Optional[List[Ipv6Vrrp]] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "ipv6-vrrp"},
- description="A list of Virtual Router Redundancy Protocol (VRRP) configurations for IPv6.",
+ default=None, json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "access-list"}
)
+ ip: Optional[List[Ip]] = Field(default=None, json_schema_extra={"data_path": ["arp"]})
+ vrrp: Optional[List[Vrrp]] = Field(default=None, json_schema_extra={"vmanage_key": "vrrp"})
+ ipv6_vrrp: Optional[List[Ipv6Vrrp]] = Field(default=None, json_schema_extra={"vmanage_key": "ipv6-vrrp"})
enable_sgt_propagation: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["trustsec", "propagate"], "vmanage_key": "sgt"},
- description="Enables or disables Security Group Tag (SGT) propagation.",
+ default=None, json_schema_extra={"data_path": ["trustsec", "propagate"], "vmanage_key": "sgt"}
)
security_group_tag: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["trustsec", "static"], "vmanage_key": "sgt"},
- description="Specifies a static Security Group Tag (SGT) for the interface.",
- )
- trusted: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["trustsec", "static"]},
- description="Marks the interface as trusted or untrusted for TrustSec.",
+ default=None, json_schema_extra={"data_path": ["trustsec", "static"], "vmanage_key": "sgt"}
)
+ trusted: Optional[BoolStr] = Field(default=None, json_schema_extra={"data_path": ["trustsec", "static"]})
enable_sgt_authorization_and_forwarding: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["trustsec"], "vmanage_key": "enable"},
- description="Enables or disables Security Group Tag (SGT) authorization and forwarding.",
+ default=None, json_schema_extra={"data_path": ["trustsec"], "vmanage_key": "enable"}
)
enable_sgt_enforcement: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["trustsec", "enforcement"], "vmanage_key": "enable"},
- description="Activates or deactivates Security Group Tag (SGT) enforcement.",
+ default=None, json_schema_extra={"data_path": ["trustsec", "enforcement"], "vmanage_key": "enable"}
)
enforcement_sgt: Optional[int] = Field(
- default=None,
- json_schema_extra={"data_path": ["trustsec", "enforcement"], "vmanage_key": "sgt"},
- description="Specifies the Security Group Tag (SGT) to be enforced on the interface.",
+ default=None, json_schema_extra={"data_path": ["trustsec", "enforcement"], "vmanage_key": "sgt"}
)
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
diff --git a/catalystwan/api/templates/models/cisco_vpn_model.py b/catalystwan/api/templates/models/cisco_vpn_model.py
index d1e9fd0d..35fbdc7e 100644
--- a/catalystwan/api/templates/models/cisco_vpn_model.py
+++ b/catalystwan/api/templates/models/cisco_vpn_model.py
@@ -1,73 +1,53 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
+from typing import ClassVar, List, Optional
from pydantic import ConfigDict, Field, field_validator
-from catalystwan.api.templates.bool_str import BoolStr
from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-from catalystwan.models.common import Protocol, StaticNatDirection
-
-Role = Literal["primary", "secondary"]
-SvcType = Literal["FW", "IDS", "IDP", "netsvc1", "netsvc2", "netsvc3", "netsvc4", "TE", "appqoe"]
-ServiceRouteService = Literal["sig"]
-Nat = Literal["NAT64", "NAT66"]
-AdvertiseProtocol = Literal[
- "bgp", "ospf", "ospfv3", "connected", "static", "network", "aggregate", "eigrp", "lisp", "isis"
-]
-AdvertiseProtocolSubType = Literal["external"]
-Region = Literal["core", "access"]
-Ipv6AdvertiseProtocol = Literal["bgp", "ospf", "connected", "static", "network", "aggregate"]
-Ipv6AdvertiseProtocolSubType = Literal["external"]
-LeakFromGlobalProtocol = Literal["all", "static", "mobile", "connected", "rip", "odr"]
-Overload = Literal["true", "false"]
-RouteImportProtocol = Literal["static", "connected", "bgp", "ospf"]
-RouteImportProtocolSubType = Literal["external"]
-RouteImportRedistributeProtocol = Literal["bgp", "eigrp", "ospf"]
-RouteImportFromProtocol = Literal["static", "connected", "bgp", "ospf", "eigrp"]
-RouteImportFromProtocolSubType = Literal["external"]
-RouteImportFromRedistributeProtocol = Literal["bgp", "eigrp", "ospf"]
-RouteExportProtocol = Literal["static", "connected", "bgp", "eigrp", "ospf"]
-RouteExportProtocolSubType = Literal["external"]
-RouteExportRedistributeProtocol = Literal["bgp", "ospf"]
+
+
+class Role(str, Enum):
+ PRIMARY = "primary"
+ SECONDARY = "secondary"
class Dns(FeatureTemplateValidator):
- dns_addr: Optional[str] = Field(
- default=None, json_schema_extra={"vmanage_key": "dns-addr"}, description="The IP address of the DNS server."
- )
- role: Role = Field(default="primary", description="The role of the DNS server, either 'PRIMARY' or 'SECONDARY'.")
+ dns_addr: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "dns-addr"})
+ role: Role = Role.PRIMARY
model_config = ConfigDict(populate_by_name=True)
class DnsIpv6(FeatureTemplateValidator):
- dns_addr: Optional[str] = Field(
- default=None, json_schema_extra={"vmanage_key": "dns-addr"}, description="The IPv6 address of the DNS server."
- )
- role: Optional[Role] = Field(
- default="primary",
- description="The role of the DNS server for IPv6, optionally either 'PRIMARY' or 'SECONDARY'.",
- )
+ dns_addr: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "dns-addr"})
+ role: Optional[Role] = Role.PRIMARY
model_config = ConfigDict(populate_by_name=True)
class Host(FeatureTemplateValidator):
- hostname: str = Field(..., description="The hostname of the device.")
- ip: List[str] = Field(..., description="A list of IP addresses associated with the hostname.")
+ hostname: str
+ ip: List[str]
+
+
+class SvcType(str, Enum):
+ FW = "FW"
+ IDS = "IDS"
+ IDP = "IDP"
+ NETSVC1 = "netsvc1"
+ NETSVC2 = "netsvc2"
+ NETSVC3 = "netsvc3"
+ NETSVC4 = "netsvc4"
+ TE = "TE"
+ APPQOE = "appqoe"
class Service(FeatureTemplateValidator):
- svc_type: SvcType = Field(
- description="The type of service to be configured.", json_schema_extra={"vmanage_key": "svc-type"}
- )
- address: Optional[List[str]] = Field(default=None, description="A list of IP addresses for the service.")
- interface: Optional[str] = Field(default=None, description="The interface associated with the service.")
- track_enable: BoolStr = Field(
- default=True,
- description="Indicates whether tracking is enabled for the service.",
- json_schema_extra={"vmanage_key": "track-enable"},
- )
+ svc_type: SvcType = Field(json_schema_extra={"vmanage_key": "svc-type"})
+ address: Optional[List[str]] = None
+ interface: Optional[str] = None
+ track_enable: bool = Field(True, json_schema_extra={"vmanage_key": "track-enable"})
model_config = ConfigDict(populate_by_name=True)
@field_validator("track_enable")
@@ -76,451 +56,345 @@ def convert_to_string(cls, value):
return str(value).lower()
+class ServiceRouteService(str, Enum):
+ SIG = "sig"
+
+
class ServiceRoute(FeatureTemplateValidator):
- prefix: str = Field(description="The network prefix for the service route.")
- vpn: int = Field(description="The VPN identifier where the service route is to be applied.")
- service: ServiceRouteService = Field(default="sig", description="The service associated with the route.")
+ prefix: str
+ vpn: int
+ service: ServiceRouteService = ServiceRouteService.SIG
class NextHop(FeatureTemplateValidator):
- address: Optional[str] = Field(default=None, description="The IP address of the next hop for the route.")
- distance: Optional[int] = Field(default=1, description="The administrative distance of the next hop.")
+ address: Optional[str] = None
+ distance: Optional[int] = 1
class NextHopWithTrack(FeatureTemplateValidator):
- address: Optional[str] = Field(
- default=None, description="The IP address of the next hop for the route that requires tracking."
- )
- distance: Optional[int] = Field(
- default=1, description="The administrative distance of the next hop that requires tracking."
- )
- tracker: str = Field(description="The tracker associated with this next hop.")
+ address: Optional[str] = None
+ distance: Optional[int] = 1
+ tracker: str
class RouteInterface(FeatureTemplateValidator):
- interface_name: str = Field(
- description="The name of the interface used for routing.", json_schema_extra={"vmanage_key": "interface-name"}
- )
+ interface_name: str = Field(json_schema_extra={"vmanage_key": "interface-name"})
interface_next_hop: Optional[List[NextHop]] = Field(
- default=None,
- description="A list of next hops associated with the interface for routing purposes.",
- json_schema_extra={"vmanage_key": "interface-next-hop", "priority_order": ["address", "distance"]},
+ default=None, json_schema_extra={"vmanage_key": "interface-next-hop", "priority_order": ["address", "distance"]}
)
model_config = ConfigDict(populate_by_name=True)
class Routev4(FeatureTemplateValidator):
- prefix: Optional[str] = Field(default=None, description="The IPv4 network prefix for the static route.")
+ prefix: Optional[str] = None
next_hop: Optional[List[NextHop]] = Field(
- default=None,
- description="A list of IPv4 next hops for the route.",
- json_schema_extra={"vmanage_key": "next-hop", "priority_order": ["address", "distance"]},
+ default=None, json_schema_extra={"vmanage_key": "next-hop", "priority_order": ["address", "distance"]}
)
next_hop_with_track: Optional[List[NextHopWithTrack]] = Field(
- default=None,
- description="A list of IPv4 next hops with tracking for the route.",
- json_schema_extra={"vmanage_key": "next-hop-with-track"},
+ default=None, json_schema_extra={"vmanage_key": "next-hop-with-track"}
)
route_interface: Optional[RouteInterface] = Field(
- default=None,
- description="The interface configuration for the IPv4 static route.",
- json_schema_extra={"vmanage_key": "route-interface"},
+ default=None, json_schema_extra={"vmanage_key": "route-interface"}
)
- null0: Optional[BoolStr] = Field(
- default=None, description="A flag indicating whether to route traffic to null0 for this static route."
- )
- distance: Optional[int] = Field(default=None, description="The administrative distance for the static route.")
- vpn: Optional[int] = Field(
- default=None, description="The VPN instance identifier associated with the static route."
- )
- dhcp: Optional[BoolStr] = Field(
- default=None, description="A flag indicating whether DHCP is used for this static route."
- )
-
+ null0: Optional[bool] = None
+ distance: Optional[int] = None
+ vpn: Optional[int] = None
+ dhcp: Optional[bool] = None
model_config = ConfigDict(populate_by_name=True)
class NextHopv6(FeatureTemplateValidator):
- address: str = Field(description="The IPv6 address of the next hop for the route.")
- distance: Optional[int] = Field(default=1, description="The administrative distance of the IPv6 next hop.")
+ address: str
+ distance: Optional[int] = 1
+
+
+class Nat(str, Enum):
+ NAT64 = "NAT64"
+ NAT66 = "NAT66"
class Routev6(FeatureTemplateValidator):
- prefix: str = Field(description="The IPv6 network prefix for the static route.")
- next_hop: Optional[List[NextHopv6]] = Field(
- default=None,
- description="A list of IPv6 next hops for the route.",
- json_schema_extra={"vmanage_key": "next-hop"},
- )
- null0: Optional[BoolStr] = Field(
- default=None, description="A flag indicating whether to route IPv6 traffic to null0 for this static route."
- )
- vpn: Optional[int] = Field(
- default=None, description="The VPN instance identifier associated with the IPv6 static route."
- )
- nat: Optional[Nat] = Field(
- default=None, description="The type of NAT to apply for the IPv6 static route, if applicable."
- )
+ prefix: str
+ next_hop: Optional[List[NextHopv6]] = Field(default=None, json_schema_extra={"vmanage_key": "next-hop"})
+ null0: Optional[bool] = None
+ vpn: Optional[int] = None
+ nat: Optional[Nat] = None
model_config = ConfigDict(populate_by_name=True)
class GreRoute(FeatureTemplateValidator):
- prefix: str = Field(description="The network prefix for the GRE (Generic Routing Encapsulation) route.")
- vpn: int = Field(description="The VPN identifier where the GRE route is to be applied.")
- interface: Optional[List[str]] = Field(
- default=None, description="A list of interfaces associated with the GRE route."
- )
+ prefix: str
+ vpn: int
+ interface: Optional[List[str]] = None
class IpsecRoute(FeatureTemplateValidator):
- prefix: str = Field(description="The network prefix for the IPSec (Internet Protocol Security) route.")
- vpn: int = Field(description="The VPN identifier where the IPSec route is to be applied.")
- interface: Optional[List[str]] = Field(
- default=None, description="A list of interfaces associated with the IPSec route."
- )
+ prefix: str
+ vpn: int
+ interface: Optional[List[str]] = None
+
+
+class AdvertiseProtocol(str, Enum):
+ BGP = "bgp"
+ OSPF = "ospf"
+ OSPFV3 = "ospfv3"
+ CONNECTED = "connected"
+ STATIC = "static"
+ NETWORK = "network"
+ AGGREGATE = "aggregate"
+ EIGRP = "eigrp"
+ LISP = "lisp"
+ ISIS = "isis"
+
+
+class AdvertiseProtocolSubType(str, Enum):
+ EXTERNAL = "external"
+
+
+class Region(str, Enum):
+ CORE = "core"
+ ACCESS = "access"
class PrefixList(FeatureTemplateValidator):
- prefix_entry: str = Field(
- description="The network prefix entry for the prefix list.", json_schema_extra={"vmanage_key": "prefix-entry"}
- )
- aggregate_only: Optional[BoolStr] = Field(
- default=None,
- description="A flag indicating if only aggregate routes should be considered.",
- json_schema_extra={"vmanage_key": "aggregate-only"},
- )
- region: Optional[Region] = Field(default=None, description="The network region where the prefix list is applied.")
+ prefix_entry: str = Field(json_schema_extra={"vmanage_key": "prefix-entry"})
+ aggregate_only: Optional[bool] = Field(default=None, json_schema_extra={"vmanage_key": "aggregate-only"})
+ region: Optional[Region]
model_config = ConfigDict(populate_by_name=True)
class Advertise(FeatureTemplateValidator):
- protocol: AdvertiseProtocol = Field(description="The protocol used for route advertisement.")
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy associated with advertisement.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
+ protocol: AdvertiseProtocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
protocol_sub_type: Optional[List[AdvertiseProtocolSubType]] = Field(
- default=None,
- description="A list of subtypes for the advertisement protocol.",
- json_schema_extra={"vmanage_key": "protocol-sub-type"},
- )
- prefix_list: Optional[List[PrefixList]] = Field(
- default=None,
- description="A list of prefix lists associated with the advertisement settings.",
- json_schema_extra={"vmanage_key": "prefix-list"},
+ default=None, json_schema_extra={"vmanage_key": "protocol-sub-type"}
)
+ prefix_list: Optional[List[PrefixList]] = Field(default=None, json_schema_extra={"vmanage_key": "prefix-list"})
model_config = ConfigDict(populate_by_name=True)
+class Ipv6AdvertiseProtocol(str, Enum):
+ BGP = "bgp"
+ OSPF = "ospf"
+ CONNECTED = "connected"
+ STATIC = "static"
+ NETWORK = "network"
+ AGGREGATE = "aggregate"
+
+
+class Ipv6AdvertiseProtocolSubType(str, Enum):
+ EXTERNAL = "external"
+
+
class Ipv6Advertise(FeatureTemplateValidator):
- protocol: Ipv6AdvertiseProtocol = Field(description="The IPv6 protocol used for route advertisement.")
- route_policy: Optional[str] = Field(
- default=None,
- description="The IPv6 route policy associated with advertisement.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
+ protocol: Ipv6AdvertiseProtocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
protocol_sub_type: Optional[List[Ipv6AdvertiseProtocolSubType]] = Field(
- default=None,
- description="A list of subtypes for the IPv6 advertisement protocol.",
- json_schema_extra={"vmanage_key": "protocol-sub-type"},
- )
- prefix_list: Optional[List[PrefixList]] = Field(
- default=None,
- description="A list of IPv6 prefix lists associated with the advertisement settings.",
- json_schema_extra={"vmanage_key": "prefix-list"},
+ default=None, json_schema_extra={"vmanage_key": "protocol-sub-type"}
)
+ prefix_list: Optional[List[PrefixList]] = Field(default=None, json_schema_extra={"vmanage_key": "prefix-list"})
model_config = ConfigDict(populate_by_name=True)
+class LeakFromGlobalProtocol(str, Enum):
+ ALL = "all"
+ STATIC = "static"
+ MOBILE = "mobile"
+ CONNECTED = "connected"
+ RIP = "rip"
+ ODR = "odr"
+
+
class Pool(FeatureTemplateValidator):
- name: str = Field(description="The name of the IP address pool.")
- start_address: str = Field(
- description="The starting IP address of the pool.", json_schema_extra={"vmanage_key": "start-address"}
- )
- end_address: str = Field(
- description="The ending IP address of the pool.", json_schema_extra={"vmanage_key": "end-address"}
- )
- overload: Optional[BoolStr] = Field(
- default=None, description="A flag indicating whether address overload is allowed."
- )
- leak_from_global: BoolStr = Field(description="A flag indicating whether leaking from the global table is enabled.")
- leak_from_global_protocol: LeakFromGlobalProtocol = Field(
- description="The protocol used for leaking from the global routing table."
- )
- leak_to_global: BoolStr = Field(description="A flag indicating whether leaking to the global table is enabled.")
+ name: str
+ start_address: str = Field(json_schema_extra={"vmanage_key": "start-address"})
+ end_address: str = Field(json_schema_extra={"vmanage_key": "end-address"})
+ overload: Optional[bool] = None
+ leak_from_global: bool
+ leak_from_global_protocol: LeakFromGlobalProtocol
+ leak_to_global: bool
model_config = ConfigDict(populate_by_name=True)
+class Direction(str, Enum):
+ INSIDE = "inside"
+ OUTSIDE = "outside"
+
+
+class Overload(str, Enum):
+ TRUE = "true"
+ FALSE = "false"
+
+
class Natpool(FeatureTemplateValidator):
- name: int = Field(description="The identifier for the NAT pool.")
- prefix_length: Optional[int] = Field(
- default=None,
- description="The length of the network prefix for the NAT pool.",
- json_schema_extra={"vmanage_key": "prefix-length"},
- )
- range_start: str = Field(
- default=None,
- description="The starting IP address for the NAT pool range.",
- json_schema_extra={"vmanage_key": "range-start"},
- )
- range_end: Optional[str] = Field(
- default=None,
- description="The ending IP address for the NAT pool range.",
- json_schema_extra={"vmanage_key": "range-end"},
- )
- overload: Overload = Field(
- default="true", description="Flag indicating whether NAT overload (PAT) is enabled for the pool."
- )
- direction: StaticNatDirection = Field(description="The direction (inside or outside) associated with the NAT pool.")
- tracker_id: Optional[int] = Field(
- default=None,
- description="The tracker identifier associated with the NAT pool.",
- json_schema_extra={"vmanage_key": "tracker-id"},
- )
+ name: int
+ prefix_length: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "prefix-length"})
+ range_start: str = Field(default=None, json_schema_extra={"vmanage_key": "range-start"})
+ range_end: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "range-end"})
+ overload: Overload = Overload.TRUE
+ direction: Direction
+ tracker_id: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tracker-id"})
model_config = ConfigDict(populate_by_name=True)
+class StaticNatDirection(str, Enum):
+ INSIDE = "inside"
+ OUTSIDE = "outside"
+
+
class Static(FeatureTemplateValidator):
- pool_name: Optional[int] = Field(
- default=None,
- description="The identifier for the NAT pool associated with the static NAT rule.",
- json_schema_extra={"vmanage_key": "pool-name"},
- )
- source_ip: Optional[str] = Field(
- default=None,
- description="The original source IP address to be translated by static NAT.",
- json_schema_extra={"vmanage_key": "source-ip"},
- )
- translate_ip: Optional[str] = Field(
- default=None,
- description="The translated IP address used by static NAT.",
- json_schema_extra={"vmanage_key": "translate-ip"},
- )
- static_nat_direction: StaticNatDirection = Field(
- description="The direction (inside or outside) for the static NAT rule.",
- json_schema_extra={"vmanage_key": "static-nat-direction"},
- )
- tracker_id: Optional[int] = Field(
- default=None,
- description="The tracker identifier associated with the static NAT rule.",
- json_schema_extra={"vmanage_key": "tracker-id"},
- )
+ pool_name: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "pool-name"})
+ source_ip: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "source-ip"})
+ translate_ip: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "translate-ip"})
+ static_nat_direction: StaticNatDirection = Field(json_schema_extra={"vmanage_key": "static-nat-direction"})
+ tracker_id: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tracker-id"})
model_config = ConfigDict(populate_by_name=True)
class SubnetStatic(FeatureTemplateValidator):
- source_ip_subnet: str = Field(
- description="The original source IP subnet to be translated by static NAT.",
- json_schema_extra={"vmanage_key": "source-ip-subnet"},
- )
- translate_ip_subnet: str = Field(
- description="The translated IP subnet used by static NAT.",
- json_schema_extra={"vmanage_key": "translate-ip-subnet"},
- )
- prefix_length: int = Field(
- description="The prefix length for the translated IP subnet in static NAT.",
- json_schema_extra={"vmanage_key": "prefix-length"},
- )
- static_nat_direction: StaticNatDirection = Field(
- description="The direction (inside or outside) for the subnet static NAT rule.",
- json_schema_extra={"vmanage_key": "static-nat-direction"},
- )
- tracker_id: Optional[int] = Field(
- default=None,
- description="The tracker identifier associated with the subnet static NAT rule.",
- json_schema_extra={"vmanage_key": "tracker-id"},
- )
+ source_ip_subnet: str = Field(json_schema_extra={"vmanage_key": "source-ip-subnet"})
+ translate_ip_subnet: str = Field(json_schema_extra={"vmanage_key": "translate-ip-subnet"})
+ prefix_length: int = Field(json_schema_extra={"vmanage_key": "prefix-length"})
+ static_nat_direction: StaticNatDirection = Field(json_schema_extra={"vmanage_key": "static-nat-direction"})
+ tracker_id: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tracker-id"})
model_config = ConfigDict(populate_by_name=True)
+class Proto(str, Enum):
+ TCP = "tcp"
+ UDP = "udp"
+
+
class PortForward(FeatureTemplateValidator):
- pool_name: Optional[int] = Field(
- default=None,
- description="The identifier for the NAT pool associated with the port forwarding rule.",
- json_schema_extra={"vmanage_key": "pool-name"},
- )
- source_port: int = Field(
- description="The source port number for the port forwarding rule.",
- json_schema_extra={"vmanage_key": "source-port"},
- )
- translate_port: int = Field(
- description="The destination port number to which the source port is translated.",
- json_schema_extra={"vmanage_key": "translate-port"},
- )
- source_ip: str = Field(
- description="The source IP address for the port forwarding rule.",
- json_schema_extra={"vmanage_key": "source-ip"},
- )
- translate_ip: str = Field(
- description="The destination IP address to which the source IP is translated.",
- json_schema_extra={"vmanage_key": "translate-ip"},
- )
- proto: Protocol = Field(description="The protocol used in the port forwarding rule (TCP/UDP).")
+ pool_name: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "pool-name"})
+ source_port: int = Field(json_schema_extra={"vmanage_key": "source-port"})
+ translate_port: int = Field(json_schema_extra={"vmanage_key": "translate-port"})
+ source_ip: str = Field(json_schema_extra={"vmanage_key": "source-ip"})
+ translate_ip: str = Field(json_schema_extra={"vmanage_key": "translate-ip"})
+ proto: Proto
model_config = ConfigDict(populate_by_name=True)
+class RouteImportProtocol(str, Enum):
+ STATIC = "static"
+ CONNECTED = "connected"
+ BGP = "bgp"
+ OSPF = "ospf"
+
+
+class RouteImportProtocolSubType(str, Enum):
+ EXTERNAL = "external"
+
+
+class RouteImportRedistributeProtocol(str, Enum):
+ BGP = "bgp"
+ EIGRP = "eigrp"
+ OSPF = "ospf"
+
+
class RouteImportRedistribute(FeatureTemplateValidator):
- protocol: RouteImportRedistributeProtocol = Field(
- description="The protocol from which routes are to be redistributed."
- )
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy that specifies the conditions for route redistribution.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
+ protocol: RouteImportRedistributeProtocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class RouteImport(FeatureTemplateValidator):
- protocol: RouteImportProtocol = Field(description="The protocol from which routes are to be imported.")
- protocol_sub_type: List[RouteImportProtocolSubType] = Field(
- description="The list of subtypes for the import protocol.",
- json_schema_extra={"vmanage_key": "protocol-sub-type"},
- )
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy that specifies the conditions for route import.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
- redistribute: Optional[List[RouteImportRedistribute]] = Field(
- default=None,
- description="A list of redistribute configurations that define how routes from other protocols are imported.",
- )
+ protocol: RouteImportProtocol
+ protocol_sub_type: List[RouteImportProtocolSubType] = Field(json_schema_extra={"vmanage_key": "protocol-sub-type"})
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
+ redistribute: Optional[List[RouteImportRedistribute]] = None
model_config = ConfigDict(populate_by_name=True)
+class RouteImportFromProtocol(str, Enum):
+ STATIC = "static"
+ CONNECTED = "connected"
+ BGP = "bgp"
+ OSPF = "ospf"
+ EIGRP = "eigrp"
+
+
+class RouteImportFromProtocolSubType(str, Enum):
+ EXTERNAL = "external"
+
+
+class RouteImportFromRedistributeProtocol(str, Enum):
+ BGP = "bgp"
+ EIGRP = "eigrp"
+ OSPF = "ospf"
+
+
class RouteImportFromRedistribute(FeatureTemplateValidator):
- protocol: RouteImportFromRedistributeProtocol = Field(
- description="The protocol from which routes are to be redistributed into the local routing table."
- )
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy that defines the conditions for route redistribution.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
+ protocol: RouteImportFromRedistributeProtocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class RouteImportFrom(FeatureTemplateValidator):
- source_vpn: int = Field(
- description="The VPN instance (VRF) from which routes are to be imported.",
- json_schema_extra={"vmanage_key": "source-vpn"},
- )
- protocol: RouteImportFromProtocol = Field(description="The routing protocol from which routes are to be imported.")
+ source_vpn: int = Field(json_schema_extra={"vmanage_key": "source-vpn"})
+ protocol: RouteImportFromProtocol
protocol_sub_type: List[RouteImportFromProtocolSubType] = Field(
- description="The list of protocol subtypes for route importation.",
- json_schema_extra={"vmanage_key": "protocol-sub-type"},
- )
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy that specifies the criteria for route importation.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
- redistribute: Optional[List[RouteImportFromRedistribute]] = Field(
- default=None,
- description=(
- "A list of route redistribution configurations specifying how routes from other protocols are imported."
- ),
+ json_schema_extra={"vmanage_key": "protocol-sub-type"}
)
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
+ redistribute: Optional[List[RouteImportFromRedistribute]] = None
model_config = ConfigDict(populate_by_name=True)
+class RouteExportProtocol(str, Enum):
+ STATIC = "static"
+ CONNECTED = "connected"
+ BGP = "bgp"
+ EIGRP = "eigrp"
+ OSPF = "ospf"
+
+
+class RouteExportProtocolSubType(str, Enum):
+ EXTERNAL = "external"
+
+
+class RouteExportRedistributeProtocol(str, Enum):
+ BGP = "bgp"
+ OSPF = "ospf"
+
+
class RouteExportRedistribute(FeatureTemplateValidator):
- protocol: RouteExportRedistributeProtocol = Field(
- description="The protocol from which routes are to be redistributed out of the local routing table."
- )
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy that defines the conditions for route redistribution.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
+ protocol: RouteExportRedistributeProtocol
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
model_config = ConfigDict(populate_by_name=True)
class RouteExport(FeatureTemplateValidator):
- protocol: RouteExportProtocol = Field(description="The routing protocol to which routes are to be exported.")
- protocol_sub_type: List[RouteExportProtocolSubType] = Field(
- description="The list of protocol subtypes for route exportation.",
- json_schema_extra={"vmanage_key": "protocol-sub-type"},
- )
- route_policy: Optional[str] = Field(
- default=None,
- description="The route policy that specifies the criteria for route exportation.",
- json_schema_extra={"vmanage_key": "route-policy"},
- )
- redistribute: Optional[List[RouteExportRedistribute]] = Field(
- default=None,
- description=(
- "A list of route redistribution configurations specifying how routes from other protocols are exported."
- ),
- )
+ protocol: RouteExportProtocol
+ protocol_sub_type: List[RouteExportProtocolSubType] = Field(json_schema_extra={"vmanage_key": "protocol-sub-type"})
+ route_policy: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "route-policy"})
+ redistribute: Optional[List[RouteExportRedistribute]]
model_config = ConfigDict(populate_by_name=True)
class CiscoVPNModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Cisco VPN Feature Template configuration."
- vpn_id: int = Field(
- default=0,
- description="The unique identifier for the VPN instance (VRF).",
- json_schema_extra={"vmanage_key": "vpn-id"},
- )
- vpn_name: Optional[str] = Field(
- default=None, description="The name of the VPN instance.", json_schema_extra={"vmanage_key": "name"}
- )
- tenant_vpn_id: Optional[int] = Field(
- default=None,
- description="The tenant-specific identifier for the VPN instance, used in multi-tenant environments.",
- json_schema_extra={"vmanage_key": "tenant-vpn-id"},
- )
- org_name: Optional[str] = Field(
- default=None,
- description="The name of the organization to which the VPN instance belongs.",
- json_schema_extra={"vmanage_key": "org-name"},
- )
+ vpn_id: int = Field(default=0, json_schema_extra={"vmanage_key": "vpn-id"})
+ vpn_name: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "name"})
+ tenant_vpn_id: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "tenant-vpn-id"})
+ org_name: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "org-name"})
omp_admin_distance_ipv4: Optional[int] = Field(
- default=None,
- description="The administrative distance for IPv4 routes received over the Overlay Management Protocol (OMP).",
- json_schema_extra={"vmanage_key": "omp-admin-distance-ipv4"},
+ default=None, json_schema_extra={"vmanage_key": "omp-admin-distance-ipv4"}
)
omp_admin_distance_ipv6: Optional[int] = Field(
- default=None,
- description="The administrative distance for IPv6 routes received over OMP.",
- json_schema_extra={"vmanage_key": "omp-admin-distance-ipv6"},
- )
- dns: Optional[List[Dns]] = Field(
- default=None,
- description="A list of DNS configurations for the VPN instance.",
- )
- dns_ipv6: Optional[List[DnsIpv6]] = Field(
- default=None,
- description="A list of DNS configurations for IPv6 within the VPN instance.",
- json_schema_extra={"vmanage_key": "dns-ipv6"},
- )
- layer4: Optional[BoolStr] = Field(
- default=None,
- description="A flag indicating whether Layer 4 information is included in the ECMP hash key.",
- json_schema_extra={"data_path": ["ecmp-hash-key"]},
- )
- host: Optional[List[Host]] = Field(
- default=None,
- description="A list of host configurations within the VPN instance.",
- json_schema_extra={"priority_order": ["hostname", "ip"]},
- )
- service: Optional[List[Service]] = Field(
- default=None,
- description="A list of service configurations associated with the VPN instance.",
+ default=None, json_schema_extra={"vmanage_key": "omp-admin-distance-ipv6"}
)
+ dns: Optional[List[Dns]] = None
+ dns_ipv6: Optional[List[DnsIpv6]] = Field(default=None, json_schema_extra={"vmanage_key": "dns-ipv6"})
+ layer4: Optional[bool] = Field(default=None, json_schema_extra={"data_path": ["ecmp-hash-key"]})
+ host: Optional[List[Host]] = Field(default=None, json_schema_extra={"priority_order": ["hostname", "ip"]})
+ service: Optional[List[Service]] = None
service_route: Optional[List[ServiceRoute]] = Field(
- default=None,
- description="A list of service route configurations for directing traffic to services within the VPN.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "service-route"},
+ default=None, json_schema_extra={"data_path": ["ip"], "vmanage_key": "service-route"}
)
route_v4: Optional[List[Routev4]] = Field(
default=None,
- description="A list of IPv4 route configurations within the VPN instance.",
json_schema_extra={
"data_path": ["ip"],
"vmanage_key": "route",
@@ -528,70 +402,32 @@ class CiscoVPNModel(FeatureTemplate):
},
)
route_v6: Optional[List[Routev6]] = Field(
- default=None,
- description="A list of IPv6 route configurations within the VPN instance.",
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "route"},
+ default=None, json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "route"}
)
gre_route: Optional[List[GreRoute]] = Field(
- default=None,
- description="A list of GRE tunnel route configurations within the VPN instance.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "gre-route"},
+ default=None, json_schema_extra={"data_path": ["ip"], "vmanage_key": "gre-route"}
)
ipsec_route: Optional[List[IpsecRoute]] = Field(
- default=None,
- description="A list of IPSec route configurations within the VPN instance.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "ipsec-route"},
- )
- advertise: Optional[List[Advertise]] = Field(
- default=None,
- description="A list of configurations for advertising routes via OMP within the VPN instance.",
- json_schema_extra={"data_path": ["omp"]},
+ default=None, json_schema_extra={"data_path": ["ip"], "vmanage_key": "ipsec-route"}
)
+ advertise: Optional[List[Advertise]] = Field(default=None, json_schema_extra={"data_path": ["omp"]})
ipv6_advertise: Optional[List[Ipv6Advertise]] = Field(
- default=None,
- description="A list of configurations for advertising IPv6 routes via OMP within the VPN instance.",
- json_schema_extra={"data_path": ["omp"], "vmanage_key": "ipv6-advertise"},
- )
- pool: Optional[List[Pool]] = Field(
- default=None,
- description="A list of NAT64 pool configurations within the VPN instance.",
- json_schema_extra={"data_path": ["nat64", "v4"]},
- )
- natpool: Optional[List[Natpool]] = Field(
- default=None,
- description="A list of NAT pool configurations within the VPN instance.",
- json_schema_extra={"data_path": ["nat"]},
- )
- static: Optional[List[Static]] = Field(
- default=None,
- description="A list of static configurations within the VPN instance for NAT.",
- json_schema_extra={"data_path": ["nat"]},
+ default=None, json_schema_extra={"data_path": ["omp"], "vmanage_key": "ipv6-advertise"}
)
+ pool: Optional[List[Pool]] = Field(default=None, json_schema_extra={"data_path": ["nat64", "v4"]})
+ natpool: Optional[List[Natpool]] = Field(default=None, json_schema_extra={"data_path": ["nat"]})
+ static: Optional[List[Static]] = Field(default=None, json_schema_extra={"data_path": ["nat"]})
subnet_static: Optional[List[SubnetStatic]] = Field(
- default=None,
- description="A list of subnet-specific static configurations within the VPN instance for NAT.",
- json_schema_extra={"data_path": ["nat"], "vmanage_key": "subnet-static"},
+ default=None, json_schema_extra={"data_path": ["nat"], "vmanage_key": "subnet-static"}
)
port_forward: Optional[List[PortForward]] = Field(
- default=None,
- description="A list of port forwarding configurations within the VPN instance.",
- json_schema_extra={"data_path": ["nat"], "vmanage_key": "port-forward"},
- )
- route_import: Optional[List[RouteImport]] = Field(
- default=None,
- description="A list of route import configurations within the VPN instance.",
- json_schema_extra={"vmanage_key": "route-import"},
+ default=None, json_schema_extra={"data_path": ["nat"], "vmanage_key": "port-forward"}
)
+ route_import: Optional[List[RouteImport]] = Field(default=None, json_schema_extra={"vmanage_key": "route-import"})
route_import_from: Optional[List[RouteImportFrom]] = Field(
- default=None,
- description="A list of configurations specifying routes to import from other sources into the VPN instance.",
- json_schema_extra={"vmanage_key": "route-import-from"},
- )
- route_export: Optional[List[RouteExport]] = Field(
- default=None,
- description="A list of route export configurations within the VPN instance.",
- json_schema_extra={"vmanage_key": "route-export"},
+ default=None, json_schema_extra={"vmanage_key": "route-import-from"}
)
+ route_export: Optional[List[RouteExport]] = Field(default=None, json_schema_extra={"vmanage_key": "route-export"})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cisco_vpn"
diff --git a/catalystwan/api/templates/models/cli_template.py b/catalystwan/api/templates/models/cli_template.py
index 91f288a1..0aff83df 100644
--- a/catalystwan/api/templates/models/cli_template.py
+++ b/catalystwan/api/templates/models/cli_template.py
@@ -3,16 +3,15 @@
from pathlib import Path
from typing import ClassVar
-from pydantic import ConfigDict, Field
+from pydantic import ConfigDict
from catalystwan.api.templates.feature_template import FeatureTemplate
class CliTemplateModel(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "CLI Template Feature configuration for applying command-line settings."
- config: str = Field(description="The CLI configuration commands to be applied as a template.")
+ config: str
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "cli-template"
diff --git a/catalystwan/api/templates/models/omp_vsmart_model.py b/catalystwan/api/templates/models/omp_vsmart_model.py
index 8ec5085a..9598f719 100644
--- a/catalystwan/api/templates/models/omp_vsmart_model.py
+++ b/catalystwan/api/templates/models/omp_vsmart_model.py
@@ -11,62 +11,26 @@
class OMPvSmart(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Overlay Management Protocol (OMP) settings for vSmart controller"
- graceful_restart: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "graceful-restart"},
- description="Enable or disable graceful restart for the OMP session",
- )
- send_path_limit: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "send-path-limit"},
- description="The maximum number of paths that can be sent to a TLOC",
- )
- send_backup_paths: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "send-backup-paths"},
- description="Enable or disable sending additional backup paths",
- )
- discard_rejected: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "discard-rejected"},
- description="Discard routes that are rejected by policy instead of marking them as rejected",
- )
- shutdown: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "shutdown"},
- description="Enable or disable the shutdown of the OMP session",
- )
+ graceful_restart: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "graceful-restart"})
+ send_path_limit: Optional[int] = Field(default=None, json_schema_extra={"vmanage_key": "send-path-limit"})
+ send_backup_paths: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "send-backup-paths"})
+ discard_rejected: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "discard-rejected"})
+ shutdown: Optional[BoolStr] = Field(default=None, json_schema_extra={"vmanage_key": "shutdown"})
graceful_restart_timer: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "graceful-restart-timer", "data_path": ["timers"]},
- description="The time interval for graceful restart of OMP sessions",
+ default=None, json_schema_extra={"vmanage_key": "graceful-restart-timer", "data_path": ["timers"]}
)
eor_timer: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "eor-timer", "data_path": ["timers"]},
- description="The End of Routes (EOR) timer value",
+ default=None, json_schema_extra={"vmanage_key": "eor-timer", "data_path": ["timers"]}
)
holdtime: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "holdtime", "data_path": ["timers"]},
- description="The hold time interval for OMP sessions",
+ default=None, json_schema_extra={"vmanage_key": "holdtime", "data_path": ["timers"]}
)
affinity_group_preference: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "affinity-group-preference", "data_path": ["filter-route", "outbound"]},
- description="Filter routes based on affinity preference list",
+ default=None, json_schema_extra={"vmanage_key": "affinity-group-preference"}
)
advertisement_interval: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "advertisement-interval", "data_path": ["timers"]},
- description="Interval between sending OMP route advertisements",
- )
- tloc_color: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "tloc-color", "data_path": ["filter-route", "outbound"]},
- description="Filter routes based on TLOC color",
+ default=None, json_schema_extra={"vmanage_key": "advertisement-interval", "data_path": ["timers"]}
)
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
diff --git a/catalystwan/api/templates/models/security_vsmart_model.py b/catalystwan/api/templates/models/security_vsmart_model.py
index cc1f8f65..14ee051a 100644
--- a/catalystwan/api/templates/models/security_vsmart_model.py
+++ b/catalystwan/api/templates/models/security_vsmart_model.py
@@ -1,28 +1,25 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
+from enum import Enum
from pathlib import Path
-from typing import ClassVar, Literal, Optional
+from typing import ClassVar, Optional
from pydantic import ConfigDict, Field
from catalystwan.api.templates.feature_template import FeatureTemplate
-Protocol = Literal["dtls", "tls"]
+
+class Protocol(str, Enum):
+ DTLS: str = "dtls"
+ TLS: str = "tls"
class SecurityvSmart(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Security settings for vSmart controller"
- protocol: Optional[Protocol] = Field(
- default=None,
- json_schema_extra={"data_path": ["control"]},
- description="The security protocol used for control plane communication",
- )
+ protocol: Optional[Protocol] = Field(default=None, json_schema_extra={"data_path": ["control"]})
tls_port: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tls-port", "data_path": ["control"]},
- description="The port used for TLS communications",
+ default=None, json_schema_extra={"vmanage_key": "tls-port", "data_path": ["control"]}
)
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "security-vsmart"
diff --git a/catalystwan/api/templates/models/supported.py b/catalystwan/api/templates/models/supported.py
index 2a2ff523..fc0ad1f2 100644
--- a/catalystwan/api/templates/models/supported.py
+++ b/catalystwan/api/templates/models/supported.py
@@ -1,6 +1,5 @@
# Copyright 2024 Cisco Systems, Inc. and its affiliates
-from catalystwan.api.templates.models.aaa_model import AAAModel
from catalystwan.api.templates.models.cisco_aaa_model import CiscoAAAModel
from catalystwan.api.templates.models.cisco_banner_model import CiscoBannerModel
from catalystwan.api.templates.models.cisco_bfd_model import CiscoBFDModel
@@ -16,17 +15,17 @@
from catalystwan.api.templates.models.omp_vsmart_model import OMPvSmart
from catalystwan.api.templates.models.security_vsmart_model import SecurityvSmart
from catalystwan.api.templates.models.system_vsmart_model import SystemVsmart
-from catalystwan.api.templates.models.vpn_vsmart_interface_model import VpnVsmartInterfaceModel
-from catalystwan.api.templates.models.vpn_vsmart_model import VpnVsmartModel
available_models = {
- "aaa": AAAModel,
"cisco_aaa": CiscoAAAModel,
- "cisco_banner": CiscoBannerModel,
"cisco_bfd": CiscoBFDModel,
+ "cisco_banner": CiscoBannerModel,
"cisco_ntp": CiscoNTPModel,
"cisco_ospf": CiscoOSPFModel,
"cisco_logging": CiscoLoggingModel,
+ "omp_vsmart": OMPvSmart,
+ "security_vsmart": SecurityvSmart,
+ "system_vsmart": SystemVsmart,
"cisco_vpn_interface": CiscoVpnInterfaceModel,
"cisco_system": CiscoSystemModel,
"cisco_vpn": CiscoVPNModel,
@@ -34,9 +33,4 @@
"cisco_system": CiscoSystemModel,
"cisco_secure_internet_gateway": CiscoSecureInternetGatewayModel,
"cisco_omp": CiscoOMPModel,
- "omp_vsmart": OMPvSmart,
- "security_vsmart": SecurityvSmart,
- "system_vsmart": SystemVsmart,
- "vpn_vsmart": VpnVsmartModel,
- "vpn_vsmart_interface": VpnVsmartInterfaceModel,
}
diff --git a/catalystwan/api/templates/models/system_vsmart_model.py b/catalystwan/api/templates/models/system_vsmart_model.py
index 6f962c63..b3ebba96 100644
--- a/catalystwan/api/templates/models/system_vsmart_model.py
+++ b/catalystwan/api/templates/models/system_vsmart_model.py
@@ -1,182 +1,45 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
from pathlib import Path
-from typing import ClassVar, List, Literal, Optional, Union
+from typing import ClassVar, Optional
from pydantic import ConfigDict, Field
-from catalystwan.api.templates.bool_str import BoolStr
-from catalystwan.api.templates.device_variable import DeviceVariable
-from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-from catalystwan.models.common import Timezone, TLOCColor
-
-Toology = Literal["hub-and-spoke"]
-
-
-class TlocColorComparison(FeatureTemplateValidator):
- color_1: Optional[TLOCColor] = Field(
- default=None,
- description="First TLOC color in comparsion",
- json_schema_extra={"vmanage_key": "color-1"},
- )
- color_2: Optional[TLOCColor] = Field(
- default=None,
- description="Second TLOC color in comparsion",
- json_schema_extra={"vmanage_key": "color-2"},
- )
- model_config = ConfigDict(populate_by_name=True)
+from catalystwan.api.templates.feature_template import FeatureTemplate
+from catalystwan.utils.timezone import Timezone
class SystemVsmart(FeatureTemplate):
model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "Security settings for vSmart controller"
- timezone: Optional[Timezone] = Field(
- default="UTC",
- description="The timezone setting for the vSmart controller",
- json_schema_extra={"data_path": ["clock"]},
- )
- host_name: DeviceVariable = Field(
- default=DeviceVariable(name="system_host_name"),
- json_schema_extra={"vmanage_key": "host-name"},
- description="The hostname for the vSmart controller",
- )
- dual_stack_ipv6: Union[DeviceVariable, BoolStr] = Field(
- default=DeviceVariable(name="system_ipv6-strict-control"),
- json_schema_extra={"vmanage_key": "ipv6-strict-control"},
- description="Enable Dual Stack IPv6 Default",
- )
- description: Optional[str] = Field(default=None, description="Set a text description of the device")
- location: Optional[str] = Field(
- default=None, description="A description of the physical location of the vSmart controller"
- )
- system_tunnel_mtu: Optional[int] = Field(
- default=1024, json_schema_extra={"vmanage_key": "system-tunnel-mtu"}, description="MTU size for system tunnels"
- )
- latitude: Optional[int] = Field(
- default=None,
- ge=-90,
- le=90,
- json_schema_extra={"data_path": ["gps-location"]},
- description="Geographical latitude of the vSmart controller",
- )
- longitude: Optional[int] = Field(
- default=None,
- ge=-180,
- le=180,
- json_schema_extra={"data_path": ["gps-location"]},
- description="Geographical longitude of the vSmart controller",
- )
- device_groups: List[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "device-groups"},
- description="Device group names for the vSmart controller",
- )
- system_ip: DeviceVariable = Field(
- default=DeviceVariable(name="system_system_ip"),
- json_schema_extra={"vmanage_key": "system-ip"},
- description="System IP address for the vSmart controller",
- )
- site_id: DeviceVariable = Field(
- default=DeviceVariable(name="system_site_id"),
- json_schema_extra={"vmanage_key": "site-id"},
- description="Site ID for the vSmart controller",
- )
- overlay_id: Optional[int] = Field(
- default=1,
- ge=1,
- le=4294967295,
- json_schema_extra={"vmanage_key": "overlay-id"},
- description="Overlay ID for the vSmart controller",
+ timezone: Optional[Timezone] = Field(default=None)
+ idle_timeout: Optional[int] = Field(default=None, ge=0, le=300, json_schema_extra={"vmanage_key": "idle-timeout"})
+ admin_tech_on_failure: Optional[bool] = Field(
+ default=True, json_schema_extra={"vmanage_key": "admin-tech-on-failure"}
)
- topology: Optional[List[Toology]] = Field(
- default=None,
- description="Set the topology",
- )
- port_offset: Optional[int] = Field(
- default=0,
- ge=0,
- le=20,
- json_schema_extra={"vmanage_key": "port-offset"},
- description="Port offset for port hopping",
- )
- port_hop: Optional[bool] = Field(
- default=True, json_schema_extra={"vmanage_key": "port-hop"}, description="Enable or disable port hopping"
- )
- control_session_pps: Optional[int] = Field(
- default=300,
- json_schema_extra={"vmanage_key": "control-session-pps"},
- description="Control session packets per second limit",
- )
- controller_group_id: Optional[int] = Field(
- default=0,
- ge=0,
- le=100,
- json_schema_extra={"vmanage_key": "controller-group-id"},
- description="Group ID for the vSmart controller",
- )
- track_transport: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "track-transport"},
- description="Enable or disable tracking of transport connections",
- )
- track_default_gateway: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "track-default-gateway"},
- description="Enable or disable tracking of the default gateway",
- )
- iptables_enable: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "iptables-enable"},
- description="Enable or disable iptables for security",
- )
- admin_tech_on_failure: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "admin-tech-on-failure"},
- description="Enable automatic generation of tech-support file on failure",
- )
- idle_timeout: Optional[int] = Field(
- default=None,
- ge=0,
- le=300,
- json_schema_extra={"vmanage_key": "idle-timeout"},
- description="Idle timeout in minutes for user sessions",
+ iptables_enable: Optional[bool] = Field(default=True, json_schema_extra={"vmanage_key": "iptables-enable"})
+ track_default_gateway: Optional[bool] = Field(
+ default=True, json_schema_extra={"vmanage_key": "track-default-gateway"}
)
dns_cache_timeout: Optional[int] = Field(
- default=2,
- ge=1,
- le=30,
- json_schema_extra={"vmanage_key": "dns-cache-timeout"},
- description="DNS cache timeout in minutes",
- )
- region_list_id: Optional[int] = Field(
- default=None,
- ge=1,
- le=64,
- json_schema_extra={"vmanage_key": "region-id-list"},
- description="Configure a list of region ID",
- )
- management_region: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "management-region"},
- description="Management Region",
- )
- compatible: Optional[List[TlocColorComparison]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["tloc-color-compatibility"],
- "priority_order": ["color-1", "color-2"],
- },
- description="Configure compatible TLOC color",
- )
- incompatible: Optional[List[TlocColorComparison]] = Field(
- default=None,
- json_schema_extra={
- "data_path": ["tloc-color-compatibility"],
- "priority_order": ["color-1", "color-2"],
- },
- description="Configure incompatible TLOC color",
+ default=2, ge=1, le=30, json_schema_extra={"vmanage_key": "dns-cache-timeout"}
)
+ track_transport: Optional[bool] = Field(default=True, json_schema_extra={"vmanage_key": "track-transport"})
+ controller_group_id: Optional[int] = Field(
+ default=0, ge=0, le=100, json_schema_extra={"vmanage_key": "controller-group-id"}
+ )
+ control_session_pps: Optional[int] = Field(default=300, json_schema_extra={"vmanage_key": "control-session-pps"})
+ port_hop: Optional[bool] = Field(default=True, json_schema_extra={"vmanage_key": "port-hop"})
+ port_offset: Optional[int] = Field(default=0, ge=0, le=20, json_schema_extra={"vmanage_key": "port-offset"})
+ overlay_id: Optional[int] = Field(default=1, ge=1, le=4294967295, json_schema_extra={"vmanage_key": "overlay-id"})
+ site_id: Optional[int] = Field(default=1, ge=1, le=4294967295, json_schema_extra={"vmanage_key": "site-id"})
+ system_ip: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "system-ip"})
+ device_groups: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "device-groups"})
+ longitude: Optional[int] = Field(default=None, ge=-180, le=180)
+ latitude: Optional[int] = Field(default=None, ge=-90, le=90)
+ system_tunnel_mtu: Optional[str] = Field(default=1024, json_schema_extra={"vmanage_key": "system-tunnel-mtu"})
+ location: Optional[str] = None
+ host_name: Optional[str] = Field(default=None, json_schema_extra={"vmanage_key": "host-name"})
payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
type: ClassVar[str] = "system-vsmart"
diff --git a/catalystwan/api/templates/models/vpn_vsmart_interface_model.py b/catalystwan/api/templates/models/vpn_vsmart_interface_model.py
deleted file mode 100644
index c6e24b68..00000000
--- a/catalystwan/api/templates/models/vpn_vsmart_interface_model.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-import ipaddress
-from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
-
-from pydantic import ConfigDict, Field
-
-from catalystwan.api.templates.bool_str import BoolStr
-from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-from catalystwan.models.common import TLOCColor
-
-VpnId = Literal["0", "512"]
-Role = Literal["primary", "secondary"]
-
-Speed = Literal["10", "100", "1000"]
-Duplex = Literal["full", "half"]
-Carrier = Literal[
- "default", "carrier1", "carrier2", "carrier3", "carrier4", "carrier5", "carrier6", "carrier7", "carrier8"
-]
-FlowControl = Literal["ingress", "egress", "autoneg", "both", "none"]
-
-
-class Ip(FeatureTemplateValidator):
- addr: ipaddress.IPv4Address = Field(..., description="IPv4 address for the interface.")
- mac: str = Field(..., description="MAC address associated with the IPv4 address.")
-
-
-class VpnVsmartInterfaceModel(FeatureTemplate):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "vSmart VPN Interface Feature Template configuration"
-
- if_name: str = Field(
- default=None, description="The name of the interface.", json_schema_extra={"vmanage_key": "if-name"}
- )
- interface_description: Optional[str] = Field(
- default=None, description="A description for the interface.", json_schema_extra={"vmanage_key": "description"}
- )
- ipv4_address: Optional[str] = Field(
- default=None,
- description="The primary IPv4 address assigned to the interface.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "address"},
- )
- dhcp_ipv4_client: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Whether DHCP client is enabled on the interface for IPv4 addressing. True if enabled, False otherwise."
- ),
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "dhcp-client"},
- )
- dhcp_distance: Optional[int] = Field(
- default=None,
- description="Administrative distance for DHCP routes on the interface.",
- json_schema_extra={"data_path": ["ip"], "vmanage_key": "dhcp-distance"},
- )
- ipv6_address: Optional[ipaddress.IPv6Interface] = Field(
- default=None,
- description="The primary IPv6 address assigned to the interface.",
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "address"},
- )
- dhcp_ipv6_client: Optional[BoolStr] = Field(
- default=None,
- description=(
- "Whether DHCP client is enabled on the interface for IPv6 addressing. True if enabled, False otherwise."
- ),
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "dhcp-client"},
- )
- dhcp_ipv6_distance: Optional[int] = Field(
- default=None,
- description="Administrative distance for DHCP routes on the interface.",
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "dhcp-distance"},
- )
- dhcp_rapid_commit: Optional[BoolStr] = Field(
- default=None,
- description=("Enable DHCPv6 rapid commit"),
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "dhcp-rapid-commit"},
- )
- group: Optional[List[int]] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"]},
- description="Identifies the group or groups the interface belongs to.",
- )
- value: Optional[TLOCColor] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "color"]},
- description=(
- "The value field often corresponds to a specific attribute or setting, such as color in this context."
- ),
- )
- carrier: Optional[Carrier] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface"]},
- description="Specifies the carrier information for the tunnel interface.",
- )
- nat_refresh_interval: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "nat-refresh-interval", "data_path": ["tunnel-interface"]},
- description="Interval in seconds to refresh NAT (Network Address Translation) mappings.",
- )
- hello_interval: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "hello-interval", "data_path": ["tunnel-interface"]},
- description="Time interval in seconds between successive hello packets sent over the tunnel interface.",
- )
- hello_tolerance: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "hello-tolerance", "data_path": ["tunnel-interface"]},
- description="Time in seconds to wait before declaring a neighbor down due to missing hello packets.",
- )
- all: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Permits or denies all services through the tunnel interface.",
- )
- dhcp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Enables or disables Dynamic Host Configuration Protocol (DHCP) on the tunnel interface.",
- )
- dns: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Domain Name System (DNS) queries through the tunnel interface.",
- )
- icmp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description=(
- "Enables or disables Internet Control Message Protocol (ICMP) "
- "for ping and traceroute through the tunnel interface."
- ),
- )
- sshd: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Secure Shell (SSH) daemon access through the tunnel interface.",
- )
- netconf: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Enables or disables NETCONF protocol support on the tunnel interface.",
- )
- ntp: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Allows or disallows Network Time Protocol (NTP) synchronization through the tunnel interface.",
- )
- stun: Optional[BoolStr] = Field(
- default=None,
- json_schema_extra={"data_path": ["tunnel-interface", "allow-service"]},
- description="Enables or disables Session Traversal Utilities for NAT (STUN) on the tunnel interface.",
- )
- flow_control: Optional[FlowControl] = Field(default=None, description="Enable flow control.")
- clear_dont_fragment: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "clear-dont-fragment"},
- description="Enables Clear don't fragment bit",
- )
- autonegotiate: Optional[BoolStr] = Field(
- default=True,
- json_schema_extra={"vmanage_key": "autonegotiate"},
- description="Link autonegotiation",
- )
- pmtu: Optional[BoolStr] = Field(
- default=False,
- json_schema_extra={"vmanage_key": "pmtu"},
- description="Enables Path MTU Discovery",
- )
- mtu: Optional[int] = Field(
- default=1500,
- json_schema_extra={"vmanage_key": "mtu"},
- description="Interface MTU <576..2000>",
- )
- tcp_mss_adjust: Optional[int] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "tcp-mss-adjust"},
- description="TCP MSS on SYN packets, in bytes",
- )
- mac_address: Optional[str] = Field(
- default=None,
- json_schema_extra={"vmanage_key": "mac-address"},
- description="Specifies the MAC address for the interface.",
- )
- speed: Optional[Speed] = Field(
- default=None, description="Defines the speed of the interface, such as 10Mbps, 100Mbps, or 1Gbps."
- )
- duplex: Optional[Duplex] = Field(
- default=None, description="Sets the duplex mode for the interface, such as full or half duplex."
- )
- shutdown: Optional[BoolStr] = Field(default=False, description="Enables or disables (shuts down) the interface.")
- ip: Optional[List[Ip]] = Field(
- default=None,
- json_schema_extra={"data_path": ["arp"]},
- description="A list of IP configurations for Address Resolution Protocol (ARP) settings.",
- )
-
- payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
- type: ClassVar[str] = "vpn-vsmart-interface"
diff --git a/catalystwan/api/templates/models/vpn_vsmart_model.py b/catalystwan/api/templates/models/vpn_vsmart_model.py
deleted file mode 100644
index 17a870dd..00000000
--- a/catalystwan/api/templates/models/vpn_vsmart_model.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from pathlib import Path
-from typing import ClassVar, List, Literal, Optional
-
-from pydantic import ConfigDict, Field
-
-from catalystwan.api.templates.bool_str import BoolStr
-from catalystwan.api.templates.feature_template import FeatureTemplate, FeatureTemplateValidator
-
-VpnId = Literal["0", "512"]
-Role = Literal["primary", "secondary"]
-
-
-class Dns(FeatureTemplateValidator):
- dns_addr: Optional[str] = Field(
- default=None, json_schema_extra={"vmanage_key": "dns-addr"}, description="The IP address of the DNS server."
- )
- role: Role = Field(description="The role of the DNS server, either 'PRIMARY' or 'SECONDARY'.")
- model_config = ConfigDict(populate_by_name=True)
-
-
-class Host(FeatureTemplateValidator):
- hostname: str = Field(..., description="The hostname of the device.")
- ip: List[str] = Field(..., description="A list of IP addresses associated with the hostname.")
-
-
-class NextHop(FeatureTemplateValidator):
- address: Optional[str] = Field(default=None, description="The IP address of the next hop for the route.")
- distance: Optional[int] = Field(default=1, description="The administrative distance of the next hop.")
-
-
-class RouteInterface(FeatureTemplateValidator):
- interface_name: str = Field(
- description="The name of the interface used for routing.", json_schema_extra={"vmanage_key": "interface-name"}
- )
- interface_next_hop: Optional[List[NextHop]] = Field(
- default=None,
- description="A list of next hops associated with the interface for routing purposes.",
- json_schema_extra={"vmanage_key": "interface-next-hop", "priority_order": ["address", "distance"]},
- )
- model_config = ConfigDict(populate_by_name=True)
-
-
-class Routev4(FeatureTemplateValidator):
- prefix: Optional[str] = Field(default=None, description="The IPv4 network prefix for the static route.")
- next_hop: Optional[List[NextHop]] = Field(
- default=None,
- description="A list of IPv4 next hops for the route.",
- json_schema_extra={"vmanage_key": "next-hop", "priority_order": ["address", "distance"]},
- )
- route_interface: Optional[RouteInterface] = Field(
- default=None,
- description="The interface configuration for the IPv4 static route.",
- json_schema_extra={"vmanage_key": "route-interface"},
- )
- null0: Optional[BoolStr] = Field(
- default=None, description="A flag indicating whether to route traffic to null0 for this static route."
- )
- distance: Optional[int] = Field(default=None, description="The administrative distance for the static route.")
- vpn: Optional[int] = Field(
- default=None, description="The VPN instance identifier associated with the static route."
- )
-
- model_config = ConfigDict(populate_by_name=True)
-
-
-class NextHopv6(FeatureTemplateValidator):
- address: str = Field(description="The IPv6 address of the next hop for the route.")
- distance: Optional[int] = Field(default=1, description="The administrative distance of the IPv6 next hop.")
-
-
-class Routev6(FeatureTemplateValidator):
- prefix: str = Field(description="The IPv6 network prefix for the static route.")
- next_hop: Optional[List[NextHopv6]] = Field(
- default=None,
- description="A list of IPv6 next hops for the route.",
- json_schema_extra={"vmanage_key": "next-hop"},
- )
- null0: Optional[BoolStr] = Field(
- default=None, description="A flag indicating whether to route IPv6 traffic to null0 for this static route."
- )
- distance: Optional[int] = Field(default=1, description="The administrative distance for the static route.")
- vpn: Optional[int] = Field(default=0, description="The VPN instance identifier associated with the static route.")
- model_config = ConfigDict(populate_by_name=True)
-
-
-class VpnVsmartModel(FeatureTemplate):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- _docs_description: str = "vSmart VPN Feature Template configuration."
-
- vpn_id: VpnId = Field(
- description="The unique identifier for the VPN, only 0 and 512 are allowed on vsmart",
- json_schema_extra={"vmanage_key": "vpn-id"},
- )
- name: Optional[str] = Field(
- default=None, description="The name of the VPN.", json_schema_extra={"vmanage_key": "name"}
- )
- dns: Optional[List[Dns]] = Field(
- default=None,
- description="A list of DNS configurations for the VPN instance.",
- )
- host: Optional[List[Host]] = Field(
- default=None,
- description="Static DNS mapping",
- json_schema_extra={"priority_order": ["hostname", "ip"]},
- )
- route_v4: Optional[List[Routev4]] = Field(
- default=None,
- description="A list of IPv4 route configurations within the VPN instance.",
- json_schema_extra={
- "data_path": ["ip"],
- "vmanage_key": "route",
- "priority_order": ["prefix", "next-hop", "next-hop-with-track"],
- },
- )
- route_v6: Optional[List[Routev6]] = Field(
- default=None,
- description="A list of IPv6 route configurations within the VPN instance.",
- json_schema_extra={"data_path": ["ipv6"], "vmanage_key": "route"},
- )
-
- payload_path: ClassVar[Path] = Path(__file__).parent / "DEPRECATED"
- type: ClassVar[str] = "vpn-vsmart"
diff --git a/catalystwan/dataclasses.py b/catalystwan/dataclasses.py
index 4a444a87..8d021625 100644
--- a/catalystwan/dataclasses.py
+++ b/catalystwan/dataclasses.py
@@ -13,6 +13,7 @@
from catalystwan.utils.creation_tools import FIELD_NAME, asdict, convert_attributes
from catalystwan.utils.personality import Personality
from catalystwan.utils.reachability import Reachability
+from catalystwan.utils.template_type import TemplateType
class DataclassBase:
@@ -251,6 +252,36 @@ class User(DataclassBase):
resource_group: Optional[str] = field(default=None, metadata={FIELD_NAME: "resGroupName"})
+@define(kw_only=True)
+class TemplateInfo(DataclassBase):
+ last_updated_by: str = field(metadata={FIELD_NAME: "lastUpdatedBy"})
+ id: str = field(metadata={FIELD_NAME: "templateId"})
+ factory_default: bool = field(metadata={FIELD_NAME: "factoryDefault"})
+ name: str = field(metadata={FIELD_NAME: "templateName"})
+ devices_attached: int = field(metadata={FIELD_NAME: "devicesAttached"})
+ description: str = field(metadata={FIELD_NAME: "templateDescription"})
+ last_updated_on: dt.datetime = field(metadata={FIELD_NAME: "lastUpdatedOn"})
+ resource_group: Optional[str] = field(default=None, metadata={FIELD_NAME: "resourceGroup"})
+
+
+@define(kw_only=True)
+class FeatureTemplateInfo(TemplateInfo):
+ template_type: str = field(metadata={FIELD_NAME: "templateType"})
+ device_type: List[str] = field(metadata={FIELD_NAME: "deviceType"})
+ version: str = field(metadata={FIELD_NAME: "templateMinVersion"})
+ template_definiton: Optional[str] = field(default=None, metadata={FIELD_NAME: "templateDefinition"})
+
+
+@define(kw_only=True)
+class DeviceTemplateInfo(TemplateInfo):
+ device_type: str = field(metadata={FIELD_NAME: "deviceType"})
+ template_class: str = field(metadata={FIELD_NAME: "templateClass"})
+ config_type: TemplateType = field(converter=TemplateType, metadata={FIELD_NAME: "configType"})
+ template_attached: int = field(metadata={FIELD_NAME: "templateAttached"})
+ draft_mode: Optional[str] = field(default=None, metadata={FIELD_NAME: "draftMode"})
+ device_role: Optional[str] = field(default=None, metadata={FIELD_NAME: "deviceRole"})
+
+
@define
class Speedtest(DataclassBase):
device_ip: str
@@ -343,6 +374,27 @@ class TierInfo(DataclassBase):
nat_session_limit: Optional[int] = field(default=None, metadata={FIELD_NAME: "natSessionLimit"})
+@define(frozen=True)
+class FeatureTemplateInformation(DataclassBase):
+ """Endpoint: /dataservice/template/feature"""
+
+ id: str = field(metadata={FIELD_NAME: "templateId"})
+ name: str = field(metadata={FIELD_NAME: "templateName"})
+ description: str = field(metadata={FIELD_NAME: "templateDescription"})
+ type: str = field(metadata={FIELD_NAME: "templateType"}) # TODO Enum
+ device_types: List[str] = field(metadata={FIELD_NAME: "deviceType"}) # TODO Enum
+ last_updated_by: str = field(metadata={FIELD_NAME: "lastUpdatedBy"})
+ last_updated_on: dt.datetime = field(metadata={FIELD_NAME: "lastUpdatedOn"})
+ factory_default: bool = field(metadata={FIELD_NAME: "factoryDefault"})
+ devices_attached: int = field(metadata={FIELD_NAME: "devicesAttached"})
+ attached_masters: int = field(metadata={FIELD_NAME: "attachedMastersCount"})
+ version: str = field(metadata={FIELD_NAME: "templateMinVersion"})
+ config_type: str = field(metadata={FIELD_NAME: "configType"})
+ created_by: str = field(metadata={FIELD_NAME: "createdBy"})
+ created_on: dt.datetime = field(metadata={FIELD_NAME: "createdOn"})
+ resource_group: str = field(metadata={FIELD_NAME: "resourceGroup"})
+
+
@define
class Organization(DataclassBase):
name: str = field(metadata={FIELD_NAME: "org"})
diff --git a/catalystwan/endpoints/configuration_general_template.py b/catalystwan/endpoints/configuration_general_template.py
deleted file mode 100644
index 02182377..00000000
--- a/catalystwan/endpoints/configuration_general_template.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-# mypy: disable-error-code="empty-body"
-from typing import Literal, Optional
-from uuid import UUID
-
-from pydantic import BaseModel, Field
-
-from catalystwan.endpoints import APIEndpoints, get
-from catalystwan.models.templates import FeatureTemplateDefinition, FeatureTemplateInformation
-from catalystwan.typed_list import DataSequence
-
-FeatureType = Literal["all", "vmanage-default", "network-design", "cloud-dock", "lawful-interception"]
-
-
-class FeatureQueryParams(BaseModel):
- summary: bool = Field(default=False)
- offset: Optional[int] = Field(default=None)
- limit: Optional[int] = Field(default=None)
-
-
-class ConfigurationGeneralTemplate(APIEndpoints):
- @get("/template/feature", "data")
- def get_feature_template_list(
- self, params: FeatureQueryParams = FeatureQueryParams()
- ) -> DataSequence[FeatureTemplateInformation]:
- ...
-
- @get("/template/feature/object/{template_id}")
- def get_template_definition(self, template_id: UUID) -> DataSequence[FeatureTemplateDefinition]:
- ...
diff --git a/catalystwan/endpoints/configuration_template_master.py b/catalystwan/endpoints/configuration_template_master.py
deleted file mode 100644
index ece35326..00000000
--- a/catalystwan/endpoints/configuration_template_master.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-# mypy: disable-error-code="empty-body"
-
-from uuid import UUID
-
-from pydantic import BaseModel, ConfigDict, Field
-
-from catalystwan.endpoints import JSON, APIEndpoints, get, post
-from catalystwan.models.templates import DeviceTemplateInformation, FeatureType
-from catalystwan.typed_list import DataSequence
-
-
-class TemplateID(BaseModel):
- model_config = ConfigDict(populate_by_name=True)
-
- template_id: UUID = Field(serialization_alias="templateId", validation_alias="templateId")
-
-
-class FeatureQueryParams(BaseModel):
- model_config = ConfigDict(populate_by_name=True)
-
- feature: FeatureType = Field(default="all")
-
-
-class ConfigurationTemplateMaster(APIEndpoints):
- @get("/template/device", "data")
- def get_device_template_list(
- self, params: FeatureQueryParams = FeatureQueryParams()
- ) -> DataSequence[DeviceTemplateInformation]:
- ...
-
- @post("/template/device/feature")
- def create_device_template_from_feature_templates(self, payload: JSON) -> TemplateID:
- ...
diff --git a/catalystwan/endpoints/endpoints_container.py b/catalystwan/endpoints/endpoints_container.py
index c0343de9..702ea865 100644
--- a/catalystwan/endpoints/endpoints_container.py
+++ b/catalystwan/endpoints/endpoints_container.py
@@ -87,10 +87,8 @@
ConfigurationFeatureProfile,
SDRoutingConfigurationFeatureProfile,
)
-from catalystwan.endpoints.configuration_general_template import ConfigurationGeneralTemplate
from catalystwan.endpoints.configuration_group import ConfigurationGroup
from catalystwan.endpoints.configuration_settings import ConfigurationSettings
-from catalystwan.endpoints.configuration_template_master import ConfigurationTemplateMaster
from catalystwan.endpoints.misc import MiscellaneousEndpoints
from catalystwan.endpoints.monitoring.device_details import MonitoringDeviceDetails
from catalystwan.endpoints.monitoring.server_info import ServerInfo
@@ -229,5 +227,3 @@ def __init__(self, session: ManagerSession):
self.real_time_monitoring = RealTimeMonitoringContainer(session)
self.certificate_management_device = CertificateManagementDevice(session)
self.sig_security = SIGSecurity(session)
- self.configuration_general_template = ConfigurationGeneralTemplate(session)
- self.configuration_template_master = ConfigurationTemplateMaster(session)
diff --git a/catalystwan/integration_tests/test_find_template_values.py b/catalystwan/integration_tests/test_find_template_values.py
index a73394c8..95b1d02a 100644
--- a/catalystwan/integration_tests/test_find_template_values.py
+++ b/catalystwan/integration_tests/test_find_template_values.py
@@ -13,7 +13,7 @@ def test_find_template_value(self):
self.templates = self.session.api.templates._get_feature_templates(summary=False)
# Act, Assert
for template in self.templates:
- definition = json.loads(template.template_definition)
+ definition = json.loads(template.template_definiton)
with self.subTest(template_name=template.name):
parsed_values = find_template_values(definition)
self.assertFalse(
diff --git a/catalystwan/models/common.py b/catalystwan/models/common.py
index c47b7732..4ad1fb07 100644
--- a/catalystwan/models/common.py
+++ b/catalystwan/models/common.py
@@ -254,10 +254,6 @@ def int_range_serializer(value: IntRange) -> str:
"Vlan",
]
-StaticNatDirection = Literal["inside", "outside"]
-
-Protocol = Literal["tcp", "udp"]
-
TLOCColor = Literal[
"default",
"mpls",
@@ -678,492 +674,3 @@ def int_range_serializer(value: IntRange) -> str:
"-7.5db",
"0db",
]
-
-
-Timezone = Literal[
- "Europe/Andorra",
- "Asia/Dubai",
- "Asia/Kabul",
- "America/Antigua",
- "America/Anguilla",
- "Europe/Tirane",
- "Asia/Yerevan",
- "Africa/Luanda",
- "Antarctica/McMurdo",
- "Antarctica/Rothera",
- "Antarctica/Palmer",
- "Antarctica/Mawson",
- "Antarctica/Davis",
- "Antarctica/Casey",
- "Antarctica/Vostok",
- "Antarctica/DumontDUrville",
- "Antarctica/Syowa",
- "America/Argentina/Buenos_Aires",
- "America/Argentina/Cordoba",
- "America/Argentina/Salta",
- "America/Argentina/Jujuy",
- "America/Argentina/Tucuman",
- "America/Argentina/Catamarca",
- "America/Argentina/La_Rioja",
- "America/Argentina/San_Juan",
- "America/Argentina/Mendoza",
- "America/Argentina/San_Luis",
- "America/Argentina/Rio_Gallegos",
- "America/Argentina/Ushuaia",
- "Pacific/Pago_Pago",
- "Europe/Vienna",
- "Australia/Lord_Howe",
- "Antarctica/Macquarie",
- "Australia/Hobart",
- "Australia/Currie",
- "Australia/Melbourne",
- "Australia/Sydney",
- "Australia/Broken_Hill",
- "Australia/Brisbane",
- "Australia/Lindeman",
- "Australia/Adelaide",
- "Australia/Darwin",
- "Australia/Perth",
- "Australia/Eucla",
- "America/Aruba",
- "Europe/Mariehamn",
- "Asia/Baku",
- "Europe/Sarajevo",
- "America/Barbados",
- "Asia/Dhaka",
- "Europe/Brussels",
- "Africa/Ouagadougou",
- "Europe/Sofia",
- "Asia/Bahrain",
- "Africa/Bujumbura",
- "Africa/Porto-Novo",
- "America/St_Barthelemy",
- "Atlantic/Bermuda",
- "Asia/Brunei",
- "America/La_Paz",
- "America/Kralendijk",
- "America/Noronha",
- "America/Belem",
- "America/Fortaleza",
- "America/Recife",
- "America/Araguaina",
- "America/Maceio",
- "America/Bahia",
- "America/Sao_Paulo",
- "America/Campo_Grande",
- "America/Cuiaba",
- "America/Santarem",
- "America/Porto_Velho",
- "America/Boa_Vista",
- "America/Manaus",
- "America/Eirunepe",
- "America/Rio_Branco",
- "America/Nassau",
- "Asia/Thimphu",
- "Africa/Gaborone",
- "Europe/Minsk",
- "America/Belize",
- "America/St_Johns",
- "America/Halifax",
- "America/Glace_Bay",
- "America/Moncton",
- "America/Goose_Bay",
- "America/Blanc-Sablon",
- "America/Toronto",
- "America/Nipigon",
- "America/Thunder_Bay",
- "America/Iqaluit",
- "America/Pangnirtung",
- "America/Resolute",
- "America/Atikokan",
- "America/Rankin_Inlet",
- "America/Winnipeg",
- "America/Rainy_River",
- "America/Regina",
- "America/Swift_Current",
- "America/Edmonton",
- "America/Cambridge_Bay",
- "America/Yellowknife",
- "America/Inuvik",
- "America/Creston",
- "America/Dawson_Creek",
- "America/Vancouver",
- "America/Whitehorse",
- "America/Dawson",
- "Indian/Cocos",
- "Africa/Kinshasa",
- "Africa/Lubumbashi",
- "Africa/Bangui",
- "Africa/Brazzaville",
- "Europe/Zurich",
- "Africa/Abidjan",
- "Pacific/Rarotonga",
- "America/Santiago",
- "Pacific/Easter",
- "Africa/Douala",
- "Asia/Shanghai",
- "Asia/Harbin",
- "Asia/Chongqing",
- "Asia/Urumqi",
- "Asia/Kashgar",
- "America/Bogota",
- "America/Costa_Rica",
- "America/Havana",
- "Atlantic/Cape_Verde",
- "America/Curacao",
- "Indian/Christmas",
- "Asia/Nicosia",
- "Europe/Prague",
- "Europe/Berlin",
- "Europe/Busingen",
- "Africa/Djibouti",
- "Europe/Copenhagen",
- "America/Dominica",
- "America/Santo_Domingo",
- "Africa/Algiers",
- "America/Guayaquil",
- "Pacific/Galapagos",
- "Europe/Tallinn",
- "Africa/Cairo",
- "Africa/El_Aaiun",
- "Africa/Asmara",
- "Europe/Madrid",
- "Africa/Ceuta",
- "Atlantic/Canary",
- "Africa/Addis_Ababa",
- "Europe/Helsinki",
- "Pacific/Fiji",
- "Atlantic/Stanley",
- "Pacific/Chuuk",
- "Pacific/Pohnpei",
- "Pacific/Kosrae",
- "Atlantic/Faroe",
- "Europe/Paris",
- "Africa/Libreville",
- "Europe/London",
- "America/Grenada",
- "Asia/Tbilisi",
- "America/Cayenne",
- "Europe/Guernsey",
- "Africa/Accra",
- "Europe/Gibraltar",
- "America/Godthab",
- "America/Danmarkshavn",
- "America/Scoresbysund",
- "America/Thule",
- "Africa/Banjul",
- "Africa/Conakry",
- "America/Guadeloupe",
- "Africa/Malabo",
- "Europe/Athens",
- "Atlantic/South_Georgia",
- "America/Guatemala",
- "Pacific/Guam",
- "Africa/Bissau",
- "America/Guyana",
- "Asia/Hong_Kong",
- "America/Tegucigalpa",
- "Europe/Zagreb",
- "America/Port-au-Prince",
- "Europe/Budapest",
- "Asia/Jakarta",
- "Asia/Pontianak",
- "Asia/Makassar",
- "Asia/Jayapura",
- "Europe/Dublin",
- "Asia/Jerusalem",
- "Europe/Isle_of_Man",
- "Asia/Kolkata",
- "Indian/Chagos",
- "Asia/Baghdad",
- "Asia/Tehran",
- "Atlantic/Reykjavik",
- "Europe/Rome",
- "Europe/Jersey",
- "America/Jamaica",
- "Asia/Amman",
- "Asia/Tokyo",
- "Africa/Nairobi",
- "Asia/Bishkek",
- "Asia/Phnom_Penh",
- "Pacific/Tarawa",
- "Pacific/Enderbury",
- "Pacific/Kiritimati",
- "Indian/Comoro",
- "America/St_Kitts",
- "Asia/Pyongyang",
- "Asia/Seoul",
- "Asia/Kuwait",
- "America/Cayman",
- "Asia/Almaty",
- "Asia/Qyzylorda",
- "Asia/Aqtobe",
- "Asia/Aqtau",
- "Asia/Oral",
- "Asia/Vientiane",
- "Asia/Beirut",
- "America/St_Lucia",
- "Europe/Vaduz",
- "Asia/Colombo",
- "Africa/Monrovia",
- "Africa/Maseru",
- "Europe/Vilnius",
- "Europe/Luxembourg",
- "Europe/Riga",
- "Africa/Tripoli",
- "Africa/Casablanca",
- "Europe/Monaco",
- "Europe/Chisinau",
- "Europe/Podgorica",
- "America/Marigot",
- "Indian/Antananarivo",
- "Pacific/Majuro",
- "Pacific/Kwajalein",
- "Europe/Skopje",
- "Africa/Bamako",
- "Asia/Rangoon",
- "Asia/Ulaanbaatar",
- "Asia/Hovd",
- "Asia/Choibalsan",
- "Asia/Macau",
- "Pacific/Saipan",
- "America/Martinique",
- "Africa/Nouakchott",
- "America/Montserrat",
- "Europe/Malta",
- "Indian/Mauritius",
- "Indian/Maldives",
- "Africa/Blantyre",
- "America/Mexico_City",
- "America/Cancun",
- "America/Merida",
- "America/Monterrey",
- "America/Matamoros",
- "America/Mazatlan",
- "America/Chihuahua",
- "America/Ojinaga",
- "America/Hermosillo",
- "America/Tijuana",
- "America/Santa_Isabel",
- "America/Bahia_Banderas",
- "Asia/Kuala_Lumpur",
- "Asia/Kuching",
- "Africa/Maputo",
- "Africa/Windhoek",
- "Pacific/Noumea",
- "Africa/Niamey",
- "Pacific/Norfolk",
- "Africa/Lagos",
- "America/Managua",
- "Europe/Amsterdam",
- "Europe/Oslo",
- "Asia/Kathmandu",
- "Pacific/Nauru",
- "Pacific/Niue",
- "Pacific/Auckland",
- "Pacific/Chatham",
- "Asia/Muscat",
- "America/Panama",
- "America/Lima",
- "Pacific/Tahiti",
- "Pacific/Marquesas",
- "Pacific/Gambier",
- "Pacific/Port_Moresby",
- "Asia/Manila",
- "Asia/Karachi",
- "Europe/Warsaw",
- "America/Miquelon",
- "Pacific/Pitcairn",
- "America/Puerto_Rico",
- "Asia/Gaza",
- "Asia/Hebron",
- "Europe/Lisbon",
- "Atlantic/Madeira",
- "Atlantic/Azores",
- "Pacific/Palau",
- "America/Asuncion",
- "Asia/Qatar",
- "Indian/Reunion",
- "Europe/Bucharest",
- "Europe/Belgrade",
- "Europe/Kaliningrad",
- "Europe/Moscow",
- "Europe/Volgograd",
- "Europe/Samara",
- "Asia/Yekaterinburg",
- "Asia/Omsk",
- "Asia/Novosibirsk",
- "Asia/Novokuznetsk",
- "Asia/Krasnoyarsk",
- "Asia/Irkutsk",
- "Asia/Yakutsk",
- "Asia/Khandyga",
- "Asia/Vladivostok",
- "Asia/Sakhalin",
- "Asia/Ust-Nera",
- "Asia/Magadan",
- "Asia/Kamchatka",
- "Asia/Anadyr",
- "Africa/Kigali",
- "Asia/Riyadh",
- "Pacific/Guadalcanal",
- "Indian/Mahe",
- "Africa/Khartoum",
- "Europe/Stockholm",
- "Asia/Singapore",
- "Atlantic/St_Helena",
- "Europe/Ljubljana",
- "Arctic/Longyearbyen",
- "Europe/Bratislava",
- "Africa/Freetown",
- "Europe/San_Marino",
- "Africa/Dakar",
- "Africa/Mogadishu",
- "America/Paramaribo",
- "Africa/Juba",
- "Africa/Sao_Tome",
- "America/El_Salvador",
- "America/Lower_Princes",
- "Asia/Damascus",
- "Africa/Mbabane",
- "America/Grand_Turk",
- "Africa/Ndjamena",
- "Indian/Kerguelen",
- "Africa/Lome",
- "Asia/Bangkok",
- "Asia/Dushanbe",
- "Pacific/Fakaofo",
- "Asia/Dili",
- "Asia/Ashgabat",
- "Africa/Tunis",
- "Pacific/Tongatapu",
- "Europe/Istanbul",
- "America/Port_of_Spain",
- "Pacific/Funafuti",
- "Asia/Taipei",
- "Africa/Dar_es_Salaam",
- "Europe/Kiev",
- "Europe/Uzhgorod",
- "Europe/Zaporozhye",
- "Europe/Simferopol",
- "Africa/Kampala",
- "Pacific/Johnston",
- "Pacific/Midway",
- "Pacific/Wake",
- "America/New_York",
- "America/Detroit",
- "America/Kentucky/Louisville",
- "America/Kentucky/Monticello",
- "America/Indiana/Indianapolis",
- "America/Indiana/Vincennes",
- "America/Indiana/Winamac",
- "America/Indiana/Marengo",
- "America/Indiana/Petersburg",
- "America/Indiana/Vevay",
- "America/Chicago",
- "America/Indiana/Tell_City",
- "America/Indiana/Knox",
- "America/Menominee",
- "America/North_Dakota/Center",
- "America/North_Dakota/New_Salem",
- "America/North_Dakota/Beulah",
- "America/Denver",
- "America/Boise",
- "America/Phoenix",
- "America/Los_Angeles",
- "America/Anchorage",
- "America/Juneau",
- "America/Sitka",
- "America/Yakutat",
- "America/Nome",
- "America/Adak",
- "America/Metlakatla",
- "Pacific/Honolulu",
- "America/Montevideo",
- "Asia/Samarkand",
- "Asia/Tashkent",
- "Europe/Vatican",
- "America/St_Vincent",
- "America/Caracas",
- "America/Tortola",
- "America/St_Thomas",
- "Asia/Ho_Chi_Minh",
- "Pacific/Efate",
- "Pacific/Wallis",
- "Pacific/Apia",
- "Asia/Aden",
- "Indian/Mayotte",
- "Africa/Johannesburg",
- "Africa/Lusaka",
- "Africa/Harare",
- "UTC",
-]
-
-DeviceModel = Literal[
- "None",
- "vsmart",
- "vedge-cloud",
- "vmanage",
- "vedge-ISR1100-6G",
- "vedge-ISR1100X-6G",
- "vedge-ISR1100-4G",
- "vedge-ISR1100X-4G",
- "vedge-ISR1100-4GLTE",
- "vedge-cloud",
- "vedge-1000",
- "vedge-2000",
- "vedge-100",
- "vedge-100-B",
- "vedge-100-WM",
- "vedge-100-M",
- "vedge-5000",
- "vedge-IR-1101",
- "vedge-ESR-6300",
- "vedge-IR-1821",
- "vedge-IR-1831",
- "vedge-IR-1833",
- "vedge-IR-1835",
- "vedge-ASR-1001-X",
- "vedge-ASR-1002-X",
- "vedge-ASR-1002-HX",
- "vedge-ASR-1001-HX",
- "vedge-C8500L-8G4X",
- "vedge-C8500-12X4QC",
- "vedge-C8500-12X",
- "vedge-C8500L-8S4X",
- "vedge-ASR-1006-X",
- "vedge-C8500-20X6C",
- "vedge-CSR-1000v",
- "vedge-C8000V",
- "vedge-ISR-4331",
- "vedge-ISR-4431",
- "vedge-ISR-4461",
- "vedge-ISR-4451-X",
- "vedge-ISR-4321",
- "vedge-ISR-4351",
- "vedge-ISR-4221",
- "vedge-ISR-4221X",
- "vedge-C1111-8PW",
- "vedge-C1111-8PLTELAW",
- "vedge-C1111-8PLTEEAW",
- "vedge-C1113-8PMLTEEA",
- "vedge-C1116-4P",
- "vedge-C1116-4PLTEEA",
- "vedge-C1117-4P",
- "vedge-C1117-4PM",
- "vedge-C1117-4PLTEEA",
- "vedge-C1111-8PLTELA",
- "vedge-C1111-8PLTEEA",
- "vedge-C1121-8PLTEPW",
- "vedge-C1121-8PLTEP",
- "vedge-C1121X-8PLTEP",
- "vedge-C1111-4PLTEEA",
- "vedge-C1161X-8PLTEP",
- "vedge-C8300-2N2S-6T",
- "vedge-C8300-1N1S-6T",
- "vedge-C8300-1N1S-4T2X",
- "vedge-C8300-2N2S-4T2X",
- "vedge-C8200-1N-4T",
- "vedge-C8200L-1N-4T",
- "vedge-ISRv",
-]
diff --git a/catalystwan/models/configuration/config_migration.py b/catalystwan/models/configuration/config_migration.py
index 1d38b570..6ca1f84f 100644
--- a/catalystwan/models/configuration/config_migration.py
+++ b/catalystwan/models/configuration/config_migration.py
@@ -69,6 +69,7 @@ def is_compatible(self, other: "VersionInfo"):
class DeviceTemplateWithInfo(DeviceTemplate):
model_config = ConfigDict(populate_by_name=True, alias_generator=camel)
template_id: str
+ factory_default: bool
devices_attached: int
@staticmethod
@@ -76,6 +77,7 @@ def from_merged(template: DeviceTemplate, info: TemplateInformation) -> "DeviceT
info_dict = template.model_dump()
return DeviceTemplateWithInfo(
template_id=info.id,
+ factory_default=info.factory_default,
devices_attached=info.devices_attached,
**info_dict,
)
@@ -92,9 +94,9 @@ def get_flattened_general_templates(self) -> List[GeneralTemplate]:
"""
result = []
for template in self.general_templates:
- subtemplates = template.sub_templates
- if subtemplates and template.template_type not in ["cisco_vpn", "vpn-vedge", "cellular-cedge-controller"]:
- template.sub_templates = []
+ subtemplates = template.subTemplates
+ if subtemplates and template.templateType not in ["cisco_vpn", "vpn-vedge", "cellular-cedge-controller"]:
+ template.subTemplates = []
for subtemplate in subtemplates:
result.append(subtemplate)
result.append(template)
diff --git a/catalystwan/models/configuration/feature_profile/sdwan/system/basic.py b/catalystwan/models/configuration/feature_profile/sdwan/system/basic.py
index 62bdbd96..e840d5e7 100644
--- a/catalystwan/models/configuration/feature_profile/sdwan/system/basic.py
+++ b/catalystwan/models/configuration/feature_profile/sdwan/system/basic.py
@@ -5,7 +5,7 @@
from pydantic import AliasPath, BaseModel, ConfigDict, Field
from catalystwan.api.configuration_groups.parcel import Default, Global, Variable, _ParcelBase, as_default
-from catalystwan.models.common import Timezone
+from catalystwan.utils.timezone import Timezone
ConsoleBaudRate = Literal["1200", "2400", "4800", "9600", "19200", "38400", "57600", "115200"]
DefaultConsoleBaudRate = Literal["9600"]
diff --git a/catalystwan/models/templates.py b/catalystwan/models/templates.py
index 98055326..248099cd 100644
--- a/catalystwan/models/templates.py
+++ b/catalystwan/models/templates.py
@@ -1,13 +1,10 @@
# Copyright 2022 Cisco Systems, Inc. and its affiliates
import datetime as dt
-from typing import List, Literal, Optional
+from typing import List, Optional
from pydantic import BaseModel, ConfigDict, Field
-FeatureType = Literal["all", "vmanage-default", "network-design", "cloud-dock", "lawful-interception"]
-TemplateType = Literal["file", "template"] # file == cli, template == feature
-
class TemplateInformation(BaseModel):
model_config = ConfigDict(populate_by_name=True)
@@ -18,6 +15,10 @@ class TemplateInformation(BaseModel):
name: str = Field(serialization_alias="templateName", validation_alias="templateName")
devices_attached: int = Field(serialization_alias="devicesAttached", validation_alias="devicesAttached")
description: str = Field(serialization_alias="templateDescription", validation_alias="templateDescription")
+ last_updated_on: dt.datetime = Field(serialization_alias="lastUpdatedOn", validation_alias="lastUpdatedOn")
+ resource_group: Optional[str] = Field(
+ default=None, serialization_alias="resourceGroup", validation_alias="resourceGroup"
+ )
class FeatureTemplateInformation(TemplateInformation):
@@ -26,20 +27,9 @@ class FeatureTemplateInformation(TemplateInformation):
template_type: str = Field(serialization_alias="templateType", validation_alias="templateType")
device_type: List[str] = Field(serialization_alias="deviceType", validation_alias="deviceType")
version: str = Field(serialization_alias="templateMinVersion", validation_alias="templateMinVersion")
- template_definition: Optional[str] = Field(
+ template_definiton: Optional[str] = Field(
default=None, serialization_alias="templateDefinition", validation_alias="templateDefinition"
)
- created_by: Optional[str] = Field(default=None, serialization_alias="createdBy", validation_alias="createdBy")
- created_on: Optional[int] = Field(default=None, serialization_alias="createdOn", validation_alias="createdOn")
- last_updated_on: dt.datetime = Field(serialization_alias="lastUpdatedOn", validation_alias="lastUpdatedOn")
- config_type: Optional[str] = Field(default=None, serialization_alias="configType", validation_alias="configType")
- attached_masters_count: Optional[str] = Field(
- default=None, serialization_alias="attachedMasterCount", validation_alias="attachedMasterCount"
- )
- devices_attached: int = Field(serialization_alias="devicesAttached", validation_alias="devicesAttached")
- resource_group: Optional[str] = Field(
- default=None, serialization_alias="resourceGroup", validation_alias="resourceGroup"
- )
class DeviceTemplateInformation(TemplateInformation):
@@ -51,29 +41,3 @@ class DeviceTemplateInformation(TemplateInformation):
template_attached: int = Field(serialization_alias="templateAttached", validation_alias="templateAttached")
draft_mode: Optional[str] = Field(default=None, serialization_alias="draftMode", validation_alias="draftMode")
device_role: Optional[str] = Field(default=None, serialization_alias="deviceRole", validation_alias="deviceRole")
- resource_group: Optional[str] = Field(
- default=None, serialization_alias="resourceGroup", validation_alias="resourceGroup"
- )
- last_updated_on: dt.datetime = Field(serialization_alias="lastUpdatedOn", validation_alias="lastUpdatedOn")
- last_updated_by: str = Field(serialization_alias="lastUpdatedBy", validation_alias="lastUpdatedBy")
-
-
-class FeatureTemplateDefinition(TemplateInformation):
- model_config = ConfigDict(populate_by_name=True)
-
- template_type: str = Field(serialization_alias="templateType", validation_alias="templateType")
- version: str = Field(serialization_alias="templateMinVersion", validation_alias="templateMinVersion")
- device_type: List[str] = Field(serialization_alias="deviceType", validation_alias="deviceType")
- edited_template_definition: Optional[dict] = Field(
- serialization_alias="editedTemplateDefinition", validation_alias="editedTemplateDefinition"
- )
- template_definition: Optional[dict] = Field(
- serialization_alias="templateDefinition", validation_alias="templateDefinition"
- )
- config_type: str = Field(serialization_alias="configType", validation_alias="configType")
- attached_masters_count: Optional[str] = Field(
- default=None, serialization_alias="attachedMasterCount", validation_alias="attachedMasterCount"
- )
- feature: FeatureType
- created_on: Optional[int] = Field(default=None, serialization_alias="createdOn", validation_alias="createdOn")
- created_by: Optional[str] = Field(default=None, serialization_alias="createdBy", validation_alias="createdBy")
diff --git a/catalystwan/tests/config_migration/test_data/feature_templates/dhcp.py b/catalystwan/tests/config_migration/test_data/feature_templates/dhcp.py
index 8e92a254..130973bb 100644
--- a/catalystwan/tests/config_migration/test_data/feature_templates/dhcp.py
+++ b/catalystwan/tests/config_migration/test_data/feature_templates/dhcp.py
@@ -13,9 +13,8 @@
resource_group="global",
template_type="cisco_dhcp_server",
device_type=["vedge-C1101-4PLTEPW"],
- config_type="template",
version="15.0.0",
- template_definition='{"address-pool": {"vipObjectType": "object", "vipType": "constant", "vipValue":'
+ template_definiton='{"address-pool": {"vipObjectType": "object", "vipType": "constant", "vipValue":'
'"10.0.0.0/32", "vipVariableName": "dhcp_address_pool"}, "exclude": {"vipObjectType":'
'"list", "vipType": "ignore ", "vipVariableName": "dhcp-address_exclude"}, "lease-time":'
'{"vipObjectType": "object", "vipType": "ignore", "vipValue": 86400, "vipVariableName":'
diff --git a/catalystwan/tests/config_migration/test_data/feature_templates/interface.py b/catalystwan/tests/config_migration/test_data/feature_templates/interface.py
index f37cba3d..a8529b15 100644
--- a/catalystwan/tests/config_migration/test_data/feature_templates/interface.py
+++ b/catalystwan/tests/config_migration/test_data/feature_templates/interface.py
@@ -15,9 +15,8 @@
resource_group="global",
template_type="cisco_vpn_interface",
device_type=["vedge-C1101-4PLTEPW"],
- config_type="template",
version="15.0.0",
- template_definition='{"if-name":'
+ template_definiton='{"if-name":'
'{"vipValue": "GigabitEthernet2", "vipObjectType": "object", "vipType":'
'"constant", "vipVariableName": ""}, "description": {"vipValue": "", "vipObjectType":'
'"object", "vipType": "ignore"}, "poe": {"vipValue": "", "vipObjectType": "object",'
@@ -74,9 +73,8 @@
resource_group="global",
template_type="cisco_vpn_interface_gre",
device_type=["vedge-C1101-4PLTEPW"],
- config_type="template",
version="15.0.0",
- template_definition='{"if-name":{"vipObjectType":"object","vipType":"constant","vipValue":'
+ template_definiton='{"if-name":{"vipObjectType":"object","vipType":"constant","vipValue":'
'"ImW32","vipVariableName":"vpn_if_name"},"description":{"vipObjectType":"object","vipType":'
'"constant","vipValue":"AVDYACBJ","vipVariableName":"vpn_if_description"},"application":'
'{"vipObjectType":"object","vipType":"constant","vipValue":"none","vipVariableName":'
@@ -115,9 +113,8 @@
resource_group="global",
template_type="cisco_vpn_interface_ipsec",
device_type=["vedge-C1101-4PLTEPW"],
- config_type="template",
version="15.0.0",
- template_definition='{"if-name": {"vipObjectType":'
+ template_definiton='{"if-name": {"vipObjectType":'
'"object", "vipType": "constant", "vipValue": "ipsec4",'
'"vipVariableName": "vpn_if_name"}, "description": {"vipObjectType": "object", "vipType":'
'"ignore", "vipVariableName": "vpn_if_description"}, "application": {"vipObjectType":'
@@ -168,9 +165,8 @@
resource_group="global",
template_type="vpn-cedge-interface-multilink-controller",
device_type=["vedge-C1101-4PLTEPW"],
- config_type="template",
version="15.0.0",
- template_definition='{"if-name": {"vipObjectType": "object", "vipType":'
+ template_definiton='{"if-name": {"vipObjectType": "object", "vipType":'
'"constant", "vipValue": "Multilink1",'
'"vipVariableName": "if_multilink_ctrl_if_name"}, "ppp": {"authentication": {"method":'
'{"vipObjectType": "object", "vipType": "constant", "vipValue": "pap"}, "pap":'
diff --git a/catalystwan/tests/config_migration/test_data/feature_templates/ospfv3.py b/catalystwan/tests/config_migration/test_data/feature_templates/ospfv3.py
index ef79d9e1..d28d5e43 100644
--- a/catalystwan/tests/config_migration/test_data/feature_templates/ospfv3.py
+++ b/catalystwan/tests/config_migration/test_data/feature_templates/ospfv3.py
@@ -14,9 +14,8 @@
resource_group="global",
template_type="cisco_ospfv3",
device_type=["vedge-C1101-4PLTEPW"],
- config_type="template",
version="15.0.0",
- template_definition='{"ospfv3":{"address-family":{"ipv4":{"router-id":{"vipObj'
+ template_definiton='{"ospfv3":{"address-family":{"ipv4":{"router-id":{"vipObj'
'ectType":"object","vipType":"constant","vipValue":"2.3.3.3","vipVariableName":"os'
'pfv3_router_id"},"auto-cost":{"reference-bandwidth":{"vipObjectType":"object","vi'
'pType":"ignore","vipValue":100,"vipVariableName":"ospfv3_reference_bandwidth"}},"'
diff --git a/catalystwan/tests/config_migration/test_data/feature_templates/vpn.py b/catalystwan/tests/config_migration/test_data/feature_templates/vpn.py
index 91106470..92193939 100644
--- a/catalystwan/tests/config_migration/test_data/feature_templates/vpn.py
+++ b/catalystwan/tests/config_migration/test_data/feature_templates/vpn.py
@@ -14,9 +14,8 @@
resource_group="global",
template_type="cisco_vpn",
device_type=[""],
- config_type="template",
version="15.0.0",
- template_definition='{"vpn-id":{"vipObjectType":"object","vipType":"constant","vipValue":512},'
+ template_definiton='{"vpn-id":{"vipObjectType":"object","vipType":"constant","vipValue":512},'
'"name":{"vipObjectType":"object","vipType":"constant","vipValue":"Management VPN"},'
'"ecmp-hash-key":{"layer4":{"vipObjectType":"object","vipType":"ignore","vipValue":"false"}},'
'"host":{"vipType":"ignore","vipValue":[],"vipObjectType":"tree","vipPrimaryKey":["hostname"]}}',
@@ -33,9 +32,8 @@
resource_group="global",
template_type="cisco_vpn",
device_type=[""],
- config_type="template",
version="15.0.0",
- template_definition='{"vpn-id":{"vipObjectType":"object","vipType":"constant","vipValue":0},'
+ template_definiton='{"vpn-id":{"vipObjectType":"object","vipType":"constant","vipValue":0},'
'"name":{"vipObjectType":"object","vipType":"constant","vipValue":"Transport VPN"},'
'"ecmp-hash-key":{"layer4":{"vipObjectType":"object","vipType":"ignore","vipValue":"false"}},'
'"host":{"vipType":"ignore","vipValue":[],"vipObjectType":"tree","vipPrimaryKey":["hostname"]}}',
@@ -52,9 +50,8 @@
resource_group="global",
template_type="cisco_vpn",
device_type=[""],
- config_type="template",
version="15.0.0",
- template_definition='{"vpn-id":{"vipValue":1,"vipObjectType":"object",'
+ template_definiton='{"vpn-id":{"vipValue":1,"vipObjectType":"object",'
'"vipType":"constant","vipVariableName":""},"name":{"vipValue":"","vipObjectType":'
'"object","vipType":"ignore"},"dns":{"vipValue":[],"vipObjectType":"tree",'
'"vipType":"ignore","vipPrimaryKey":["dns-addr"]},"dns-ipv6":{"vipValue":[],'
diff --git a/catalystwan/tests/config_migration/test_device_template_with_info.py b/catalystwan/tests/config_migration/test_device_template_with_info.py
index 713c1156..cf704646 100644
--- a/catalystwan/tests/config_migration/test_device_template_with_info.py
+++ b/catalystwan/tests/config_migration/test_device_template_with_info.py
@@ -16,40 +16,40 @@ def setUp(self):
device_type="None",
security_policy_id="None",
policy_id="None",
- general_templates=[
+ generalTemplates=[
# Flat - stays flat
- GeneralTemplate(name="1level", template_id="1", template_type="cedge_aaa", sub_templates=[]),
+ GeneralTemplate(name="1level", templateId="1", templateType="cedge_aaa", subTemplates=[]),
# No relation between system and logging in the UX2 - flatten them
GeneralTemplate(
name="1level",
- template_id="2",
- template_type="cisco_system",
- sub_templates=[
+ templateId="2",
+ templateType="cisco_system",
+ subTemplates=[
GeneralTemplate(
name="2level",
- template_id="3",
- template_type="cisco_logging",
- sub_templates=[],
+ templateId="3",
+ templateType="cisco_logging",
+ subTemplates=[],
),
],
),
# Cisco VPN - keep the structure
GeneralTemplate(
name="1level",
- template_id="4",
- template_type="cisco_vpn",
- sub_templates=[
+ templateId="4",
+ templateType="cisco_vpn",
+ subTemplates=[
GeneralTemplate(
name="2level",
- template_id="5",
- template_type="cisco_vpn_interface",
- sub_templates=[],
+ templateId="5",
+ templateType="cisco_vpn_interface",
+ subTemplates=[],
),
GeneralTemplate(
name="2level",
- template_id="6",
- template_type="cedge_multicast",
- sub_templates=[],
+ templateId="6",
+ templateType="cedge_multicast",
+ subTemplates=[],
),
],
),
@@ -61,30 +61,30 @@ def test_flatten_general_templates(self):
self.assertEqual(
self.device_template.get_flattened_general_templates(),
[
- GeneralTemplate(name="1level", template_id="1", template_type="cedge_aaa", sub_templates=[]),
+ GeneralTemplate(name="1level", templateId="1", templateType="cedge_aaa", subTemplates=[]),
GeneralTemplate(
name="2level",
- template_id="3",
- template_type="cisco_logging",
- sub_templates=[],
+ templateId="3",
+ templateType="cisco_logging",
+ subTemplates=[],
),
- GeneralTemplate(name="1level", template_id="2", template_type="cisco_system", sub_templates=[]),
+ GeneralTemplate(name="1level", templateId="2", templateType="cisco_system", subTemplates=[]),
GeneralTemplate(
name="1level",
- template_id="4",
- template_type="cisco_vpn",
- sub_templates=[
+ templateId="4",
+ templateType="cisco_vpn",
+ subTemplates=[
GeneralTemplate(
name="2level",
- template_id="5",
- template_type="cisco_vpn_interface",
- sub_templates=[],
+ templateId="5",
+ templateType="cisco_vpn_interface",
+ subTemplates=[],
),
GeneralTemplate(
name="2level",
- template_id="6",
- template_type="cedge_multicast",
- sub_templates=[],
+ templateId="6",
+ templateType="cedge_multicast",
+ subTemplates=[],
),
],
),
diff --git a/catalystwan/tests/config_migration/test_transform.py b/catalystwan/tests/config_migration/test_transform.py
index bcdb62b2..c04cf3f8 100644
--- a/catalystwan/tests/config_migration/test_transform.py
+++ b/catalystwan/tests/config_migration/test_transform.py
@@ -53,7 +53,7 @@ def find_subelement_parcel(
def test_when_many_cisco_vpn_feature_templates_expect_assign_to_correct_feature_profile():
"""Cisco VPN Feature Templates can represent Service, Transport, or Security VPNs,
- but there is only one template_type for all of them in UX1.
+ but there is only one templateType for all of them in UX1.
Additionally, the additional templates for VPNs (Ethernet, SVI, GRE, IPSec) can be shared between all VPNs in UX1.
@@ -97,55 +97,55 @@ def test_when_many_cisco_vpn_feature_templates_expect_assign_to_correct_feature_
device_type="None",
security_policy_id="None",
policy_id="None",
- general_templates=[
+ generalTemplates=[
GeneralTemplate(
name=vpn_management.name,
- template_id=vpn_management.id,
- template_type=vpn_management.template_type,
- sub_templates=[
+ templateId=vpn_management.id,
+ templateType=vpn_management.template_type,
+ subTemplates=[
GeneralTemplate(
name=ethernet.name,
- template_id=ethernet.id,
- template_type=ethernet.template_type,
+ templateId=ethernet.id,
+ templateType=ethernet.template_type,
),
],
),
GeneralTemplate(
name=vpn_0_transport.name,
- template_id=vpn_0_transport.id,
- template_type=vpn_0_transport.template_type,
- sub_templates=[
+ templateId=vpn_0_transport.id,
+ templateType=vpn_0_transport.template_type,
+ subTemplates=[
GeneralTemplate(
name=gre.name,
- template_id=gre.id,
- template_type=gre.template_type,
+ templateId=gre.id,
+ templateType=gre.template_type,
),
GeneralTemplate(
name=ethernet.name,
- template_id=ethernet.id,
- template_type=ethernet.template_type,
+ templateId=ethernet.id,
+ templateType=ethernet.template_type,
),
],
),
GeneralTemplate(
name=vpn_1_service.name,
- template_id=vpn_1_service.id,
- template_type=vpn_1_service.template_type,
- sub_templates=[
+ templateId=vpn_1_service.id,
+ templateType=vpn_1_service.template_type,
+ subTemplates=[
GeneralTemplate(
name=gre.name,
- template_id=gre.id,
- template_type=gre.template_type,
+ templateId=gre.id,
+ templateType=gre.template_type,
),
GeneralTemplate(
name=ethernet.name,
- template_id=ethernet.id,
- template_type=ethernet.template_type,
+ templateId=ethernet.id,
+ templateType=ethernet.template_type,
),
GeneralTemplate(
name=ipsec.name,
- template_id=ipsec.id,
- template_type=ipsec.template_type,
+ templateId=ipsec.id,
+ templateType=ipsec.template_type,
),
],
),
@@ -258,30 +258,30 @@ def test_when_ospfv3_feature_template_expect_two_parcels_assigin_to_correct_prof
device_type="None",
security_policy_id="None",
policy_id="None",
- general_templates=[
+ generalTemplates=[
GeneralTemplate(
name=vpn_0_transport.name,
- template_id=str(vpn_0_transport.id),
- template_type=vpn_0_transport.template_type,
- sub_templates=[
+ templateId=str(vpn_0_transport.id),
+ templateType=vpn_0_transport.template_type,
+ subTemplates=[
GeneralTemplate(
name=ospfv3_ft_1.name,
- template_id=ospfv3_ft_1.id,
- template_type=ospfv3_ft_1.template_type,
- sub_templates=[],
+ templateId=ospfv3_ft_1.id,
+ templateType=ospfv3_ft_1.template_type,
+ subTemplates=[],
),
],
),
GeneralTemplate(
name=vpn_service_.name,
- template_id=str(vpn_service_.id),
- template_type=vpn_service_.template_type,
- sub_templates=[
+ templateId=str(vpn_service_.id),
+ templateType=vpn_service_.template_type,
+ subTemplates=[
GeneralTemplate(
name=ospfv3_ft_2.name,
- template_id=ospfv3_ft_2.id,
- template_type=ospfv3_ft_2.template_type,
- sub_templates=[],
+ templateId=ospfv3_ft_2.id,
+ templateType=ospfv3_ft_2.template_type,
+ subTemplates=[],
),
],
),
@@ -371,28 +371,28 @@ def test_when_nested_feature_templates_with_interfaces_and_dhcp_servers_expect_c
device_type="None",
security_policy_id="None",
policy_id="None",
- general_templates=[
+ generalTemplates=[
GeneralTemplate(
name=vpn_service_.name,
- template_id=vpn_service_.id,
- template_type=vpn_service_.template_type,
- sub_templates=[
+ templateId=vpn_service_.id,
+ templateType=vpn_service_.template_type,
+ subTemplates=[
GeneralTemplate(
name=ethernet.name,
- template_id=ethernet.id,
- template_type=ethernet.template_type,
- sub_templates=[
+ templateId=ethernet.id,
+ templateType=ethernet.template_type,
+ subTemplates=[
GeneralTemplate(
name=dhcp.name,
- template_id=dhcp.id,
- template_type=dhcp.template_type,
+ templateId=dhcp.id,
+ templateType=dhcp.template_type,
),
],
),
GeneralTemplate(
name=multilink.name,
- template_id=multilink.id,
- template_type=multilink.template_type,
+ templateId=multilink.id,
+ templateType=multilink.template_type,
),
],
),
@@ -458,16 +458,16 @@ def test_when_transform_expect_removed_copies():
device_type="None",
security_policy_id="None",
policy_id="None",
- general_templates=[
+ generalTemplates=[
GeneralTemplate(
name=vpn_service_.name,
- template_id=vpn_service_.id,
- template_type=vpn_service_.template_type,
- sub_templates=[
+ templateId=vpn_service_.id,
+ templateType=vpn_service_.template_type,
+ subTemplates=[
GeneralTemplate(
name=ethernet.name,
- template_id=ethernet.id,
- template_type=ethernet.template_type,
+ templateId=ethernet.id,
+ templateType=ethernet.template_type,
),
],
),
@@ -483,16 +483,16 @@ def test_when_transform_expect_removed_copies():
device_type="None",
security_policy_id="None",
policy_id="None",
- general_templates=[
+ generalTemplates=[
GeneralTemplate(
name=vpn_service_.name,
- template_id=vpn_service_.id,
- template_type=vpn_service_.template_type,
- sub_templates=[
+ templateId=vpn_service_.id,
+ templateType=vpn_service_.template_type,
+ subTemplates=[
GeneralTemplate(
name=ethernet.name,
- template_id=ethernet.id,
- template_type=ethernet.template_type,
+ templateId=ethernet.id,
+ templateType=ethernet.template_type,
),
],
),
diff --git a/catalystwan/tests/templates/definitions/cisco_vpn_basic.json b/catalystwan/tests/templates/definitions/Basic_Cisco_VPN_Model.json
similarity index 88%
rename from catalystwan/tests/templates/definitions/cisco_vpn_basic.json
rename to catalystwan/tests/templates/definitions/Basic_Cisco_VPN_Model.json
index 9f902281..957d3868 100644
--- a/catalystwan/tests/templates/definitions/cisco_vpn_basic.json
+++ b/catalystwan/tests/templates/definitions/Basic_Cisco_VPN_Model.json
@@ -1,5 +1,5 @@
{
- "templateName": "cisco_vpn_basic",
+ "templateName": "Basic_Cisco_VPN_Model",
"templateDescription": "Primitive",
"templateType": "cisco_vpn",
"deviceType": [
@@ -14,4 +14,4 @@
"vipValue": 0
}
}
-}
\ No newline at end of file
+}
diff --git a/catalystwan/tests/templates/definitions/aaa_basic.json b/catalystwan/tests/templates/definitions/aaa_basic.json
deleted file mode 100644
index 0f78865e..00000000
--- a/catalystwan/tests/templates/definitions/aaa_basic.json
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "templateName": "basic_aaa",
- "templateDescription": "zyx",
- "templateType": "aaa",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "aaa": {
- "auth-order": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "local",
- "vipObjectType": "object"
- },
- {
- "vipType": "constant",
- "vipValue": "radius",
- "vipObjectType": "object"
- },
- {
- "vipType": "constant",
- "vipValue": "tacacs",
- "vipObjectType": "object"
- }
- ]
- },
- "auth-fallback": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "admin-auth-order": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "logs": {
- "audit-disable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "netconf-disable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "accounting": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "ciscotacro-user": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "ciscotacrw-user": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- "tacacs": {
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "authentication": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "pap"
- }
- },
- "radius": {
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "retransmit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 3
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/aaa_complex.json b/catalystwan/tests/templates/definitions/aaa_complex.json
deleted file mode 100644
index 1bafbc3c..00000000
--- a/catalystwan/tests/templates/definitions/aaa_complex.json
+++ /dev/null
@@ -1,464 +0,0 @@
-{
- "templateName": "complex_aaa",
- "templateDescription": "zyx",
- "templateType": "aaa",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "aaa": {
- "auth-order": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "local",
- "vipObjectType": "object"
- },
- {
- "vipType": "constant",
- "vipValue": "radius",
- "vipObjectType": "object"
- }
- ]
- },
- "radius-servers": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "nonexisiting",
- "second"
- ]
- },
- "auth-fallback": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "admin-auth-order": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "logs": {
- "audit-disable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "netconf-disable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- "accounting": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "usergroup": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "netadmin"
- },
- "priority-order": [
- "name"
- ]
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "basic"
- },
- "priority-order": [
- "name"
- ],
- "task": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "system"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- },
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "interface"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "mode"
- ]
- }
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "operator"
- },
- "priority-order": [
- "name"
- ],
- "task": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "system"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- },
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "interface"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- },
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "policy"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- },
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "routing"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- },
- {
- "mode": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "security"
- },
- "priority-order": [
- "mode",
- "permission"
- ],
- "permission": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- {
- "vipType": "constant",
- "vipValue": "read",
- "vipObjectType": "object"
- }
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "mode"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "user": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example-user"
- },
- "password": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example-pass"
- },
- "secret": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "user-secret"
- },
- "description": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "user-desc"
- },
- "group": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "netadmin"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "ciscotacro-user": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "ciscotacrw-user": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "tacacs": {
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "authentication": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ascii"
- },
- "server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2.2.2.2"
- },
- "priority-order": [
- "address",
- "auth-port",
- "vpn",
- "source-interface",
- "secret-key",
- "priority"
- ],
- "auth-port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "0"
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "eth12"
- },
- "secret-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secret-example"
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- }
- },
- "radius": {
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 6
- },
- "retransmit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 4
- },
- "server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.1.1.1"
- },
- "priority-order": [
- "address",
- "auth-port",
- "vpn",
- "source-interface",
- "key",
- "secret-key",
- "priority",
- "tag",
- "acct-port"
- ],
- "tag": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "complex1"
- },
- "auth-port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2000
- },
- "acct-port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1000
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "0"
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "eth1"
- },
- "key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example-key"
- },
- "secret-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example-secret"
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_banner.json b/catalystwan/tests/templates/definitions/banner_1.json
similarity index 100%
rename from catalystwan/tests/templates/definitions/cisco_banner.json
rename to catalystwan/tests/templates/definitions/banner_1.json
diff --git a/catalystwan/tests/templates/definitions/cisco_aaa_complex.json b/catalystwan/tests/templates/definitions/cisco_aaa_complex.json
deleted file mode 100644
index 09c9abc7..00000000
--- a/catalystwan/tests/templates/definitions/cisco_aaa_complex.json
+++ /dev/null
@@ -1,361 +0,0 @@
-{
- "templateName": "cisco_aaa_complex",
- "templateDescription": "cisco_aaa_complex",
- "templateType": "cedge_aaa",
- "deviceType": [
- "vedge-C8000V"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "authentication": {
- "dot1x": {
- "default": {
- "authentication_group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- }
- },
- "accounting": {
- "dot1x": {
- "default": {
- "start-stop": {
- "accounting_group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- }
- },
- "accounting-rule": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "rule-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1111"
- },
- "method": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "commands"
- },
- "level": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1"
- },
- "start-stop": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "radius-4,tacacs-5"
- }
- }
- ],
- "vipPrimaryKey": [
- "rule-id"
- ]
- }
- },
- "server-auth-order": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "local,radius-4,tacacs-5"
- },
- "user": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example_user"
- },
- "password": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure_password"
- },
- "secret": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure_secret"
- },
- "privilege": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "15"
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "radius": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "group-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "radius-4"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 4
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "FortyGigabitEthernet0/"
- },
- "server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.1.1.1"
- },
- "auth-port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1000
- },
- "acct-port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1813
- },
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "retransmit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "radius_key"
- },
- "secret-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secret_radius_key"
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "group-name"
- ]
- },
- "radius-dynamic-author": {
- "radius-client": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "10.1.1.1"
- },
- "vpn": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "radiuscoa_vpn_name"
- },
- "server-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure_radius_server_key"
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "ip"
- ]
- },
- "rda-server-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure_server_key_password"
- },
- "domain-stripping": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "right-to-left"
- },
- "auth-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "any"
- },
- "port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1163
- }
- },
- "radius-trustsec": {
- "cts-auth-list": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example_element"
- },
- "radius-trustsec-group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "radius-4"
- }
- },
- "tacacs": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "group-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "tacacs-5"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2.2.2.2"
- },
- "port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 49
- },
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "tacacs_key"
- },
- "secret-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secret_tacacs_key,"
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "group-name"
- ]
- },
- "authorization": {
- "authorization-console": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "authorization-config-commands": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "authorization-rule": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "rule-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "12"
- },
- "method": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "commands"
- },
- "level": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "15"
- },
- "group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "radius-4,tacacs-5"
- },
- "if-authenticated": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- ],
- "vipPrimaryKey": [
- "rule-id"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_logging_complex.json b/catalystwan/tests/templates/definitions/cisco_logging_complex.json
deleted file mode 100644
index 1f9d4224..00000000
--- a/catalystwan/tests/templates/definitions/cisco_logging_complex.json
+++ /dev/null
@@ -1,268 +0,0 @@
-{
- "templateName": "cisco_logging_complex",
- "templateDescription": "cisco_logging_complex",
- "templateType": "cisco_logging",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "disk": {
- "enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "file": {
- "size": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "rotate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- }
- }
- },
- "tls-profile": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "default_tls_profile"
- },
- "tls-version": {
- "version": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "TLSv1.2"
- }
- },
- "auth-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Server"
- },
- "ciphersuite": {
- "ciphersuite-list": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": [
- "ECDHE-ECDSA-AES256-GCM-SHA384",
- "ECDHE-RSA-AES256-GCM-SHA384"
- ]
- }
- }
- },
- {
- "profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure_tls_profile"
- },
- "tls-version": {
- "version": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "TLSv1.2"
- }
- },
- "auth-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Mutual"
- },
- "ciphersuite": {
- "ciphersuite-list": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": [
- "ECDHE-ECDSA-CHACHA20-POLY1305",
- "ECDHE-RSA-CHACHA20-POLY1305"
- ]
- }
- }
- }
- ],
- "vipPrimaryKey": [
- "profile"
- ]
- },
- "server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.1.1.1"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "debugging"
- },
- "tls": {
- "enable-tls": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "tls-properties": {
- "custom-profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "default_tls_profile"
- }
- }
- }
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "log_server_2"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/1"
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "error"
- },
- "tls": {
- "enable-tls": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tls-properties": {
- "custom-profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "ipv6-server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ipv6_log_server_1"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/2"
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "critical"
- },
- "tls": {
- "enable-tls": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "tls-properties": {
- "custom-profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure_tls_profile"
- }
- }
- }
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ipv6_log_server_2"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/3"
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "emergency"
- },
- "tls": {
- "enable-tls": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tls-properties": {
- "custom-profile": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_ntp_complex.json b/catalystwan/tests/templates/definitions/cisco_ntp_complex.json
deleted file mode 100644
index 1bd31792..00000000
--- a/catalystwan/tests/templates/definitions/cisco_ntp_complex.json
+++ /dev/null
@@ -1,143 +0,0 @@
-{
- "templateName": "cisco_ntp_complex",
- "templateDescription": "cisco_ntp_complex",
- "templateType": "cisco_ntp",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "server": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "0.pool.ntp.org"
- },
- "key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "version": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 4
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "prefer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.pool.ntp.org"
- },
- "key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "version": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 4
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/1"
- },
- "prefer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "keys": {
- "authentication": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "md5": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "md5key1"
- }
- },
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2
- },
- "md5": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "md5key2"
- }
- }
- ],
- "vipPrimaryKey": [
- "number"
- ]
- },
- "trusted": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- 1,
- 2
- ]
- }
- },
- "master": {
- "enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "stratum": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2
- },
- "source": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Loopback0"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_omp_complex.json b/catalystwan/tests/templates/definitions/cisco_omp_complex.json
deleted file mode 100644
index 3352a921..00000000
--- a/catalystwan/tests/templates/definitions/cisco_omp_complex.json
+++ /dev/null
@@ -1,175 +0,0 @@
-{
- "templateName": "cisco_omp_complex",
- "templateDescription": "cisco_omp_complex",
- "templateType": "cisco_omp",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "graceful-restart": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "overlay-as": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 65000
- },
- "send-path-limit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "ecmp-limit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 8
- },
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "omp-admin-distance-ipv4": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 110
- },
- "omp-admin-distance-ipv6": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 115
- },
- "timers": {
- "advertisement-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "graceful-restart-timer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 120
- },
- "eor-timer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 300
- },
- "holdtime": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 180
- }
- },
- "advertise": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "bgp"
- },
- "route": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "external"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ospf"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "connected"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "static"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "eigrp"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "lisp"
- }
- }
- ],
- "vipPrimaryKey": [
- "protocol"
- ]
- },
- "ipv6-advertise": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "bgp"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ospf"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "connected"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "static"
- }
- }
- ],
- "vipPrimaryKey": [
- "protocol"
- ]
- },
- "ignore-region-path-length": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "transport-gateway": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "prefer"
- },
- "auto-translate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_ospf_complex.json b/catalystwan/tests/templates/definitions/cisco_ospf_complex.json
deleted file mode 100644
index c826073e..00000000
--- a/catalystwan/tests/templates/definitions/cisco_ospf_complex.json
+++ /dev/null
@@ -1,302 +0,0 @@
-{
- "templateName": "cisco_ospf_complex",
- "templateDescription": "cisco_ospf_complex",
- "templateType": "cisco_ospf",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "ospf": {
- "router-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.1.1.1"
- },
- "auto-cost": {
- "reference-bandwidth": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10000
- }
- },
- "compatible": {
- "rfc1583": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "default-information": {
- "originate": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true",
- "always": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true"
- },
- "metric": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "metric-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "type1"
- }
- }
- },
- "distance": {
- "external": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "inter-area": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "intra-area": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 40
- }
- },
- "timers": {
- "spf": {
- "delay": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "initial-hold": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "max-hold": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 40
- }
- }
- },
- "redistribute": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "static"
- },
- "route-policy": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "static_policy"
- },
- "dia": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "bgp"
- },
- "route-policy": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "bgp_to_ospf_policy"
- },
- "dia": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- ],
- "vipPrimaryKey": [
- "protocol"
- ]
- },
- "max-metric": {
- "router-lsa": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "ad-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "administrative"
- },
- "time": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- }
- }
- ],
- "vipPrimaryKey": [
- "ad-type"
- ]
- }
- },
- "route-policy": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "direction": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "in"
- },
- "pol-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ospf_in_policy"
- }
- }
- ],
- "vipPrimaryKey": [
- "direction"
- ]
- },
- "area": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "a-num": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 0
- },
- "stub": {
- "no-summary": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "nssa": {
- "no-summary": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "interface": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "hello-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "dead-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 40
- },
- "retransmit-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "cost": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "network": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "broadcast"
- },
- "passive-interface": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- },
- "authentication": {
- "type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "simple"
- },
- "message-digest": {
- "message-digest-key": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "md5": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "md5keystring"
- }
- }
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "range": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.168.1.0/24"
- },
- "cost": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "no-advertise": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "a-num"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_sig.json b/catalystwan/tests/templates/definitions/cisco_sig.json
deleted file mode 100644
index e965006f..00000000
--- a/catalystwan/tests/templates/definitions/cisco_sig.json
+++ /dev/null
@@ -1,405 +0,0 @@
-{
- "templateName": "CiscoSecureInternetGatewayFeatureTemplate",
- "templateDescription": "Comprehensive CiscoSecureInternetGateway Configuration",
- "templateType": "cisco_secure_internet_gateway",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "vpn-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "childOrgId": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "example_org"
- },
- "interface": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "if-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "auto": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": false
- },
- "description": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Main interface for SIG"
- },
- "ip": {
- "unnumbered": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": false
- },
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.168.1.1/24"
- }
- },
- "tunnel-source": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.168.1.1"
- },
- "tunnel-source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Loopback0"
- },
- "tunnel-route-via": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.168.2.1"
- },
- "tunnel-destination": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "203.0.113.1"
- },
- "application": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "sig"
- },
- "tunnel-set": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secure-internet-gateway-umbrella"
- },
- "tunnel-dc-preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "primary-dc"
- },
- "tcp-mss-adjust": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1400
- },
- "mtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1400
- },
- "dead-peer-detection": {
- "dpd-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "dpd-retries": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 3
- }
- },
- "ike": {
- "ike-version": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2
- },
- "authentication-type": {
- "pre-shared-key": {
- "pre-shared-secret": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "MyPreSharedSecret"
- },
- "ike-local-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "local-id"
- },
- "ike-remote-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "remote-id"
- }
- },
- "pre-shared-key-dynamic": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": false
- }
- },
- "ike-rekey-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 3600
- },
- "ike-ciphersuite": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "aes256-cbc-sha1"
- },
- "ike-group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "14"
- }
- },
- "ipsec": {
- "ipsec-rekey-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 3600
- },
- "ipsec-replay-window": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 32
- },
- "ipsec-ciphersuite": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "aes256-gcm"
- },
- "perfect-forward-secrecy": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "group-14"
- }
- },
- "tracker": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "track-enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- }
- }
- ],
- "vipPrimaryKey": [
- "if-name"
- ]
- },
- "service": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "svc-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "sig"
- },
- "ha-pairs": {
- "interface-pair": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "active-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "active-interface-weight": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "backup-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/1"
- },
- "backup-interface-weight": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- }
- }
- ],
- "vipPrimaryKey": [
- "active-interface",
- "backup-interface"
- ]
- }
- },
- "zscaler-location-settings": {
- "auth-required": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "xff-forward-enabled": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "ofw-enabled": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": false
- },
- "ips-control": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "caution-enabled": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": false
- },
- "datacenters": {
- "primary-data-center": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Auto"
- },
- "secondary-data-center": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Auto"
- }
- },
- "surrogate": {
- "ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "idle-time": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "display-time-unit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "MINUTE"
- },
- "ip-enforced-for-known-browsers": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "refresh-time": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "refresh-time-unit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "MINUTE"
- }
- },
- "aup": {
- "enabled": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "block-internet-until-accepted": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": false
- },
- "force-ssl-inspection": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 60
- }
- },
- "location-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Auto"
- }
- },
- "umbrella-data-center": {
- "data-center-primary": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Auto"
- },
- "data-center-secondary": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Auto"
- }
- }
- }
- ],
- "vipPrimaryKey": [
- "svc-type"
- ]
- },
- "tracker-src-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.1/32"
- },
- "tracker": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "health-check-tracker"
- },
- "endpoint-api-url": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "https://api.example.com/health"
- },
- "threshold": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 60
- },
- "multiplier": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2
- },
- "tracker-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "SIG"
- }
- }
- ],
- "vipPrimaryKey": [
- "tracker-type",
- "name"
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_snmp_complex.json b/catalystwan/tests/templates/definitions/cisco_snmp_complex.json
deleted file mode 100644
index 972de950..00000000
--- a/catalystwan/tests/templates/definitions/cisco_snmp_complex.json
+++ /dev/null
@@ -1,258 +0,0 @@
-{
- "templateName": "cisco_snmp_complex",
- "templateDescription": "Comprehensive Cisco SNMP Configuration",
- "templateType": "cisco_snmp",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "contact": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "SNMP Admin"
- },
- "location": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Data Center A"
- },
- "view": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "SystemView"
- },
- "oid": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.3.6.1.2.1.1"
- },
- "exclude": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- {
- "id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.3.6.1.2.1.2"
- },
- "exclude": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- ],
- "vipPrimaryKey": [
- "id"
- ]
- }
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "AllView"
- },
- "oid": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.3.6.1"
- },
- "exclude": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- ],
- "vipPrimaryKey": [
- "id"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "community": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "public"
- },
- "view": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "SystemView"
- },
- "authorization": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "read-only"
- }
- },
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "private"
- },
- "view": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "AllView"
- },
- "authorization": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "read-only"
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "group": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "v3group"
- },
- "security-level": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "auth-priv"
- },
- "view": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "AllView"
- }
- }
- ],
- "vipPrimaryKey": [
- "name",
- "security-level"
- ]
- },
- "user": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "snmpuser"
- },
- "auth": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "md5"
- },
- "auth-password": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "authpass"
- },
- "priv": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "aes-cfb-128"
- },
- "priv-password": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "privpass"
- },
- "group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "v3group"
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "trap": {
- "target": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "vpn-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.50"
- },
- "port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 162
- },
- "community-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "public"
- },
- "user": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "snmpuser"
- },
- "source-interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- }
- }
- ],
- "vipPrimaryKey": [
- "vpn-id",
- "ip",
- "port"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_system_complex.json b/catalystwan/tests/templates/definitions/cisco_system_complex.json
deleted file mode 100644
index fa5c3966..00000000
--- a/catalystwan/tests/templates/definitions/cisco_system_complex.json
+++ /dev/null
@@ -1,502 +0,0 @@
-{
- "templateName": "cisco_system_complex",
- "templateDescription": "cisco_system_complex",
- "templateType": "cisco_system",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "clock": {
- "timezone": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "UTC"
- }
- },
- "host-name": {
- "vipValue": "",
- "vipType": "variableName",
- "vipObjectType": "object",
- "vipVariableName": "sdwan-hostname"
- },
- "description": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Example desc"
- },
- "location": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Data Center A"
- },
- "gps-location": {
- "latitude": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 37.7749
- },
- "longitude": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": -122.4194
- },
- "geo-fencing": {
- "enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "range": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "sms": {
- "enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "mobile-number": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "+12345678901"
- }
- },
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "+10987654321"
- }
- }
- ],
- "vipPrimaryKey": [
- "number"
- ]
- }
- }
- }
- },
- "device-groups": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "group1",
- "group2"
- ]
- },
- "controller-group-list": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- 1,
- 3
- ]
- },
- "system-ip": {
- "vipValue": "",
- "vipType": "variableName",
- "vipObjectType": "object",
- "vipVariableName": "192.0.2.1"
- },
- "overlay-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "site-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1001
- },
- "site-type": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "branch",
- "spoke"
- ]
- },
- "port-offset": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1000
- },
- "port-hop": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "control-session-pps": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 500
- },
- "track-transport": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "track-interface-tag": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "console-baud-rate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "9600"
- },
- "max-omp-sessions": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 50
- },
- "multi-tenant": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- },
- "track-default-gateway": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "admin-tech-on-failure": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "idle-timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 300
- },
- "tracker": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "tracker1"
- },
- "endpoint-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "203.0.113.1"
- },
- "endpoint-ip-transport-port": {
- "endpoint-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "203.0.113.1"
- },
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "tcp"
- },
- "port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 443
- }
- },
- "elements": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "element1, element2"
- ]
- },
- "boolean": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "and"
- },
- "threshold": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "multiplier": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 3
- },
- "type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "static-route"
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- },
- "object-track": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "object-number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0/0"
- },
- "sig": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "100"
- },
- "ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.1"
- },
- "mask": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "255.255.255.0"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "object": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 101
- }
- }
- ],
- "vipPrimaryKey": [
- "number"
- ]
- },
- "boolean": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "and"
- }
- },
- {
- "object-number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0/0"
- },
- "sig": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "100"
- },
- "ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.1"
- },
- "mask": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "255.255.255.0"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "object": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 101
- }
- }
- ],
- "vipPrimaryKey": [
- "number"
- ]
- },
- "boolean": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "and"
- }
- },
- {
- "object-number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "interface": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0/1"
- },
- "sig": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "200"
- },
- "ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "198.51.100.1"
- },
- "mask": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "255.255.255.0"
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2
- },
- "object": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 201
- }
- }
- ],
- "vipPrimaryKey": [
- "number"
- ]
- },
- "boolean": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "or"
- }
- }
- ],
- "vipPrimaryKey": [
- "object-number"
- ]
- },
- "on-demand": {
- "enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "idle-timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 60
- }
- },
- "role": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "edge-router"
- },
- "affinity-group": {
- "affinity-group-number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "preference": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- 1
- ]
- },
- "preference-auto": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "affinity-per-vrf": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "affinity-group-number": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "vrf-range": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "22"
- }
- }
- ],
- "vipPrimaryKey": [
- "affinity-group-number"
- ]
- }
- },
- "transport-gateway": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "enable-mrf-migration": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "enabled"
- },
- "migration-bgp-community": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 65535
- },
- "enable-management-region": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "epfr": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "conservative"
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json b/catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json
deleted file mode 100644
index e9c19ef5..00000000
--- a/catalystwan/tests/templates/definitions/cisco_vpn_interface_complex.json
+++ /dev/null
@@ -1,821 +0,0 @@
-{
- "templateName": "cisco_vpn_interface_complex",
- "templateDescription": "cisco_vpn_interface_complex",
- "templateType": "cisco_vpn_interface",
- "deviceType": [],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "if-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "description": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "WAN interface"
- },
- "poe": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "ip": {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.1/24"
- },
- "secondary-address": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.2/24"
- }
- },
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.3/24"
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- },
- "dhcp-client": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "ipv6": {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2001:db8::1/64"
- },
- "dhcp-client": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "secondary-address": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2001:db8::2/64"
- }
- },
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2001:db8::3/64"
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- },
- "access-list": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "direction": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "in"
- },
- "acl-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ipv6_acl_1"
- }
- }
- ],
- "vipPrimaryKey": [
- "direction"
- ]
- }
- },
- "dhcp-helper": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "192.0.2.254"
- ]
- },
- "tracker": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "Tracker1",
- "Tracker2"
- ]
- },
- "auto-bandwidth-detect": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "iperf-server": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.100"
- },
- "nat": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true",
- "static": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "source-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.1"
- },
- "translate-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "203.0.113.1"
- },
- "static-nat-direction": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "inside"
- },
- "source-vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- }
- }
- ],
- "vipPrimaryKey": [
- "source-ip",
- "translate-ip"
- ]
- }
- },
- "nat64": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- },
- "nat66": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tunnel-interface": {
- "encapsulation": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "encap": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ipsec"
- },
- "preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "weight": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- }
- }
- ],
- "vipPrimaryKey": [
- "encap"
- ]
- },
- "border": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "group": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- 1,
- 2
- ]
- },
- "color": {
- "value": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "mpls"
- },
- "restrict": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "false"
- }
- },
- "max-control-connections": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "control-connections": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "vbond-as-stun-server": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "exclude-controller-group-list": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- 3,
- 4
- ]
- },
- "vmanage-connection-preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "port-hop": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "tloc-extension-gre-to": {
- "dst-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "198.51.100.14"
- }
- },
- "carrier": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "carrier1"
- },
- "nat-refresh-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "hello-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "hello-tolerance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "bind": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0"
- },
- "last-resort-circuit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "low-bandwidth-link": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tunnel-tcp-mss-adjust": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1360
- },
- "clear-dont-fragment": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "propagate-sgt": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "network-broadcast": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "allow-service": {
- "all": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "bgp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "dhcp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "dns": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "icmp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "sshd": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "netconf": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "ntp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "ospf": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "stun": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "snmp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "https": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- },
- "per-tunnel-qos": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "per-tunnel-qos-aggregator": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "media-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "rj45"
- },
- "intrf-mtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1500
- },
- "mtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1400
- },
- "tcp-mss-adjust": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1360
- },
- "tloc-extension": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "100"
- },
- "load-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 300
- },
- "tloc-extension-gre-from": {
- "src-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "198.51.100.1"
- },
- "xconnect": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "10"
- }
- },
- "mac-address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "00:0C:29:4B:55:3A"
- },
- "speed": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1000"
- },
- "duplex": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "full"
- },
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "arp-timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1200
- },
- "autonegotiate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "ip-directed-broadcast": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "icmp-redirect-disable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "qos-adaptive": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true",
- "period": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 60
- },
- "downstream": {
- "bandwidth-down": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10000
- },
- "range": {
- "dmin": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5000
- },
- "dmax": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 15000
- }
- }
- },
- "upstream": {
- "bandwidth-up": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5000
- },
- "range": {
- "umin": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 2500
- },
- "umax": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 7500
- }
- }
- }
- },
- "shaping-rate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5000
- },
- "qos-map": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "default_qos_map"
- },
- "qos-map-vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "vpn_qos_map"
- },
- "service-provider": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ISP1"
- },
- "bandwidth-upstream": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5000
- },
- "bandwidth-downstream": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10000
- },
- "block-non-source-ip": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "rewrite-rule": {
- "rule-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "rewrite_rule_1"
- }
- },
- "access-list": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "direction": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "in"
- },
- "acl-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ACL-INBOUND"
- }
- },
- {
- "direction": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "out"
- },
- "acl-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "ACL-OUTBOUND"
- }
- }
- ],
- "vipPrimaryKey": [
- "direction"
- ]
- },
- "arp": {
- "ip": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "addr": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.1"
- },
- "mac": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "00:0C:29:4B:55:3A"
- }
- }
- ],
- "vipPrimaryKey": [
- "addr"
- ]
- }
- },
- "vrrp": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "grp-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 110
- },
- "timer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "track-omp": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true"
- },
- "track-prefix-list": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "TRACKING_LIST"
- },
- "ipv4": {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.254"
- }
- },
- "ipv4-secondary": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.0.2.253"
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- },
- "tloc-change-pref": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "value": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- },
- "tracking-object": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "track-action": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Decrement"
- },
- "decrement": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 20
- }
- }
- ],
- "vipPrimaryKey": [
- "name"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "grp-id"
- ]
- },
- "ipv6-vrrp": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "grp-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "priority": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 110
- },
- "timer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "track-omp": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true"
- },
- "track-prefix-list": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "TRACKING_LIST_IPV6"
- },
- "ipv6": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "ipv6-link-local": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "fe80::1"
- },
- "prefix": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2001:db8::/64"
- }
- }
- ],
- "vipPrimaryKey": [
- "ipv6-link-local"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "grp-id"
- ]
- },
- "trustsec": {
- "propagate": {
- "sgt": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- "static": {
- "sgt": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 0
- },
- "trusted": {
- "vipObjectType": "node-only",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- "enforcement": {
- "enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "sgt": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10001
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/complex_aaa.json b/catalystwan/tests/templates/definitions/complex_aaa.json
new file mode 100644
index 00000000..2f6516c5
--- /dev/null
+++ b/catalystwan/tests/templates/definitions/complex_aaa.json
@@ -0,0 +1,277 @@
+{
+ "templateName": "complex_aaa",
+ "templateDescription": "na",
+ "templateType": "cedge_aaa",
+ "deviceType": [],
+ "factoryDefault": false,
+ "templateMinVersion": "15.0.0",
+ "templateDefinition": {
+ "server-auth-order": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "local"
+ },
+ "user": {
+ "vipObjectType": "tree",
+ "vipType": "constant",
+ "vipValue": [
+ {
+ "name": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "test1"
+ },
+ "password": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "*****"
+ },
+ "secret": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "secret"
+ },
+ "privilege": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "1"
+ },
+ "pubkey-chain": {
+ "vipObjectType": "tree",
+ "vipPrimaryKey": ["key-string"],
+ "vipType": "ignore",
+ "vipValue": []
+ }
+ },
+ {
+ "name": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "test2"
+ },
+ "password": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "*****"
+ },
+ "secret": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "secret"
+ },
+ "privilege": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "15"
+ },
+ "pubkey-chain": {
+ "vipObjectType": "tree",
+ "vipPrimaryKey": ["key-string"],
+ "vipType": "ignore",
+ "vipValue": []
+ }
+ }
+ ],
+ "vipPrimaryKey": [
+ "name"
+ ]
+ },
+ "radius": {
+ "vipObjectType": "tree",
+ "vipType": "constant",
+ "vipValue": [
+ {
+ "group-name": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "group1"
+ },
+ "vpn": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 10
+ },
+ "source-interface": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "Gig1"
+ },
+ "server": {
+ "vipObjectType": "tree",
+ "vipType": "constant",
+ "vipValue": [
+ {
+ "address": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "1.1.1.1"
+ },
+ "auth-port": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 1812
+ },
+ "acct-port": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 1813
+ },
+ "timeout": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 5
+ },
+ "retransmit": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 3
+ },
+ "key": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "test_key"
+ },
+ "secret-key": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "secret_key"
+ }
+ }
+ ],
+ "vipPrimaryKey": [
+ "address"
+ ]
+ }
+ },
+ {
+ "group-name": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "group2"
+ },
+ "vpn": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 11
+ },
+ "source-interface": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "Gig2"
+ },
+ "server": {
+ "vipObjectType": "tree",
+ "vipType": "constant",
+ "vipValue": [
+ {
+ "address": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "1.1.2.1"
+ },
+ "auth-port": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 1812
+ },
+ "acct-port": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 1813
+ },
+ "timeout": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 5
+ },
+ "retransmit": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 3
+ },
+ "key": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "test_key2"
+ },
+ "secret-key": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "secret_key2"
+ }
+ }
+ ],
+ "vipPrimaryKey": [
+ "address"
+ ]
+ }
+ }
+ ],
+ "vipPrimaryKey": [
+ "group-name"
+ ]
+ },
+ "tacacs": {
+ "vipObjectType": "tree",
+ "vipType": "constant",
+ "vipValue": [
+ {
+ "group-name": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "group1"
+ },
+ "vpn": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 0
+ },
+ "source-interface": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "Gig0"
+ },
+ "server": {
+ "vipObjectType": "tree",
+ "vipType": "constant",
+ "vipValue": [
+ {
+ "address": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "1.1.1.1"
+ },
+ "port": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 49
+ },
+ "timeout": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": 5
+ },
+ "key": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "key"
+ },
+ "secret-key": {
+ "vipObjectType": "object",
+ "vipType": "constant",
+ "vipValue": "secret_key"
+ }
+ }
+ ],
+ "vipPrimaryKey": [
+ "address"
+ ]
+ }
+ }
+ ],
+ "vipPrimaryKey": [
+ "group-name"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/cisco_vpn_complex.json b/catalystwan/tests/templates/definitions/complex_cisco_vpn.json
similarity index 96%
rename from catalystwan/tests/templates/definitions/cisco_vpn_complex.json
rename to catalystwan/tests/templates/definitions/complex_cisco_vpn.json
index 30d8a0ed..2155e74c 100644
--- a/catalystwan/tests/templates/definitions/cisco_vpn_complex.json
+++ b/catalystwan/tests/templates/definitions/complex_cisco_vpn.json
@@ -1,6 +1,6 @@
{
- "templateName": "cisco_vpn_complex",
- "templateDescription": "cisco_vpn_complex",
+ "templateName": "test_vpn_new",
+ "templateDescription": "NA",
"templateType": "cisco_vpn",
"deviceType": [
"vedge-cloud"
@@ -91,7 +91,7 @@
"vipObjectType": "object",
"vipType": "constant",
"vipValue": "test_hostname"
- },
+ },
"priority-order": [
"hostname",
"ip"
@@ -245,11 +245,11 @@
"vipObjectType": "object",
"vipType": "constant",
"vipValue": "prefixv4"
- },
+ },
"priority-order": [
"prefix",
"next-hop",
- "next-hop-with-track"
+ "next-hop-with-track"
],
"next-hop": {
"vipObjectType": "tree",
@@ -445,12 +445,7 @@
"aggregate-only": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "true"
- },
- "region": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "access"
+ "vipValue": true
}
}
],
@@ -499,12 +494,7 @@
"aggregate-only": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "false"
- },
- "region": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "core"
+ "vipValue": false
}
}
],
@@ -544,12 +534,7 @@
"aggregate-only": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "true"
- },
- "region": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "access"
+ "vipValue": true
}
}
],
@@ -589,12 +574,12 @@
"overload": {
"vipObjectType": "node-only",
"vipType": "constant",
- "vipValue": "false"
+ "vipValue": false
},
"leak_from_global": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "true"
+ "vipValue": true
},
"leak_from_global_protocol": {
"vipObjectType": "object",
@@ -604,7 +589,7 @@
"leak_to_global": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "false"
+ "vipValue": false
}
}
],
@@ -743,7 +728,7 @@
"static-nat-direction": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "inside"
+ "vipValue": "outside"
}
}
],
diff --git a/catalystwan/tests/templates/definitions/cisco_aaa.json b/catalystwan/tests/templates/definitions/iuo.json
similarity index 78%
rename from catalystwan/tests/templates/definitions/cisco_aaa.json
rename to catalystwan/tests/templates/definitions/iuo.json
index c0af2f3c..ad978b7e 100644
--- a/catalystwan/tests/templates/definitions/cisco_aaa.json
+++ b/catalystwan/tests/templates/definitions/iuo.json
@@ -1,5 +1,5 @@
{
- "templateName": "cisco_aaa",
+ "templateName": "iuo",
"templateDescription": "zyx",
"templateType": "cedge_aaa",
"deviceType": [
@@ -8,30 +8,6 @@
"factoryDefault": false,
"templateMinVersion": "15.0.0",
"templateDefinition": {
- "authentication": {
- "dot1x": {
- "default": {
- "authentication_group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- }
- },
- "accounting": {
- "dot1x": {
- "default": {
- "start-stop": {
- "accounting_group": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- }
- }
- },
"server-auth-order": {
"vipObjectType": "object",
"vipType": "constant",
@@ -61,6 +37,12 @@
"vipObjectType": "object",
"vipType": "constant",
"vipValue": "15"
+ },
+ "pubkey-chain": {
+ "vipObjectType": "tree",
+ "vipPrimaryKey": ["key-string"],
+ "vipType": "ignore",
+ "vipValue": []
}
},
{
@@ -82,7 +64,13 @@
"privilege": {
"vipObjectType": "object",
"vipType": "constant",
- "vipValue": "1"
+ "vipValue": "14"
+ },
+ "pubkey-chain": {
+ "vipObjectType": "tree",
+ "vipPrimaryKey": ["key-string"],
+ "vipType": "ignore",
+ "vipValue": []
}
}
],
@@ -156,23 +144,6 @@
"vipPrimaryKey": [
"group-name"
]
- },
- "radius-dynamic-author": {
- "domain-stripping": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "no"
- },
- "auth-type": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "any"
- },
- "port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1700
- }
}
}
-}
\ No newline at end of file
+}
diff --git a/catalystwan/tests/templates/definitions/omp_1.json b/catalystwan/tests/templates/definitions/omp_1.json
new file mode 100644
index 00000000..b3918d9c
--- /dev/null
+++ b/catalystwan/tests/templates/definitions/omp_1.json
@@ -0,0 +1,11 @@
+{
+ "templateName": "omp_1",
+ "templateDescription": "default",
+ "templateType": "omp-vsmart",
+ "deviceType": [
+ "vedge-C8000V"
+ ],
+ "factoryDefault": false,
+ "templateMinVersion": "15.0.0",
+ "templateDefinition": {}
+}
diff --git a/catalystwan/tests/templates/definitions/omp_vsmart_2.json b/catalystwan/tests/templates/definitions/omp_2.json
similarity index 63%
rename from catalystwan/tests/templates/definitions/omp_vsmart_2.json
rename to catalystwan/tests/templates/definitions/omp_2.json
index 15b7e124..42a61c9a 100644
--- a/catalystwan/tests/templates/definitions/omp_vsmart_2.json
+++ b/catalystwan/tests/templates/definitions/omp_2.json
@@ -1,5 +1,5 @@
{
- "templateName": "omp_vsmart_2",
+ "templateName": "omp_2",
"templateDescription": "some changes",
"templateType": "omp-vsmart",
"deviceType": [
@@ -29,20 +29,6 @@
"vipType": "constant",
"vipValue": 30
}
- },
- "filter-route": {
- "outbound": {
- "affinity-group-preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tloc-color": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
}
}
-}
\ No newline at end of file
+}
diff --git a/catalystwan/tests/templates/definitions/omp_vsmart_3.json b/catalystwan/tests/templates/definitions/omp_3.json
similarity index 77%
rename from catalystwan/tests/templates/definitions/omp_vsmart_3.json
rename to catalystwan/tests/templates/definitions/omp_3.json
index 5a8e2f28..4cefbe83 100644
--- a/catalystwan/tests/templates/definitions/omp_vsmart_3.json
+++ b/catalystwan/tests/templates/definitions/omp_3.json
@@ -1,5 +1,5 @@
{
- "templateName": "omp_vsmart_3",
+ "templateName": "omp_3",
"templateDescription": "advanced",
"templateType": "omp-vsmart",
"deviceType": [
@@ -52,20 +52,6 @@
"vipType": "constant",
"vipValue": 30
}
- },
- "filter-route": {
- "outbound": {
- "affinity-group-preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tloc-color": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
}
}
-}
\ No newline at end of file
+}
diff --git a/catalystwan/tests/templates/definitions/omp_vsmart_1.json b/catalystwan/tests/templates/definitions/omp_vsmart_1.json
deleted file mode 100644
index e2a5bd87..00000000
--- a/catalystwan/tests/templates/definitions/omp_vsmart_1.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "templateName": "omp_vsmart_1",
- "templateDescription": "default",
- "templateType": "omp-vsmart",
- "deviceType": [
- "vedge-C8000V"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "filter-route": {
- "outbound": {
- "affinity-group-preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "tloc-color": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/omp_vsmart_complex.json b/catalystwan/tests/templates/definitions/omp_vsmart_complex.json
deleted file mode 100644
index 849ffe06..00000000
--- a/catalystwan/tests/templates/definitions/omp_vsmart_complex.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "templateName": "omp_vsmart_complex",
- "templateDescription": "Apply OMP settings for vSmart controller",
- "templateType": "omp-vsmart",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "graceful-restart": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "send-path-limit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "send-backup-paths": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "discard-rejected": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "timers": {
- "advertisement-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "graceful-restart-timer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 120
- },
- "eor-timer": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 50
- },
- "holdtime": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 300
- }
- },
- "filter-route": {
- "outbound": {
- "affinity-group-preference": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "tloc-color": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/security_vsmart_complex.json b/catalystwan/tests/templates/definitions/security_vsmart_complex.json
deleted file mode 100644
index e596a6ec..00000000
--- a/catalystwan/tests/templates/definitions/security_vsmart_complex.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "templateName": "security_vsmart_complex",
- "templateDescription": "Apply Security settings for vSmart controller",
- "templateType": "security-vsmart",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "control": {
- "protocol": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "dtls"
- },
- "tls-port": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 120
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/system_vsmart_complex.json b/catalystwan/tests/templates/definitions/system_vsmart_complex.json
deleted file mode 100644
index f7ef05bd..00000000
--- a/catalystwan/tests/templates/definitions/system_vsmart_complex.json
+++ /dev/null
@@ -1,193 +0,0 @@
-{
- "templateName": "system_vsmart_complex",
- "templateDescription": "Apply System settings for vSmart controller",
- "templateType": "system-vsmart",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "clock": {
- "timezone": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "UTC"
- }
- },
- "host-name": {
- "vipValue": "",
- "vipType": "variableName",
- "vipObjectType": "object",
- "vipVariableName": "system_host_name"
- },
- "ipv6-strict-control": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "description": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Example description"
- },
- "location": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "Location"
- },
- "system-tunnel-mtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1000
- },
- "gps-location": {
- "latitude": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 37
- },
- "longitude": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": -122
- }
- },
- "device-groups": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "example1",
- "example2"
- ]
- },
- "system-ip": {
- "vipValue": "",
- "vipType": "variableName",
- "vipObjectType": "object",
- "vipVariableName": "system_system_ip"
- },
- "site-id": {
- "vipValue": "",
- "vipType": "variableName",
- "vipObjectType": "object",
- "vipVariableName": "system_site_id"
- },
- "overlay-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 44
- },
- "topology": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "hub-and-spoke"
- ]
- },
- "port-offset": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 5
- },
- "port-hop": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": true
- },
- "control-session-pps": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 999
- },
- "controller-group-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 44
- },
- "track-transport": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "track-default-gateway": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "iptables-enable": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "admin-tech-on-failure": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "idle-timeout": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 100
- },
- "management-region": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "tloc-color-compatibility": {
- "compatible": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "color-1": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "mpls"
- },
- "priority-order": [
- "color-1",
- "color-2"
- ],
- "color-2": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "metro-ethernet"
- }
- }
- ],
- "vipPrimaryKey": [
- "color-1",
- "color-2"
- ]
- },
- "incompatible": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "color-1": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "biz-internet"
- },
- "priority-order": [
- "color-1",
- "color-2"
- ],
- "color-2": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "public-internet"
- }
- }
- ],
- "vipPrimaryKey": [
- "color-1",
- "color-2"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/vpn_vsmart_basic.json b/catalystwan/tests/templates/definitions/vpn_vsmart_basic.json
deleted file mode 100644
index d4c03dba..00000000
--- a/catalystwan/tests/templates/definitions/vpn_vsmart_basic.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "templateName": "vpn_vsmart_basic",
- "templateDescription": "Primitive",
- "templateType": "vpn-vsmart",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "vpn-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "0"
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/vpn_vsmart_complex.json b/catalystwan/tests/templates/definitions/vpn_vsmart_complex.json
deleted file mode 100644
index 55f12639..00000000
--- a/catalystwan/tests/templates/definitions/vpn_vsmart_complex.json
+++ /dev/null
@@ -1,179 +0,0 @@
-{
- "templateName": "vpn_vsmart_complex",
- "templateDescription": "cvpn_vsmart_complex",
- "templateType": "vpn-vsmart",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "vpn-id": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "0"
- },
- "name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "vpn_name_x"
- },
- "dns": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "dns-addr": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.1.1.1"
- },
- "role": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "primary"
- }
- },
- {
- "dns-addr": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2.2.2.2"
- },
- "role": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "secondary"
- }
- }
- ],
- "vipPrimaryKey": [
- "dns-addr"
- ]
- },
- "host": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "hostname": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "test_hostname"
- },
- "priority-order": [
- "hostname",
- "ip"
- ],
- "ip": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- "1.1.1.1"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "hostname"
- ]
- },
- "ip": {
- "route": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "prefix": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "prefixv4"
- },
- "priority-order": [
- "prefix",
- "next-hop",
- "next-hop-with-track"
- ],
- "next-hop": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1.1.1.1"
- },
- "priority-order": [
- "address",
- "distance"
- ],
- "distance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- }
- }
- ],
- "vipPrimaryKey": [
- "prefix"
- ]
- }
- },
- "ipv6": {
- "route": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "prefix": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "prefixv6"
- },
- "next-hop": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2.2.2.2"
- },
- "distance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- }
- }
- ],
- "vipPrimaryKey": [
- "address"
- ]
- },
- "distance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "vpn": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 0
- }
- }
- ],
- "vipPrimaryKey": [
- "prefix"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json b/catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json
deleted file mode 100644
index 199a6ff3..00000000
--- a/catalystwan/tests/templates/definitions/vpn_vsmart_interface_basic.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "templateName": "vpn_vsmart_interface_basic",
- "templateDescription": "vpn_vsmart_interface_basic",
- "templateType": "vpn-vsmart-interface",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "if-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "any"
- },
- "clear-dont-fragment": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "autonegotiate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "pmtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "mtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1500
- },
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json b/catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json
deleted file mode 100644
index b0ce8e72..00000000
--- a/catalystwan/tests/templates/definitions/vpn_vsmart_interface_complex.json
+++ /dev/null
@@ -1,208 +0,0 @@
-{
- "templateName": "vpn_vsmart_interface_complex",
- "templateDescription": "vpn_vsmart_interface_complex",
- "templateType": "vpn-vsmart-interface",
- "deviceType": [
- "vsmart"
- ],
- "factoryDefault": false,
- "templateMinVersion": "15.0.0",
- "templateDefinition": {
- "if-name": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "GigabitEthernet0/0/0"
- },
- "description": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "WAN interface"
- },
- "ip": {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "10.10.10.1"
- },
- "dhcp-client": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "dhcp-distance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- }
- },
- "ipv6": {
- "address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "2001:db8::1/64"
- },
- "dhcp-client": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "dhcp-distance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1
- },
- "dhcp-rapid-commit": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- }
- },
- "tunnel-interface": {
- "group": {
- "vipObjectType": "list",
- "vipType": "constant",
- "vipValue": [
- 0,
- 1
- ]
- },
- "color": {
- "value": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "blue"
- }
- },
- "carrier": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "carrier1"
- },
- "nat-refresh-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "hello-interval": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 10
- },
- "hello-tolerance": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 30
- },
- "allow-service": {
- "all": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "dhcp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "dns": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "icmp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "sshd": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "netconf": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "ntp": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "stun": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- }
- }
- },
- "clear-dont-fragment": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "autonegotiate": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "true"
- },
- "pmtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "mtu": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1500
- },
- "tcp-mss-adjust": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": 1452
- },
- "mac-address": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "00:1A:2B:3C:4D:5F"
- },
- "speed": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "1000"
- },
- "duplex": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "full"
- },
- "shutdown": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "false"
- },
- "arp": {
- "ip": {
- "vipObjectType": "tree",
- "vipType": "constant",
- "vipValue": [
- {
- "addr": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "192.168.1.1"
- },
- "mac": {
- "vipObjectType": "object",
- "vipType": "constant",
- "vipValue": "00:1A:2B:3C:4D:5E"
- }
- }
- ],
- "vipPrimaryKey": [
- "addr"
- ]
- }
- }
- }
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/models/__init__.py b/catalystwan/tests/templates/models/__init__.py
index 24bdbef2..8668ce1a 100644
--- a/catalystwan/tests/templates/models/__init__.py
+++ b/catalystwan/tests/templates/models/__init__.py
@@ -1,53 +1,20 @@
# Copyright 2024 Cisco Systems, Inc. and its affiliates
# type: ignore
-from catalystwan.tests.templates.models.aaa import aaa_basic, aaa_complex_template
-from catalystwan.tests.templates.models.cisco_aaa import cisco_aaa, cisco_aaa_complex
-from catalystwan.tests.templates.models.cisco_banner import cisco_banner
-from catalystwan.tests.templates.models.cisco_bfd import cisco_bfd
-from catalystwan.tests.templates.models.cisco_logging import cisco_logging_complex
-from catalystwan.tests.templates.models.cisco_ntp import cisco_ntp_complex
-from catalystwan.tests.templates.models.cisco_omp import cisco_omp_complex
-from catalystwan.tests.templates.models.cisco_ospf import cisco_ospf_complex
-from catalystwan.tests.templates.models.cisco_secure_internet_gateway import cisco_sig
-from catalystwan.tests.templates.models.cisco_snmp import cisco_snmp_complex
-from catalystwan.tests.templates.models.cisco_system import cisco_system_complex
-from catalystwan.tests.templates.models.cisco_vpn import cisco_vpn_basic, cisco_vpn_complex
-from catalystwan.tests.templates.models.cisco_vpn_interface import cisco_vpn_interface_complex
-from catalystwan.tests.templates.models.omp_vsmart import omp_vsmart_1, omp_vsmart_2, omp_vsmart_3, omp_vsmart_complex
-from catalystwan.tests.templates.models.security_vsmart import security_vsmart_complex
-from catalystwan.tests.templates.models.system_vsmart import system_vsmart_complex
-from catalystwan.tests.templates.models.vpn_vsmart import vpn_vsmart_basic, vpn_vsmart_complex
-from catalystwan.tests.templates.models.vpn_vsmart_interface import (
- vpn_vsmart_interface_basic,
- vpn_vsmart_interface_complex,
-)
+from catalystwan.tests.templates.models.cisco_aaa import cisco_aaa, complex_aaa_model
+from catalystwan.tests.templates.models.cisco_banner import banner_model
+from catalystwan.tests.templates.models.cisco_bfd import bfd_model
+from catalystwan.tests.templates.models.cisco_vpn import basic_cisco_vpn, complex_vpn_model
+from catalystwan.tests.templates.models.omp_vsmart import default_omp, omp_2, omp_3
__all__ = [
- "aaa_basic",
- "aaa_complex_template",
+ "default_omp",
+ "omp_2",
+ "omp_3",
"cisco_aaa",
- "cisco_aaa_complex",
- "cisco_banner",
- "cisco_bfd",
- "cisco_logging_complex",
- "cisco_ntp_complex",
- "cisco_omp_complex",
- "cisco_snmp_complex",
- "cisco_ospf_complex",
- "cisco_sig",
- "cisco_system_complex",
- "cisco_vpn_interface_complex",
- "cisco_vpn_basic",
- "cisco_vpn_complex",
- "omp_vsmart_1",
- "omp_vsmart_2",
- "omp_vsmart_3",
- "omp_vsmart_complex",
- "security_vsmart_complex",
- "system_vsmart_complex",
- "vpn_vsmart_basic",
- "vpn_vsmart_complex",
- "vpn_vsmart_interface_basic",
- "vpn_vsmart_interface_complex",
+ "complex_aaa_model",
+ "basic_cisco_vpn",
+ "complex_vpn_model",
+ "banner_model",
+ "bfd_model",
]
diff --git a/catalystwan/tests/templates/models/aaa.py b/catalystwan/tests/templates/models/aaa.py
deleted file mode 100644
index b79afbd3..00000000
--- a/catalystwan/tests/templates/models/aaa.py
+++ /dev/null
@@ -1,105 +0,0 @@
-from catalystwan.api.templates.models.aaa_model import (
- AAAModel,
- RadiusServer,
- TacacsServer,
- TaskPermissions,
- User,
- UserGroup,
-)
-
-aaa_basic = AAAModel(
- template_name="aaa_basic",
- template_description="zyx",
- device_models=["vsmart"],
-)
-
-aaa_complex_template = AAAModel(
- template_name="aaa_complex",
- template_description="zyx",
- device_models=["vsmart"],
- accounting=True,
- admin_auth_order=True,
- audit_disable=True,
- auth_fallback=True,
- auth_order=["local", "radius"],
- cisco_tac_ro_user=False,
- cisco_tac_rw_user=False,
- netconf_disable=True,
- radius_retransmit=4,
- radius_server=[
- RadiusServer(
- address="1.1.1.1",
- acct_port=1000,
- auth_port=2000,
- tag="complex1",
- vpn="0",
- source_interface="eth1",
- priority=1,
- key="example-key", # pragma: allowlist secret
- secret_key="example-secret", # pragma: allowlist secret
- ),
- ],
- radius_server_list=["nonexisiting", "second"],
- radius_timeout=6,
- tacacs_authentication="ascii",
- tacacs_server=[
- TacacsServer(
- address="2.2.2.2",
- auth_port=20,
- vpn="0",
- source_interface="eth12",
- priority=5,
- secret_key="secret-example", # pragma: allowlist secret
- ),
- ],
- tacacs_timeout=10,
- # task=[
- # Task(
- # name="exampletask1",
- # config_accept_action=[Command("cac"), Command("com2")],
- # config_default_action="accept",
- # config_deny_action=[Command("cda")],
- # oper_exec_accept_action=[Command("oxaa")],
- # oper_exec_default_action="accept",
- # oper_exec_deny_action=[Command("oeda")],
- # password="examplepass", # pragma: allowlist secret
- # privilege="1"
- # ),
- # Task(
- # name="exampletask2",
- # password="examplepass", # pragma: allowlist secret
- # privilege="1",
- # config_default_action="accept",
- # oper_exec_default_action="accept"
- # ),
- # ],
- user=[
- User(
- name="example-user",
- password="example-pass", # pragma: allowlist secret
- secret="user-secret", # pragma: allowlist secret
- description="user-desc",
- group=["netadmin"],
- ),
- ],
- usergroup=[
- UserGroup(name="netadmin"), #
- UserGroup(
- name="basic",
- task=[
- TaskPermissions(mode="system", permission=["read"]),
- TaskPermissions(mode="interface", permission=["read"]),
- ],
- ),
- UserGroup(
- name="operator",
- task=[
- TaskPermissions(mode="system", permission=["read"]),
- TaskPermissions(mode="interface", permission=["read"]),
- TaskPermissions(mode="policy", permission=["read"]),
- TaskPermissions(mode="routing", permission=["read"]),
- TaskPermissions(mode="security", permission=["read"]),
- ],
- ),
- ],
-)
diff --git a/catalystwan/tests/templates/models/cisco_aaa.py b/catalystwan/tests/templates/models/cisco_aaa.py
index 89913a0b..51b51f13 100644
--- a/catalystwan/tests/templates/models/cisco_aaa.py
+++ b/catalystwan/tests/templates/models/cisco_aaa.py
@@ -2,30 +2,26 @@
# type: ignore
from catalystwan.api.templates.models.cisco_aaa_model import (
- AccountingRule,
- AuthorizationRules,
CiscoAAAModel,
- PubkeyChain,
- RadiusClient,
+ DomainStripping,
RadiusGroup,
RadiusServer,
- RadiusVPN,
TacacsGroup,
TacacsServer,
User,
)
+from catalystwan.utils.device_model import DeviceModel
users = [
User(name="admin", password="str", secret="zyx", privilege="15"), # pragma: allowlist secret
- User(name="user", password="rnd", secret="dnr", privilege="1"), # pragma: allowlist secret
+ User(name="user", password="rnd", secret="dnr", privilege="14"), # pragma: allowlist secret
]
-
# CiscoAAAModel(domain-stripping="?")
cisco_aaa = CiscoAAAModel(
- template_name="cisco_aaa",
+ template_name="iuo",
template_description="zyx",
- device_models=["vedge-C8000V"],
+ device_models=[DeviceModel.VEDGE_C8000V],
user=users,
authentication_group=True,
accounting_group=False,
@@ -34,91 +30,62 @@
group_name="xyz", vpn=1, source_interface="GIG11", server=[RadiusServer(address="1.1.1.1", key="21")]
)
],
- domain_stripping="no",
+ domain_stripping=DomainStripping.NO, # type: ignore
)
-EXAMPLE_KEY_STRING = "AAAAB3NzaC1yc2EAAAADAQABAAABAQC3myRj5L6ZFLdRnOEZdUd+4Qq0XPLW9RfO6qD7DJ2t4ZzLh6Oz+IUJg8d8bJDfxO9zGKs5uUQ9f2H5yTGX5G8Z5kKp8QDp1MkDVqwGJ4UM7JqH8s8kD7xcl8SyPc5TjzK4s4W+8LPNOPXmIKtHh1Qlvkp5N7w3M/Rm5ZVX5/3+Hk8Ib5syigQQd/5u5xJj9k3i2x3m3LZ7v5e7YlCpRdCQGf6ZCwvbVQHdJp5nlU0HxJbqjOTL4IcDj09G3Dq2C5JnohKJb7E7HVCUl7F5vYpC/4iNjges65GgdzaFJsT9qA8CgxyF+7J3PpLk5qPAQDT5OjArJj4x9Bw3j3lZdH example@example.com" # noqa: E501
-
-users = [
- User(name="admin", password="str", secret="zyx", privilege="15"), # pragma: allowlist secret
- User(
- name="user",
- password="rnd", # pragma: allowlist secret
- secret="dnr", # pragma: allowlist secret
- privilege="1",
- pubkey_chain=[PubkeyChain(key_type="ssh-rsa", key_string=EXAMPLE_KEY_STRING)],
- ),
-]
+cisco_aaa_device_specific = CiscoAAAModel(
+ template_name="cisco_aaa_device_specific",
+ template_description="caaadp",
+ device_models=[DeviceModel.VEDGE_C8000V],
+ user=users,
+ authentication_group=True,
+ accounting_group=False,
+ radius=[
+ RadiusGroup( # type: ignore
+ group_name="xyz", vpn=1, source_interface="GIG11", server=[RadiusServer(address="1.1.1.1", key="21")]
+ )
+ ],
+ domain_stripping=DomainStripping.NO,
+)
-cisco_aaa_complex = CiscoAAAModel(
- template_name="cisco_aaa_complex",
- template_description="cisco_aaa_complex",
- device_models=["vedge-C8000V"],
+complex_aaa_model = CiscoAAAModel(
+ template_name="complex_aaa",
+ template_description="na",
user=[
- User(
- name="example_user",
- password="secure_password", # pragma: allowlist secret
- secret="secure_secret", # pragma: allowlist secret
- privilege="15",
- ),
+ User(name="test1", password="*****", secret="secret", privilege="1"), # pragma: allowlist secret
+ User(name="test2", password="*****", secret="secret", privilege="15"), # pragma: allowlist secret
],
- tacacs=[
- TacacsGroup(
+ authentication_group=True,
+ accounting_group=False,
+ radius=[
+ RadiusGroup(
+ group_name="group1",
+ vpn=10,
+ source_interface="Gig1",
server=[
- TacacsServer(
- address="2.2.2.2",
- key="tacacs_key",
- port=49,
- timeout=5,
- secret_key="secret_tacacs_key,",
- )
+ RadiusServer(address="1.1.1.1", key="test_key", secret_key="secret_key") # pragma: allowlist secret
],
- group_name="tacacs-5",
- vpn=5,
- source_interface="GigabitEthernet0/0",
- )
- ],
- radius=[
+ ),
RadiusGroup(
+ group_name="group2",
+ vpn=11,
+ source_interface="Gig2",
server=[
RadiusServer(
- address="1.1.1.1",
- auth_port=1000,
- timeout=10,
- retransmit=5,
- key="radius_key", # pragma: allowlist secret
- secret_key="secret_radius_key", # pragma: allowlist secret
+ address="1.1.2.1",
+ key="test_key2",
+ secret_key="secret_key2", # pragma: allowlist secret
)
],
- group_name="radius-4",
- vpn=4,
- source_interface="FortyGigabitEthernet0/",
- )
- ],
- radius_client=[
- RadiusClient(ip="10.1.1.1", vpn=[RadiusVPN(name="radiuscoa_vpn_name", server_key="secure_radius_server_key")])
+ ),
],
- domain_stripping="right-to-left",
- authentication_type="any",
- port=1163,
- server_key_password="secure_server_key_password", # pragma: allowlist secret
- cts_authorization_list="example_element",
- radius_trustsec_group="radius-4",
- authentication_group=True,
- accounting_group=True,
- accounting_rules=[
- AccountingRule(
- rule_id="1111",
- method="commands",
- level="1",
- start_stop=False,
- group="radius-4,tacacs-5",
+ domain_stripping=DomainStripping.RIGHT_TO_LEFT,
+ tacacs=[
+ TacacsGroup(
+ group_name="group1",
+ vpn=0,
+ source_interface="Gig0",
+ server=[TacacsServer(address="1.1.1.1", key="key", secret_key="secret_key")], # pragma: allowlist secret
)
],
- authorization_console=True,
- authorization_config_commands=True,
- authorization_rules=[
- AuthorizationRules(rule_id="12", method="commands", level="15", group="radius-4,tacacs-5", authenticated=True)
- ],
- server_auth_order="local,radius-4,tacacs-5",
)
diff --git a/catalystwan/tests/templates/models/cisco_banner.py b/catalystwan/tests/templates/models/cisco_banner.py
index a638371d..f56a7461 100644
--- a/catalystwan/tests/templates/models/cisco_banner.py
+++ b/catalystwan/tests/templates/models/cisco_banner.py
@@ -2,6 +2,6 @@
from catalystwan.api.templates.models.cisco_banner_model import CiscoBannerModel
-cisco_banner = CiscoBannerModel( # type: ignore
- template_name="cisco_banner", template_description="na", login_banner="login banner", motd_banner="motd_bnanner"
+banner_model = CiscoBannerModel( # type: ignore
+ template_name="banner_1", template_description="na", login_banner="login banner", motd_banner="motd_bnanner"
)
diff --git a/catalystwan/tests/templates/models/cisco_bfd.py b/catalystwan/tests/templates/models/cisco_bfd.py
index 65a125c0..0c57d7a6 100644
--- a/catalystwan/tests/templates/models/cisco_bfd.py
+++ b/catalystwan/tests/templates/models/cisco_bfd.py
@@ -1,15 +1,17 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
-from catalystwan.api.templates.models.cisco_bfd_model import CiscoBFDModel, Color
+from catalystwan.api.templates.models.cisco_bfd_model import CiscoBFDModel, Color, ColorType
-cisco_bfd = CiscoBFDModel( # type: ignore
+bfd_model = CiscoBFDModel( # type: ignore
template_name="cisco_bfd",
template_description="na",
multiplier=100,
poll_interval=50,
default_dscp=50,
color=[
- Color(color="biz-internet", hello_interval=50, multipler=100, pmtu_discovery=False, dscp=100), # type: ignore
- Color(color="silver", hello_interval=150, multipler=10, dscp=20), # type: ignore
+ Color( # type: ignore
+ color=ColorType.BIZ_INTERNET, hello_interval=50, multipler=100, pmtu_discovery=False, dscp=100
+ ),
+ Color(color=ColorType.SILVER, hello_interval=150, multipler=10, dscp=20), # type: ignore
],
)
diff --git a/catalystwan/tests/templates/models/cisco_logging.py b/catalystwan/tests/templates/models/cisco_logging.py
deleted file mode 100644
index 52fc76de..00000000
--- a/catalystwan/tests/templates/models/cisco_logging.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from catalystwan.api.templates.models.cisco_logging_model import CiscoLoggingModel, Ipv6Server, Server, TlsProfile
-
-cisco_logging_complex = CiscoLoggingModel(
- template_name="cisco_logging_complex",
- template_description="cisco_logging_complex",
- enable=True,
- size=20,
- rotate=5,
- tls_profile=[
- TlsProfile(
- profile="default_tls_profile",
- version="TLSv1.2",
- auth_type="Server",
- ciphersuite_list=["ECDHE-ECDSA-AES256-GCM-SHA384", "ECDHE-RSA-AES256-GCM-SHA384"],
- ),
- TlsProfile(
- profile="secure_tls_profile",
- version="TLSv1.2",
- auth_type="Mutual",
- ciphersuite_list=["ECDHE-ECDSA-CHACHA20-POLY1305", "ECDHE-RSA-CHACHA20-POLY1305"],
- ),
- ],
- server=[
- Server(
- name="1.1.1.1",
- vpn=10,
- source_interface="GigabitEthernet0/0",
- priority="debugging",
- enable_tls=True,
- custom_profile=True,
- profile="default_tls_profile",
- ),
- Server(
- name="log_server_2",
- vpn=20,
- source_interface="GigabitEthernet0/1",
- priority="error",
- enable_tls=False,
- custom_profile=False,
- profile=None,
- ),
- ],
- ipv6_server=[
- Ipv6Server(
- name="ipv6_log_server_1",
- vpn=10,
- source_interface="GigabitEthernet0/2",
- priority="critical",
- enable_tls=True,
- custom_profile=True,
- profile="secure_tls_profile",
- ),
- Ipv6Server(
- name="ipv6_log_server_2",
- vpn=30,
- source_interface="GigabitEthernet0/3",
- priority="emergency",
- enable_tls=False,
- custom_profile=False,
- profile=None,
- ),
- ],
-)
diff --git a/catalystwan/tests/templates/models/cisco_ntp.py b/catalystwan/tests/templates/models/cisco_ntp.py
deleted file mode 100644
index d62e196a..00000000
--- a/catalystwan/tests/templates/models/cisco_ntp.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from catalystwan.api.templates.models.cisco_ntp_model import Authentication, CiscoNTPModel, Server
-
-cisco_ntp_complex = CiscoNTPModel(
- template_name="cisco_ntp_complex",
- template_description="cisco_ntp_complex",
- server=[
- Server(name="0.pool.ntp.org", key=1, vpn=10, version=4, source_interface="GigabitEthernet0/0", prefer=True),
- Server(name="1.pool.ntp.org", key=2, vpn=20, version=4, source_interface="GigabitEthernet0/1", prefer=False),
- ],
- authentication=[Authentication(number=1, md5="md5key1"), Authentication(number=2, md5="md5key2")],
- trusted=[1, 2],
- enable=True,
- stratum=2,
- source="Loopback0",
-)
diff --git a/catalystwan/tests/templates/models/cisco_omp.py b/catalystwan/tests/templates/models/cisco_omp.py
deleted file mode 100644
index 6dfd0b35..00000000
--- a/catalystwan/tests/templates/models/cisco_omp.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from catalystwan.api.templates.models.cisco_omp_model import CiscoOMPModel, IPv4Advertise, IPv6Advertise
-
-cisco_omp_complex = CiscoOMPModel(
- template_name="cisco_omp_complex",
- template_description="cisco_omp_complex",
- graceful_restart=True,
- overlay_as=65000,
- send_path_limit=10,
- ecmp_limit=8,
- shutdown=False,
- omp_admin_distance_ipv4=110,
- omp_admin_distance_ipv6=115,
- advertisement_interval=30,
- graceful_restart_timer=120,
- eor_timer=300,
- holdtime=180,
- advertise=[
- IPv4Advertise(protocol="bgp", route="external"),
- IPv4Advertise(protocol="ospf", route=None),
- IPv4Advertise(protocol="connected", route=None),
- IPv4Advertise(protocol="static", route=None),
- IPv4Advertise(protocol="eigrp", route=None),
- IPv4Advertise(protocol="lisp", route=None),
- ],
- ipv6_advertise=[
- IPv6Advertise(protocol="bgp"),
- IPv6Advertise(protocol="ospf"),
- IPv6Advertise(protocol="connected"),
- IPv6Advertise(protocol="static"),
- ],
- ignore_region_path_length=True,
- transport_gateway="prefer",
- site_types=["type-1", "type-2", "cloud", "branch", "spoke"],
- auto_translate=True,
-)
diff --git a/catalystwan/tests/templates/models/cisco_ospf.py b/catalystwan/tests/templates/models/cisco_ospf.py
deleted file mode 100644
index 67d7b104..00000000
--- a/catalystwan/tests/templates/models/cisco_ospf.py
+++ /dev/null
@@ -1,59 +0,0 @@
-from ipaddress import IPv4Interface
-
-from catalystwan.api.templates.models.cisco_ospf import (
- Area,
- CiscoOSPFModel,
- Interface,
- Range,
- Redistribute,
- RoutePolicy,
- RouterLsa,
-)
-
-cisco_ospf_complex = CiscoOSPFModel(
- template_name="cisco_ospf_complex",
- template_description="cisco_ospf_complex",
- device_models=["vedge-C8000V"],
- router_id="1.1.1.1",
- reference_bandwidth=10000,
- rfc1583=False,
- originate=True,
- always=True,
- metric=10,
- metric_type="type1",
- external=20,
- inter_area=30,
- intra_area=40,
- delay=5,
- initial_hold=10,
- max_hold=40,
- redistribute=[
- Redistribute(protocol="static", route_policy="static_policy", dia=True),
- Redistribute(protocol="bgp", route_policy="bgp_to_ospf_policy", dia=False),
- ],
- router_lsa=[RouterLsa(ad_type="administrative", time=10)],
- route_policy=[RoutePolicy(direction="in", pol_name="ospf_in_policy")],
- area=[
- Area(
- a_num=0,
- stub=False,
- nssa=True,
- interface=[
- Interface(
- name="GigabitEthernet0/0",
- hello_interval=10,
- dead_interval=40,
- retransmit_interval=5,
- cost=1,
- priority=1,
- network="broadcast",
- passive_interface=False,
- type="simple",
- message_digest_key=1,
- md5="md5keystring",
- )
- ],
- range=[Range(address=IPv4Interface("192.168.1.0/24"), cost=100, no_advertise=True)],
- )
- ],
-)
diff --git a/catalystwan/tests/templates/models/cisco_secure_internet_gateway.py b/catalystwan/tests/templates/models/cisco_secure_internet_gateway.py
deleted file mode 100644
index 32d622eb..00000000
--- a/catalystwan/tests/templates/models/cisco_secure_internet_gateway.py
+++ /dev/null
@@ -1,94 +0,0 @@
-from ipaddress import IPv4Address, IPv4Interface
-
-from catalystwan.api.templates.models.cisco_secure_internet_gateway import (
- CiscoSecureInternetGatewayModel,
- Interface,
- InterfacePair,
- Service,
- Tracker,
-)
-
-cisco_sig = CiscoSecureInternetGatewayModel(
- template_name="cisco_sig",
- template_description="Comprehensive CiscoSecureInternetGateway Configuration",
- vpn_id=10,
- child_org_id="example_org",
- interface=[
- Interface(
- if_name="GigabitEthernet0/0",
- auto=True,
- shutdown=False,
- description="Main interface for SIG",
- unnumbered=False,
- address=IPv4Interface("192.168.1.1/24"),
- tunnel_source=IPv4Address("192.168.1.1"),
- tunnel_source_interface="Loopback0",
- tunnel_route_via="192.168.2.1",
- tunnel_destination="203.0.113.1",
- application="sig",
- tunnel_set="secure-internet-gateway-umbrella",
- tunnel_dc_preference="primary-dc",
- tcp_mss_adjust=1400,
- mtu=1400,
- dpd_interval=30,
- dpd_retries=3,
- ike_version=2,
- pre_shared_secret="MyPreSharedSecret", # pragma: allowlist secret
- ike_rekey_interval=3600,
- ike_ciphersuite="aes256-cbc-sha1",
- ike_group="14",
- pre_shared_key_dynamic=False,
- ike_local_id="local-id",
- ike_remote_id="remote-id",
- ipsec_rekey_interval=3600,
- ipsec_replay_window=32,
- ipsec_ciphersuite="aes256-gcm",
- perfect_forward_secrecy="group-14",
- tracker=True,
- track_enable=True,
- )
- ],
- service=[
- Service(
- svc_type="sig",
- interface_pair=[
- InterfacePair(
- active_interface="GigabitEthernet0/0",
- active_interface_weight=10,
- backup_interface="GigabitEthernet0/1",
- backup_interface_weight=5,
- )
- ],
- auth_required=True,
- xff_forward_enabled=True,
- ofw_enabled=False,
- ips_control=True,
- caution_enabled=False,
- primary_data_center="Auto",
- secondary_data_center="Auto",
- ip=True,
- idle_time=30,
- display_time_unit="MINUTE",
- ip_enforced_for_known_browsers=True,
- refresh_time=5,
- refresh_time_unit="MINUTE",
- enabled=True,
- block_internet_until_accepted=False,
- force_ssl_inspection=True,
- timeout=60,
- data_center_primary="Auto",
- data_center_secondary="Auto",
- )
- ],
- tracker_src_ip=IPv4Interface("192.0.2.1/32"),
- tracker=[
- Tracker(
- name="health-check-tracker",
- endpoint_api_url="https://api.example.com/health",
- threshold=5,
- interval=60,
- multiplier=2,
- tracker_type="SIG",
- )
- ],
-)
diff --git a/catalystwan/tests/templates/models/cisco_snmp.py b/catalystwan/tests/templates/models/cisco_snmp.py
deleted file mode 100644
index 3cf0bac2..00000000
--- a/catalystwan/tests/templates/models/cisco_snmp.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from catalystwan.api.templates.models.cisco_snmp_model import CiscoSNMPModel, Community, Group, Oid, Target, User, View
-
-cisco_snmp_complex = CiscoSNMPModel(
- template_name="cisco_snmp_complex",
- template_description="Comprehensive Cisco SNMP Configuration",
- shutdown=False,
- contact="SNMP Admin",
- location="Data Center A",
- view=[
- View(name="SystemView", oid=[Oid(id="1.3.6.1.2.1.1", exclude=False), Oid(id="1.3.6.1.2.1.2", exclude=True)]),
- View(name="AllView", oid=[Oid(id="1.3.6.1", exclude=False)]),
- ],
- community=[
- Community(name="public", view="SystemView", authorization="read-only"),
- Community(name="private", view="AllView", authorization="read-only"),
- ],
- group=[Group(name="v3group", security_level="auth-priv", view="AllView")],
- user=[
- User(
- name="snmpuser",
- auth="md5",
- auth_password="authpass", # pragma: allowlist secret
- priv="aes-cfb-128",
- priv_password="privpass", # pragma: allowlist secret
- group="v3group",
- )
- ],
- target=[
- Target(
- vpn_id=10,
- ip="192.0.2.50",
- port=162,
- community_name="public",
- user="snmpuser",
- source_interface="GigabitEthernet0/0",
- )
- ],
-)
diff --git a/catalystwan/tests/templates/models/cisco_system.py b/catalystwan/tests/templates/models/cisco_system.py
index caec52b3..059b623d 100644
--- a/catalystwan/tests/templates/models/cisco_system.py
+++ b/catalystwan/tests/templates/models/cisco_system.py
@@ -1,113 +1,8 @@
# Copyright 2023 Cisco Systems, Inc. and its affiliates
-from catalystwan.api.templates.models.cisco_system import (
- AffinityPerVrf,
- CiscoSystemModel,
- DeviceVariable,
- MobileNumber,
- Object,
- ObjectTrack,
- Tracker,
- Vrf,
-)
+from catalystwan.api.templates.models.cisco_system import CiscoSystemModel
+from catalystwan.utils.device_model import DeviceModel
default_cisco_system = CiscoSystemModel(
- template_name="default_cisco_system", template_description="default", device_models=["vedge-C8000V"]
+ name="default_cisco_system", description="default", device_models=[DeviceModel.VEDGE_C8000V]
) # type: ignore
-
-cisco_system_complex = CiscoSystemModel(
- template_name="cisco_system_complex",
- template_description="cisco_system_complex",
- timezone="UTC",
- description="Example desc",
- hostname=DeviceVariable(name="sdwan-hostname"),
- location="Data Center A",
- latitude=37.7749,
- longitude=-122.4194,
- range=10,
- enable_fencing=True,
- mobile_number=[MobileNumber(number="+12345678901"), MobileNumber(number="+10987654321")],
- enable_sms=True,
- device_groups=["group1", "group2"],
- controller_group_list=[1, 3],
- system_ip=DeviceVariable(name="192.0.2.1"),
- overlay_id=1,
- site_id=1001,
- site_type=["branch", "spoke"],
- port_offset=1000,
- port_hop=True,
- control_session_pps=500,
- track_transport=True,
- track_interface_tag=1,
- console_baud_rate="9600",
- max_omp_sessions=50,
- multi_tenant=False,
- track_default_gateway=False,
- admin_tech_on_failure=True,
- enable_tunnel=True,
- idle_timeout=300,
- on_demand_idle_timeout_min=60,
- tracker=[
- Tracker(
- name="tracker1",
- endpoint_ip="203.0.113.1",
- endpoint_ip_transport_port="8080",
- protocol="tcp",
- port=443,
- endpoint_dns_name=None,
- endpoint_api_url=None,
- elements=["element1, element2"],
- boolean="and",
- threshold=10,
- interval=30,
- multiplier=3,
- type="static-route",
- )
- ],
- object_track=[
- ObjectTrack(
- object_number=10,
- interface="GigabitEthernet0/0/0",
- sig="100",
- ip="192.0.2.1",
- mask="255.255.255.0",
- vpn=1,
- object=[Object(number=101)],
- boolean="and",
- ),
- ObjectTrack(
- object_number=20,
- interface="GigabitEthernet0/0/0",
- sig="100",
- ip="192.0.2.1",
- mask="255.255.255.0",
- vpn=1,
- object=[Object(number=101)],
- boolean="and",
- ),
- ObjectTrack(
- object_number=30,
- interface="GigabitEthernet0/0/1",
- sig="200",
- ip="198.51.100.1",
- mask="255.255.255.0",
- vpn=2,
- object=[Object(number=201)],
- boolean="or",
- ),
- ],
- region_id=None,
- secondary_region=None,
- role="edge-router",
- affinity_group_number=1,
- preference=[1],
- preference_auto=True,
- affinity_per_vrf=[AffinityPerVrf(affinity_group_number=1, vrf_range="22")],
- transport_gateway=True,
- enable_mrf_migration="enabled",
- migration_bgp_community=65535,
- enable_management_region=True,
- vrf=[Vrf(vrf_id=1, gateway_preference=[4, 5]), Vrf(vrf_id=2, gateway_preference=[12, 13])],
- management_gateway=None,
- epfr="conservative",
-)
diff --git a/catalystwan/tests/templates/models/cisco_vpn.py b/catalystwan/tests/templates/models/cisco_vpn.py
index 458da409..64f59a3d 100644
--- a/catalystwan/tests/templates/models/cisco_vpn.py
+++ b/catalystwan/tests/templates/models/cisco_vpn.py
@@ -4,65 +4,88 @@
from catalystwan.api.templates.models.cisco_vpn_model import (
Advertise,
+ AdvertiseProtocol,
+ AdvertiseProtocolSubType,
CiscoVPNModel,
+ Direction,
Dns,
DnsIpv6,
GreRoute,
Host,
IpsecRoute,
Ipv6Advertise,
+ Ipv6AdvertiseProtocol,
+ Ipv6AdvertiseProtocolSubType,
+ LeakFromGlobalProtocol,
+ Nat,
Natpool,
NextHop,
NextHopv6,
+ Overload,
Pool,
PortForward,
PrefixList,
+ Proto,
+ Region,
+ Role,
RouteExport,
+ RouteExportProtocol,
+ RouteExportProtocolSubType,
RouteExportRedistribute,
+ RouteExportRedistributeProtocol,
RouteImport,
RouteImportFrom,
+ RouteImportFromProtocol,
+ RouteImportFromProtocolSubType,
RouteImportFromRedistribute,
+ RouteImportFromRedistributeProtocol,
+ RouteImportProtocol,
+ RouteImportProtocolSubType,
RouteImportRedistribute,
+ RouteImportRedistributeProtocol,
Routev4,
Routev6,
Service,
ServiceRoute,
Static,
+ StaticNatDirection,
SubnetStatic,
+ SvcType,
)
+from catalystwan.utils.device_model import DeviceModel
-cisco_vpn_basic = CiscoVPNModel(
- template_name="cisco_vpn_basic", template_description="Primitive", device_models=["vedge-C8000V"]
+basic_cisco_vpn = CiscoVPNModel(
+ template_name="Basic_Cisco_VPN_Model", template_description="Primitive", device_models=[DeviceModel.VEDGE_C8000V]
) # type: ignore
-cisco_vpn_complex = CiscoVPNModel(
- template_name="cisco_vpn_complex",
- template_description="cisco_vpn_complex",
- device_models=["vedge-cloud"],
+complex_vpn_model = CiscoVPNModel(
+ template_name="complex_cisco_vpn",
+ template_description="NA",
+ device_models=[DeviceModel.VEDGE],
vpn_name="test_vpn_name",
omp_admin_distance_ipv4=10,
omp_admin_distance_ipv6=100,
route_v4=[Routev4(prefix="prefixv4", next_hop=[NextHop(address="1.1.1.1")])],
- route_v6=[Routev6(prefix="prefixv6", next_hop=[NextHopv6(address="2.2.2.2")], nat="NAT64")],
- dns=[Dns(dns_addr="1.1.1.1"), Dns(dns_addr="2.2.2.2", role="secondary")],
+ route_v6=[Routev6(prefix="prefixv6", next_hop=[NextHopv6(address="2.2.2.2")], nat=Nat.NAT64)],
+ dns=[Dns(dns_addr="1.1.1.1"), Dns(dns_addr="2.2.2.2", role=Role.SECONDARY)],
dns_ipv6=[DnsIpv6(dns_addr="30a8:b25e:3db5:fe9f:231f:7478:4181:9234")],
host=[Host(hostname="test_hostname", ip=["1.1.1.1"])],
service=[
Service(
- svc_type="appqoe",
+ svc_type=SvcType.APPQOE,
address=["1.1.1.1"],
interface="Gig0/0/1",
track_enable=False,
),
Service(
- svc_type="FW",
+ svc_type=SvcType.FW,
address=["1.1.122.1", "2.2.2.2"],
interface="Gig0/0/2",
track_enable=True,
),
Service(
- svc_type="IDP",
+ svc_type=SvcType.IDP,
address=["1.1.122.2", "3.2.2.2"],
interface="Gig0/0/3",
track_enable=False,
@@ -82,40 +105,40 @@
],
advertise=[
Advertise(
- protocol="aggregate",
+ protocol=AdvertiseProtocol.AGGREGATE,
route_policy="route-policy",
- protocol_sub_type=["external"],
+ protocol_sub_type=[AdvertiseProtocolSubType.EXTERNAL],
prefix_list=[
PrefixList(
prefix_entry="prefix_entry",
aggregate_only=True,
- region="access",
+ region=Region.ACCESS,
)
],
)
],
ipv6_advertise=[
Ipv6Advertise(
- protocol="aggregate",
+ protocol=Ipv6AdvertiseProtocol.AGGREGATE,
route_policy="route-policyv6",
- protocol_sub_type=["external"],
+ protocol_sub_type=[Ipv6AdvertiseProtocolSubType.EXTERNAL],
prefix_list=[
PrefixList(
prefix_entry="prefix_entryv6",
aggregate_only=False,
- region="core",
+ region=Region.CORE,
)
],
),
Ipv6Advertise(
- protocol="connected",
+ protocol=Ipv6AdvertiseProtocol.CONNECTED,
route_policy="route-policyv6-connected",
- protocol_sub_type=["external"],
+ protocol_sub_type=[Ipv6AdvertiseProtocolSubType.EXTERNAL],
prefix_list=[
PrefixList(
prefix_entry="prefix_entryv6-connected",
aggregate_only=True,
- region="access",
+ region=Region.ACCESS,
)
],
),
@@ -127,7 +150,7 @@
end_address="10.10.10.10",
overload=False,
leak_from_global=True,
- leak_from_global_protocol="connected",
+ leak_from_global_protocol=LeakFromGlobalProtocol.CONNECTED,
leak_to_global=False,
)
],
@@ -137,25 +160,32 @@
prefix_length=24,
range_start="10",
range_end="100",
- overload="false",
- direction="inside",
+ overload=Overload.FALSE,
+ direction=Direction.INSIDE,
tracker_id=10,
),
- Natpool(name=2, prefix_length=24, range_start="10", range_end="100", overload="true", direction="outside"),
+ Natpool(
+ name=2,
+ prefix_length=24,
+ range_start="10",
+ range_end="100",
+ overload=Overload.TRUE,
+ direction=Direction.OUTSIDE,
+ ),
],
static=[
Static(
pool_name=1,
source_ip="1.1.1.1",
translate_ip="1.1.1.2",
- static_nat_direction="inside",
+ static_nat_direction=StaticNatDirection.INSIDE,
tracker_id=1,
),
Static(
pool_name=2,
source_ip="2.1.1.1",
translate_ip="2.1.1.2",
- static_nat_direction="inside",
+ static_nat_direction=StaticNatDirection.OUTSIDE,
),
],
subnet_static=[
@@ -163,13 +193,13 @@
source_ip_subnet="1.1.1.1",
translate_ip_subnet="2.2.2.2",
prefix_length=24,
- static_nat_direction="outside",
+ static_nat_direction=StaticNatDirection.OUTSIDE,
),
SubnetStatic(
source_ip_subnet="1.1.2.1",
translate_ip_subnet="2.3.2.2",
prefix_length=24,
- static_nat_direction="inside",
+ static_nat_direction=StaticNatDirection.INSIDE,
tracker_id=10,
),
],
@@ -180,7 +210,7 @@
translate_port=2000,
source_ip="1.1.1.1",
translate_ip="2.2.2.2",
- proto="tcp",
+ proto=Proto.TCP,
),
PortForward(
pool_name=2,
@@ -188,17 +218,17 @@
translate_port=2000,
source_ip="1.1.4.1",
translate_ip="2.2.3.2",
- proto="udp",
+ proto=Proto.UDP,
),
],
route_import=[
RouteImport(
- protocol="bgp",
- protocol_sub_type=["external"],
+ protocol=RouteImportProtocol.BGP,
+ protocol_sub_type=[RouteImportProtocolSubType.EXTERNAL],
route_policy="test_route_policy",
redistribute=[
RouteImportRedistribute(
- protocol="eigrp",
+ protocol=RouteImportRedistributeProtocol.EIGRP,
route_policy="test_route_policy",
)
],
@@ -207,19 +237,19 @@
route_import_from=[
RouteImportFrom(
source_vpn=1,
- protocol="connected",
- protocol_sub_type=["external"],
+ protocol=RouteImportFromProtocol.CONNECTED,
+ protocol_sub_type=[RouteImportFromProtocolSubType.EXTERNAL],
route_policy="test_route_policy",
- redistribute=[RouteImportFromRedistribute(protocol="bgp")],
+ redistribute=[RouteImportFromRedistribute(protocol=RouteImportFromRedistributeProtocol.BGP)],
),
RouteImportFrom(
source_vpn=100,
- protocol="bgp",
- protocol_sub_type=["external"],
+ protocol=RouteImportFromProtocol.BGP,
+ protocol_sub_type=[RouteImportFromProtocolSubType.EXTERNAL],
route_policy="test_route_policy",
redistribute=[
RouteImportFromRedistribute(
- protocol="eigrp",
+ protocol=RouteImportFromRedistributeProtocol.EIGRP,
route_policy="test_route_policy",
)
],
@@ -227,11 +257,11 @@
],
route_export=[
RouteExport(
- protocol="static",
- protocol_sub_type=["external"],
+ protocol=RouteExportProtocol.STATIC,
+ protocol_sub_type=[RouteExportProtocolSubType.EXTERNAL],
redistribute=[
RouteExportRedistribute(
- protocol="ospf",
+ protocol=RouteExportRedistributeProtocol.OSPF,
route_policy="test_route_policy",
)
],
diff --git a/catalystwan/tests/templates/models/cisco_vpn_interface.py b/catalystwan/tests/templates/models/cisco_vpn_interface.py
deleted file mode 100644
index 91d13d7e..00000000
--- a/catalystwan/tests/templates/models/cisco_vpn_interface.py
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from ipaddress import IPv4Address, IPv4Interface, IPv6Address, IPv6Interface
-
-from catalystwan.api.templates.models.cisco_vpn_interface_model import (
- AccessList,
- CiscoVpnInterfaceModel,
- DhcpHelperV6,
- Encapsulation,
- Ip,
- Ipv4Secondary,
- Ipv6,
- Ipv6Vrrp,
- SecondaryIPv4Address,
- SecondaryIPv6Address,
- Static,
- StaticNat66,
- StaticPortForward,
- TrackingObject,
- Vrrp,
-)
-
-cisco_vpn_interface_complex = CiscoVpnInterfaceModel(
- template_name="cisco_vpn_interface_complex",
- template_description="cisco_vpn_interface_complex",
- if_name="GigabitEthernet0/0",
- interface_description="WAN interface",
- poe=True,
- ipv4_address="192.0.2.1/24",
- secondary_ipv4_address=[
- SecondaryIPv4Address(address=IPv4Interface("192.0.2.2/24")),
- SecondaryIPv4Address(address=IPv4Interface("192.0.2.3/24")),
- ],
- dhcp_ipv4_client=False,
- dhcp_distance=1,
- ipv6_address=IPv6Interface("2001:db8::1/64"),
- dhcp_ipv6_client=True,
- secondary_ipv6_address=[
- SecondaryIPv6Address(address=IPv6Interface("2001:db8::2/64")),
- SecondaryIPv6Address(address=IPv6Interface("2001:db8::3/64")),
- ],
- access_list_ipv4=[
- AccessList(direction="in", acl_name="ACL-INBOUND"),
- AccessList(direction="out", acl_name="ACL-OUTBOUND"),
- ],
- dhcp_helper=[IPv4Address("192.0.2.254")],
- dhcp_helper_v6=[DhcpHelperV6(address=IPv6Address("2001:db8::1"), vpn=0)],
- tracker=["Tracker1", "Tracker2"],
- auto_bandwidth_detect=True,
- iperf_server=IPv4Address("192.0.2.100"),
- nat=True,
- nat_choice="Interface",
- udp_timeout=30,
- tcp_timeout=60,
- nat_range_start=IPv4Address("192.0.2.100"),
- nat_range_end=IPv4Address("192.0.2.200"),
- overload=True,
- loopback_interface="Loopback0",
- prefix_length=24,
- enable=None,
- nat64=False,
- nat66=False,
- static_nat66=[
- StaticNat66(
- source_prefix=IPv6Interface("2001:db8:1234::/64"),
- translated_source_prefix="2001:db8:5678::/64",
- source_vpn_id=10,
- )
- ],
- static=[
- Static(
- source_ip=IPv4Address("192.0.2.1"),
- translate_ip=IPv4Address("203.0.113.1"),
- static_nat_direction="inside",
- source_vpn=10,
- )
- ],
- static_port_forward=[
- StaticPortForward(
- source_ip=IPv4Address("192.0.2.2"),
- translate_ip=IPv4Address("203.0.113.2"),
- static_nat_direction="outside",
- source_port=8080,
- translate_port=9090,
- proto="tcp",
- source_vpn=10,
- )
- ],
- enable_core_region=True,
- core_region="core",
- secondary_region="secondary-only",
- tloc_encapsulation=[Encapsulation(encap="ipsec", preference=100, weight=1)],
- border=True,
- per_tunnel_qos=True,
- per_tunnel_qos_aggregator=True,
- mode="hub",
- tunnels_bandwidth=1000,
- group=[1, 2],
- value="mpls",
- max_control_connections=5,
- control_connections=True,
- vbond_as_stun_server=True,
- exclude_controller_group_list=[3, 4],
- vmanage_connection_preference=100,
- port_hop=True,
- restrict=False,
- dst_ip=IPv4Address("198.51.100.14"),
- carrier="carrier1",
- nat_refresh_interval=30,
- hello_interval=10,
- hello_tolerance=30,
- bind="GigabitEthernet0/0",
- last_resort_circuit=False,
- low_bandwidth_link=False,
- tunnel_tcp_mss_adjust=1360,
- clear_dont_fragment=True,
- propagate_sgt=False,
- network_broadcast=True,
- all=False,
- bgp=True,
- dhcp=False,
- dns=True,
- icmp=True,
- sshd=True,
- netconf=False,
- ntp=True,
- ospf=False,
- stun=False,
- snmp=True,
- https=True,
- media_type="rj45",
- intrf_mtu=1500,
- mtu=1400,
- tcp_mss_adjust=1360,
- tloc_extension="100",
- load_interval=300,
- src_ip=IPv4Address("198.51.100.1"),
- xconnect="10",
- mac_address="00:0C:29:4B:55:3A",
- speed="1000",
- duplex="full",
- shutdown=False,
- arp_timeout=1200,
- autonegotiate=True,
- ip_directed_broadcast=False,
- icmp_redirect_disable=True,
- qos_adaptive=True,
- period=60,
- bandwidth_down=10000,
- dmin=5000,
- dmax=15000,
- bandwidth_up=5000,
- umin=2500,
- umax=7500,
- shaping_rate=5000,
- qos_map="default_qos_map",
- qos_map_vpn="vpn_qos_map",
- service_provider="ISP1",
- bandwidth_upstream=5000,
- bandwidth_downstream=10000,
- block_non_source_ip=True,
- rule_name="rewrite_rule_1",
- access_list_ipv6=[AccessList(direction="in", acl_name="ipv6_acl_1")],
- ip=[Ip(addr=IPv4Address("192.0.2.1"), mac="00:0C:29:4B:55:3A")],
- vrrp=[
- Vrrp(
- grp_id=1,
- priority=110,
- timer=100,
- track_omp=True,
- track_prefix_list="TRACKING_LIST",
- address=IPv4Address("192.0.2.254"),
- ipv4_secondary=[Ipv4Secondary(address=IPv4Address("192.0.2.253"))],
- tloc_change_pref=True,
- value=20,
- tracking_object=[TrackingObject(name=10, track_action="Decrement", decrement=20)],
- )
- ],
- ipv6_vrrp=[
- Ipv6Vrrp(
- grp_id=1,
- priority=110,
- timer=100,
- track_omp=True,
- track_prefix_list="TRACKING_LIST_IPV6",
- ipv6=[
- Ipv6(
- ipv6_link_local=IPv6Address("fe80::1"),
- prefix=IPv6Interface("2001:db8::/64"),
- )
- ],
- )
- ],
- enable_sgt_propagation=True,
- security_group_tag=0,
- trusted=True,
- enable_sgt_authorization_and_forwarding=True,
- enable_sgt_enforcement=True,
- enforcement_sgt=10001,
-)
diff --git a/catalystwan/tests/templates/models/omp_vsmart.py b/catalystwan/tests/templates/models/omp_vsmart.py
index ba1046d7..464b40ee 100644
--- a/catalystwan/tests/templates/models/omp_vsmart.py
+++ b/catalystwan/tests/templates/models/omp_vsmart.py
@@ -3,28 +3,25 @@
# type: ignore
from catalystwan.api.templates.device_variable import DeviceVariable
from catalystwan.api.templates.models.omp_vsmart_model import OMPvSmart
+from catalystwan.utils.device_model import DeviceModel
-omp_vsmart_1 = OMPvSmart(
- template_name="omp_vsmart_1",
- template_description="default",
- device_models=["vedge-C8000V"],
-)
+default_omp = OMPvSmart(template_name="omp_1", template_description="default", device_models=[DeviceModel.VEDGE_C8000V])
-omp_vsmart_2 = OMPvSmart(
- template_name="omp_vsmart_2",
+omp_2 = OMPvSmart(
+ template_name="omp_2",
template_description="some changes",
- device_models=["vedge-C8000V"],
+ device_models=[DeviceModel.VEDGE_C8000V],
graceful_restart=False,
send_backup_paths=False,
shutdown=True,
holdtime=30,
)
-omp_vsmart_3 = OMPvSmart(
- template_name="omp_vsmart_3",
+omp_3 = OMPvSmart(
+ template_name="omp_3",
template_description="advanced",
- device_models=["vedge-C8000V"],
+ device_models=[DeviceModel.VEDGE_C8000V],
graceful_restart=False,
graceful_restart_timer=DeviceVariable(name="omp_graceful_restart_timer"),
send_path_limit=DeviceVariable(name="omp_send_path_limit"),
@@ -34,20 +31,3 @@
advertisement_interval=3,
holdtime=30,
)
-
-omp_vsmart_complex = OMPvSmart(
- template_name="omp_vsmart_complex",
- template_description="Apply OMP settings for vSmart controller",
- device_models=["vsmart"],
- graceful_restart=True,
- send_path_limit=100,
- send_backup_paths=True,
- discard_rejected=False,
- shutdown=False,
- graceful_restart_timer=120,
- eor_timer=50,
- holdtime=300,
- affinity_group_preference=True,
- advertisement_interval=30,
- tloc_color=True,
-)
diff --git a/catalystwan/tests/templates/models/security_vsmart.py b/catalystwan/tests/templates/models/security_vsmart.py
deleted file mode 100644
index 013ab69b..00000000
--- a/catalystwan/tests/templates/models/security_vsmart.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from catalystwan.api.templates.models.security_vsmart_model import SecurityvSmart
-
-security_vsmart_complex = SecurityvSmart(
- template_name="security_vsmart_complex",
- template_description="Apply Security settings for vSmart controller",
- device_models=["vsmart"],
- protocol="dtls",
- tls_port=120,
-)
diff --git a/catalystwan/tests/templates/models/system_vsmart.py b/catalystwan/tests/templates/models/system_vsmart.py
deleted file mode 100644
index 496a817c..00000000
--- a/catalystwan/tests/templates/models/system_vsmart.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from catalystwan.api.templates.device_variable import DeviceVariable
-from catalystwan.api.templates.models.system_vsmart_model import SystemVsmart, TlocColorComparison
-
-system_vsmart_complex = SystemVsmart(
- template_name="system_vsmart_complex",
- template_description="Apply System settings for vSmart controller",
- device_models=["vsmart"],
- timezone="UTC",
- host_name=DeviceVariable(name="system_host_name"),
- location="Location",
- dual_stack_ipv6=True,
- description="Example description",
- latitude=37,
- longitude=-122,
- system_tunnel_mtu=1000,
- device_groups=["example1", "example2"],
- system_ip=DeviceVariable(name="system_system_ip"),
- site_id=DeviceVariable(name="system_site_id"),
- overlay_id=44,
- topology=["hub-and-spoke"],
- port_offset=5,
- port_hop=True,
- control_session_pps=999,
- controller_group_id=44,
- track_transport=True,
- track_default_gateway=True,
- iptables_enable=True,
- admin_tech_on_failure=True,
- idle_timeout=100,
- dns_cache_timeout=10,
- region_list_id=12,
- management_region=True,
- compatible=[TlocColorComparison(color_1="mpls", color_2="metro-ethernet")],
- incompatible=[TlocColorComparison(color_1="biz-internet", color_2="public-internet")],
-)
diff --git a/catalystwan/tests/templates/models/vpn_vsmart.py b/catalystwan/tests/templates/models/vpn_vsmart.py
deleted file mode 100644
index d1e5a62b..00000000
--- a/catalystwan/tests/templates/models/vpn_vsmart.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-# type: ignore
-
-from catalystwan.api.templates.models.vpn_vsmart_model import (
- Dns,
- Host,
- NextHop,
- NextHopv6,
- Routev4,
- Routev6,
- VpnVsmartModel,
-)
-
-vpn_vsmart_basic = VpnVsmartModel(
- template_name="vpn_vsmart_basic",
- template_description="Primitive",
- device_models=["vsmart"],
- vpn_id="0",
-)
-
-vpn_vsmart_complex = VpnVsmartModel(
- template_name="vpn_vsmart_complex",
- template_description="cvpn_vsmart_complex",
- device_models=["vsmart"],
- vpn_id="0",
- name="vpn_name_x",
- route_v4=[Routev4(prefix="prefixv4", next_hop=[NextHop(address="1.1.1.1")])],
- route_v6=[Routev6(prefix="prefixv6", next_hop=[NextHopv6(address="2.2.2.2")], nat="NAT64")],
- dns=[Dns(dns_addr="1.1.1.1", role="primary"), Dns(dns_addr="2.2.2.2", role="secondary")],
- host=[Host(hostname="test_hostname", ip=["1.1.1.1"])],
-)
diff --git a/catalystwan/tests/templates/models/vpn_vsmart_interface.py b/catalystwan/tests/templates/models/vpn_vsmart_interface.py
deleted file mode 100644
index 8b106f3c..00000000
--- a/catalystwan/tests/templates/models/vpn_vsmart_interface.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-import ipaddress
-
-from catalystwan.api.templates.models.vpn_vsmart_interface_model import Ip, VpnVsmartInterfaceModel
-
-vpn_vsmart_interface_complex = VpnVsmartInterfaceModel(
- template_name="vpn_vsmart_interface_complex",
- template_description="vpn_vsmart_interface_complex",
- device_models=["vsmart"],
- if_name="GigabitEthernet0/0/0",
- interface_description="WAN interface",
- ipv4_address="10.10.10.1",
- dhcp_ipv4_client=False,
- dhcp_distance=1,
- ipv6_address=ipaddress.IPv6Interface("2001:db8::1/64"),
- dhcp_ipv6_client=True,
- dhcp_ipv6_distance=1,
- dhcp_rapid_commit=True,
- group=[0, 1],
- value="blue",
- carrier="carrier1",
- nat_refresh_interval=30,
- hello_interval=10,
- hello_tolerance=30,
- all=True,
- dhcp=False,
- dns=True,
- icmp=True,
- sshd=True,
- netconf=False,
- ntp=True,
- stun=False,
- flow_control="ingress",
- clear_dont_fragment=True,
- autonegotiate=True,
- pmtu=False,
- mtu=1500,
- tcp_mss_adjust=1452,
- mac_address="00:1A:2B:3C:4D:5F",
- speed="1000",
- duplex="full",
- shutdown=False,
- ip=[
- Ip(addr=ipaddress.IPv4Address("192.168.1.1"), mac="00:1A:2B:3C:4D:5E"),
- ],
-)
-
-vpn_vsmart_interface_basic = VpnVsmartInterfaceModel(
- template_name="vpn_vsmart_interface_basic",
- template_description="vpn_vsmart_interface_basic",
- device_models=["vsmart"],
- if_name="any",
-)
diff --git a/catalystwan/tests/templates/schemas/aaa.json b/catalystwan/tests/templates/schemas/aaa.json
deleted file mode 100644
index 79e24d46..00000000
--- a/catalystwan/tests/templates/schemas/aaa.json
+++ /dev/null
@@ -1,1096 +0,0 @@
-
-{
- "name": "aaa",
- "xmlPath": [],
- "xmlRootTag": "system",
- "nameSpace": "http://viptela.com/system",
- "fields": [
- {
- "key": "auth-order",
- "description": "Authentication Order",
- "details": "Set order to try different authentication methods",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "local",
- "value": "Local"
- },
- {
- "key": "radius",
- "value": "Radius"
- },
- {
- "key": "tacacs",
- "value": "Tacacs"
- }
- ]
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "list"
- },
- {
- "key": "radius-servers",
- "description": "Radius Server List (Separated by commas)",
- "details": "Designate radius servers for authentication and accounting",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "list"
- },
- {
- "key": "auth-fallback",
- "description": "Authentication Fallback",
- "details": "Fall back if higher-priority authentication fails",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "object"
- },
- {
- "key": "admin-auth-order",
- "description": "Admin Authentication Order",
- "details": "Authenticate admin user as per auth-order",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "object"
- },
- {
- "key": "audit-disable",
- "description": "Disable Audit Logs",
- "details": "Disable audit logs",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "aaa",
- "logs"
- ],
- "objectType": "object"
- },
- {
- "key": "netconf-disable",
- "description": "Disable Netconf Logs",
- "details": "Disable Netconf logs",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "aaa",
- "logs"
- ],
- "objectType": "object"
- },
- {
- "key": "task",
- "description": "Task Permissions",
- "details": "Set the user group\u2019s tasks and task privileges",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "aaa"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Select the name for the task",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "accept",
- "description": "Accept",
- "details": "List of oper-exec commands to allow",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "oper-exec"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "command"
- ],
- "children": [
- {
- "key": "command",
- "description": "CLI",
- "details": "Define oper-exec accept command",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "deny",
- "description": "Deny",
- "details": "List of oper-exec commands to deny",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "oper-exec"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "command"
- ],
- "children": [
- {
- "key": "command",
- "description": "CLI",
- "details": "Define oper-exec deny command",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "default-action",
- "description": "Default action",
- "details": "Define oper-exec default action",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "accept",
- "value": "accept"
- },
- {
- "key": "deny",
- "value": "deny"
- }
- ]
- },
- "dataPath": [
- "oper-exec"
- ],
- "objectType": "object"
- },
- {
- "key": "accept",
- "description": "Accept",
- "details": "List of config commands to allow",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "config"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "command"
- ],
- "children": [
- {
- "key": "command",
- "description": "CLI",
- "details": "Define configure accept command",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "deny",
- "description": "Deny",
- "details": "List of config commands to deny",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "config"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "command"
- ],
- "children": [
- {
- "key": "command",
- "description": "CLI",
- "details": "Define config accept command",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "default-action",
- "description": "Default action",
- "details": "Define config default action",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "accept",
- "value": "accept"
- },
- {
- "key": "deny",
- "value": "deny"
- }
- ]
- },
- "dataPath": [
- "config"
- ],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "accounting",
- "description": "Enable/disable user accounting",
- "details": "Enable/disable user accounting",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "object"
- },
- {
- "key": "usergroup",
- "description": "User Group Configuration",
- "details": "Create groupings of users with the same authorization privileges",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "aaa"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Set name of user group",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "task",
- "description": "Task Permissions",
- "details": "Set the user group\u2019s tasks and task privileges",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "mode"
- ],
- "children": [
- {
- "key": "mode",
- "description": "Mode",
- "details": "Select the task to set privileges for",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "permission",
- "description": "Permissions",
- "details": "Set read or write permission for the task",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "read",
- "value": "read"
- },
- {
- "key": "write",
- "value": "write"
- }
- ]
- },
- "dataPath": [],
- "objectType": "list"
- }
- ]
- }
- ]
- },
- {
- "key": "user",
- "description": "User Configuration",
- "details": "Create local login account",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "aaa"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Set the username",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "password",
- "description": "Password",
- "details": "Set the user password",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "passphrase"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "secret",
- "description": "Password",
- "details": "Set the user scrypt password/hash",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "passphrase"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "description",
- "description": "Description",
- "details": "Add a description of the user",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "group",
- "description": "User Groups",
- "details": "Configure the groups that the user is part of",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "list"
- },
- {
- "key": "pubkey-chain",
- "description": "SSH pubkey",
- "details": "List of public-keys per user",
- "maxElements": 10,
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "usertag"
- ],
- "children": [
- {
- "key": "usertag",
- "description": "key-type",
- "details": "ssh key-type",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 64
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "key-string",
- "description": "key-string",
- "details": "Public-key to be copied from client",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 1024
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "key-type",
- "description": "key-type",
- "details": "ssh key-type",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32,
- "default": "ssh-rsa"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
- },
- {
- "key": "ciscotacro-user",
- "description": "Cisco Tac Enable Read only",
- "details": "Cisco Tac Enable Read only",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "object"
- },
- {
- "key": "ciscotacrw-user",
- "description": "Cisco Tac Enable Read and Write",
- "details": "Cisco Tac Enable Read and Write",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "aaa"
- ],
- "objectType": "object"
- },
- {
- "key": "timeout",
- "description": "Timeout",
- "details": "Configure how long to wait for replies from the TACACS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 1000,
- "default": 5
- },
- "dataPath": [
- "tacacs"
- ],
- "objectType": "object"
- },
- {
- "key": "authentication",
- "description": "Authentication",
- "details": "TACACS authentication type",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "ascii",
- "value": "ASCII"
- },
- {
- "key": "pap",
- "value": "PAP"
- }
- ],
- "default": "pap"
- },
- "dataPath": [
- "tacacs"
- ],
- "objectType": "object"
- },
- {
- "key": "server",
- "description": "Server",
- "details": "Configure the TACACS server",
- "maxElements": 8,
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "tacacs"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "Address",
- "details": "Set IP address of TACACS server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ip"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "auth-port",
- "description": "Authentication Port",
- "details": "Set port to use to connect to TACACS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65535,
- "default": 49
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN ID",
- "details": "Set VPN in which TACACS server is located",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-interface",
- "description": "Source Interface",
- "details": "Set interface to use to reach TACACS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "key",
- "description": "Key",
- "details": "Set the password to access the TACACS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object",
- "objectStatus": "deprecated"
- },
- {
- "key": "secret-key",
- "description": "Secret Key",
- "details": "Set the AES encrypted key to access the TACACS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "restrictedPassphrase",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Priority",
- "details": "TACACS server priority <0..7>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 7,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "timeout",
- "description": "Timeout",
- "details": "Configure how long to wait for replies from the RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 1000,
- "default": 5
- },
- "dataPath": [
- "radius"
- ],
- "objectType": "object"
- },
- {
- "key": "retransmit",
- "description": "Retransmit Count",
- "details": "Configure how many times to contact each RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 1000,
- "default": 3
- },
- "dataPath": [
- "radius"
- ],
- "objectType": "object"
- },
- {
- "key": "server",
- "description": "Server",
- "details": "Configure the RADIUS server",
- "maxElements": 8,
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "radius"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "Address",
- "details": "Set IP address of RADIUS server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ip"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tag",
- "description": "Tag",
- "details": "Reference tag/name for the server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 4,
- "maxLength": 16
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "auth-port",
- "description": "Authentication Port",
- "details": "Set port to use to connect to RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65535,
- "default": 1812
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "acct-port",
- "description": "Accounting Port",
- "details": "Set port to use to connect to RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65535,
- "default": 1813
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN ID",
- "details": "Set VPN in which RADIUS server is located",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-interface",
- "description": "Source Interface",
- "details": "Set interface to use to reach RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "key",
- "description": "Key",
- "details": "Set the password to access the RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object",
- "objectStatus": "deprecated"
- },
- {
- "key": "secret-key",
- "description": "Secret Key",
- "details": "Set the AES encrypted key to access the RADIUS server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "restrictedPassphrase",
- "ngth": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Priority",
- "details": "RADIUS server priority <0..7>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 7,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
-}
diff --git a/catalystwan/tests/templates/schemas/cedge_aaa.json b/catalystwan/tests/templates/schemas/cedge_aaa.json
index d02ef9cc..7ea9c25c 100644
--- a/catalystwan/tests/templates/schemas/cedge_aaa.json
+++ b/catalystwan/tests/templates/schemas/cedge_aaa.json
@@ -2,7 +2,7 @@
"name": "cedge_aaa",
"xmlPath": [],
"xmlRootTag": "aaa",
- "nameSpace": "http://viptela.com/cedge_aaa",
+ "nameSpace": "http: //viptela.com/cedge_aaa",
"fields": [
{
"key": "authentication_group",
diff --git a/catalystwan/tests/templates/schemas/cisco_logging.json b/catalystwan/tests/templates/schemas/cisco_logging.json
deleted file mode 100644
index 8e718cda..00000000
--- a/catalystwan/tests/templates/schemas/cisco_logging.json
+++ /dev/null
@@ -1,577 +0,0 @@
-{
- "name": "cisco_logging",
- "xmlPath": [
- "system"
- ],
- "xmlRootTag": "logging",
- "nameSpace": "http://viptela.com/system",
- "fields": [
- {
- "key": "enable",
- "description": "Enable Disk",
- "details": "Enable logging to local disk",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "disk"
- ],
- "objectType": "object"
- },
- {
- "key": "size",
- "description": "Maximum File Size (MB)",
- "details": "Set maximum size of file before it is rotated",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 20,
- "default": 10
- },
- "dataPath": [
- "disk",
- "file"
- ],
- "objectType": "object"
- },
- {
- "key": "rotate",
- "description": "Rotations",
- "details": "Set number of syslog files to create before discarding oldest files",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 10,
- "default": 10
- },
- "dataPath": [
- "disk",
- "file"
- ],
- "objectType": "object"
- },
- {
- "key": "tls-profile",
- "description": "Configure a TLS profile",
- "details": "Configure a TLS profile",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "profile"
- ],
- "children": [
- {
- "key": "profile",
- "description": "Profile Name",
- "details": "Specify the name of the TLS profile",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "version",
- "description": "TLS Version",
- "details": "TLS Version",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "TLSv1.1",
- "value": "TLSv1.1"
- },
- {
- "key": "TLSv1.2",
- "value": "TLSv1.2"
- }
- ],
- "default": "TLSv1.1"
- },
- "dataPath": [
- "tls-version"
- ],
- "objectType": "object"
- },
- {
- "key": "auth-type",
- "description": "Authentication Type",
- "details": "Authentication Type",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "Server",
- "value": "Server"
- },
- {
- "key": "Mutual",
- "value": "Mutual"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ciphersuite-list",
- "description": "Ciphersuites",
- "details": "Syslog secure server ciphersuites",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ciphersuite"
- ],
- "dataType": {
- "type": "enumList",
- "values": [
- {
- "key": "aes-128-cbc-sha",
- "value": "aes-128-cbc-sha"
- },
- {
- "key": "aes-256-cbc-sha",
- "value": "aes-256-cbc-sha"
- },
- {
- "key": "dhe-aes-cbc-sha2",
- "value": "dhe-aes-cbc-sha2"
- },
- {
- "key": "dhe-aes-gcm-sha2",
- "value": "dhe-aes-gcm-sha2"
- },
- {
- "key": "ecdhe-ecdsa-aes-gcm-sha2",
- "value": "ecdhe-ecdsa-aes-gcm-sha2"
- },
- {
- "key": "ecdhe-rsa-aes-cbc-sha2",
- "value": "ecdhe-rsa-aes-cbc-sha2"
- },
- {
- "key": "ecdhe-rsa-aes-gcm-sha2",
- "value": "ecdhe-rsa-aes-gcm-sha2"
- },
- {
- "key": "rsa-aes-cbc-sha2",
- "value": "rsa-aes-cbc-sha2"
- },
- {
- "key": "rsa-aes-gcm-sha2",
- "value": "rsa-aes-gcm-sha2"
- }
- ]
- },
- "objectType": "object"
- }
- ]
- },
- {
- "key": "server",
- "description": "Remote host",
- "details": "Enable logging to remote server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "minChildren": "0",
- "maxChildren": "7",
- "children": [
- {
- "key": "name",
- "description": "Hostname/IPv4 Address",
- "details": "Set hostname or IPv4 address of server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN ID",
- "details": "Set VPN in which syslog server is located",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-interface",
- "description": "Source Interface",
- "details": "Set interface to use to reach syslog server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 0,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Priority",
- "details": "Set logging level for messages logged to server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "information",
- "value": "Informational: Informational messages"
- },
- {
- "key": "debugging",
- "value": "Debugging: Debug messages"
- },
- {
- "key": "notice",
- "value": "Notifications: Normal but significant conditions"
- },
- {
- "key": "warn",
- "value": "Warnings: Warning conditions"
- },
- {
- "key": "error",
- "value": "Errors: Error conditions"
- },
- {
- "key": "critical",
- "value": "Critical: Critical conditions"
- },
- {
- "key": "alert",
- "value": "Alerts: Immediate action needed"
- },
- {
- "key": "emergency",
- "value": "Emergencies: System is unusable"
- }
- ],
- "default": "information"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "enable-tls",
- "description": "TLS",
- "details": "Enable TLS",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tls"
- ],
- "objectType": "object"
- },
- {
- "key": "custom-profile",
- "description": "Custom Profile",
- "details": "Define custom profile",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tls",
- "tls-properties"
- ],
- "objectType": "object"
- },
- {
- "key": "profile",
- "description": "TLS Profile",
- "details": "Configure a TLS profile",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [
- "tls",
- "tls-properties"
- ],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "ipv6-server",
- "description": "Remote IPv6 host",
- "details": "Enable logging to remote IPv6 server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "minChildren": "0",
- "maxChildren": "7",
- "children": [
- {
- "key": "name",
- "description": "IPv6 Hostname/IPv6 Address",
- "details": "Set IPv6 hostname or IPv6 address of server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN ID",
- "details": "Set VPN in which syslog server is located",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-interface",
- "description": "Source Interface",
- "details": "Set interface to use to reach syslog server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 0,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Priority",
- "details": "Set logging level for messages logged to server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "information",
- "value": "Informational: Informational messages"
- },
- {
- "key": "debugging",
- "value": "Debugging: Debug messages"
- },
- {
- "key": "notification",
- "value": "Notifications: Normal but significant conditions"
- },
- {
- "key": "warn",
- "value": "Warnings: Warning conditions"
- },
- {
- "key": "error",
- "value": "Errors: Error conditions"
- },
- {
- "key": "critical",
- "value": "Critical: Critical conditions"
- },
- {
- "key": "alert",
- "value": "Alerts: Immediate action needed"
- },
- {
- "key": "emergency",
- "value": "Emergencies: System is unusable"
- }
- ],
- "default": "information"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "enable-tls",
- "description": "TLS",
- "details": "Enable TLS",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tls"
- ],
- "objectType": "object"
- },
- {
- "key": "custom-profile",
- "description": "Custom Profile",
- "details": "Define custom profile",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tls",
- "tls-properties"
- ],
- "objectType": "object"
- },
- {
- "key": "profile",
- "description": "TLS Profile",
- "details": "Configure a TLS profile",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [
- "tls",
- "tls-properties"
- ],
- "objectType": "object"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_ntp.json b/catalystwan/tests/templates/schemas/cisco_ntp.json
deleted file mode 100644
index fff35068..00000000
--- a/catalystwan/tests/templates/schemas/cisco_ntp.json
+++ /dev/null
@@ -1,265 +0,0 @@
-{
- "name": "cisco_ntp",
- "xmlPath": [
- "system"
- ],
- "xmlRootTag": "ntp",
- "nameSpace": "http://viptela.com/system",
- "fields": [
- {
- "key": "server",
- "description": "NTP Server (up to 4)",
- "details": "Configure NTP servers",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Hostname/IP Address",
- "details": "Set hostname or IP address of server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "key",
- "description": "Authentication Key ID",
- "details": "Set authentication key for the server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN ID",
- "details": "Set VPN in which NTP server is located",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "version",
- "description": "Version",
- "details": "Set NTP version",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4,
- "default": 4
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-interface",
- "description": "Source Interface",
- "details": "Set interface to use to reach NTP server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 0,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "prefer",
- "description": "Prefer",
- "details": "Prefer this NTP server",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "authentication",
- "description": "Authentication",
- "details": "Set MD5 authentication key",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "keys"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "number"
- ],
- "children": [
- {
- "key": "number",
- "description": "Authentication Key ID",
- "details": "MD5 authentication key ID",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "md5",
- "description": "Authentication Value",
- "details": "Enter cleartext or AES-encrypted MD5 authentication key",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "passphrase",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "trusted",
- "description": "Trusted Keys",
- "details": "Designate authentication key as trustworthy",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535
- },
- "dataPath": [
- "keys"
- ],
- "objectType": "list"
- },
- {
- "key": "enable",
- "description": "Master",
- "details": "Configure device as NTP master",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "master"
- ],
- "objectType": "object"
- },
- {
- "key": "stratum",
- "description": "Stratum",
- "details": "Master Stratum <1..15>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 15
- },
- "dataPath": [
- "master"
- ],
- "objectType": "object"
- },
- {
- "key": "source",
- "description": "Source",
- "details": "Set interface for NTP Master",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 0,
- "maxLength": 32
- },
- "dataPath": [
- "master"
- ],
- "objectType": "object"
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_omp.json b/catalystwan/tests/templates/schemas/cisco_omp.json
deleted file mode 100644
index b3ad696c..00000000
--- a/catalystwan/tests/templates/schemas/cisco_omp.json
+++ /dev/null
@@ -1,479 +0,0 @@
-{
- "name": "cisco_omp",
- "xmlPath": [],
- "xmlRootTag": "omp",
- "nameSpace": "http://viptela.com/omp",
- "fields": [
- {
- "key": "graceful-restart",
- "description": "Graceful Restart for OMP",
- "details": "Enable or disable OMP graceful restart",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "overlay-as",
- "description": "Overlay AS Number",
- "details": "Set Overlay AS number <1..4294967295> or ",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "send-path-limit",
- "description": "Number of Paths Advertised per Prefix",
- "details": "Set number of TLOC routes advertised between vSmart and vEdge",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 16,
- "default": 4
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ecmp-limit",
- "description": "ECMP Limit",
- "details": "Set maximum number of OMP paths to install in vEdge route table",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 16,
- "default": 4
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "shutdown",
- "description": "Shutdown",
- "details": "Enable or disable OMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "omp-admin-distance-ipv4",
- "description": "OMP Admin Distance IPv4",
- "details": "omp-admin-distance-ipv4",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "omp-admin-distance-ipv6",
- "description": "OMP Admin Distance IPv6",
- "details": "omp-admin-distance-ipv6",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "advertisement-interval",
- "description": "Advertisement Interval (seconds)",
- "details": "Set the time between OMP Update packets",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65535,
- "default": 1
- },
- "dataPath": [
- "timers"
- ],
- "objectType": "object"
- },
- {
- "key": "graceful-restart-timer",
- "description": "Graceful Restart Timer (seconds)",
- "details": "Set the OMP graceful restart timer",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 604800,
- "default": 43200
- },
- "dataPath": [
- "timers"
- ],
- "objectType": "object"
- },
- {
- "key": "eor-timer",
- "description": "EOR Timer",
- "details": "End of RIB timer <1..604800> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 3600,
- "default": 300
- },
- "dataPath": [
- "timers"
- ],
- "objectType": "object"
- },
- {
- "key": "holdtime",
- "description": "Hold Time (seconds)",
- "details": "Set how long to wait before closing OMP peer connection",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "range": "0,3-65535",
- "default": 60
- },
- "dataPath": [
- "timers"
- ],
- "objectType": "object"
- },
- {
- "key": "advertise",
- "description": "Advertise Routes",
- "details": "Advertise locally learned routes to OMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "protocol"
- ],
- "children": [
- {
- "key": "protocol",
- "description": "Protocol",
- "details": "Set routes to advertise",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "bgp",
- "value": "BGP"
- },
- {
- "key": "ospf",
- "value": "OSPF"
- },
- {
- "key": "ospfv3",
- "value": "OSPFV3"
- },
- {
- "key": "connected",
- "value": "Connected"
- },
- {
- "key": "static",
- "value": "Static"
- },
- {
- "key": "eigrp",
- "value": "EIGRP"
- },
- {
- "key": "lisp",
- "value": "LISP"
- },
- {
- "key": "isis",
- "value": "ISIS"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "route",
- "description": "Route",
- "details": "Advertise OSPF external routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "external",
- "value": "External"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "ipv6-advertise",
- "description": "Advertise Routes",
- "details": "Advertise locally learned routes to OMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "protocol"
- ],
- "children": [
- {
- "key": "protocol",
- "description": "Protocol",
- "details": "Set routes to advertise",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "bgp",
- "value": "BGP"
- },
- {
- "key": "ospf",
- "value": "OSPF"
- },
- {
- "key": "connected",
- "value": "Connected"
- },
- {
- "key": "static",
- "value": "Static"
- },
- {
- "key": "eigrp",
- "value": "EIGRP"
- },
- {
- "key": "lisp",
- "value": "LISP"
- },
- {
- "key": "isis",
- "value": "ISIS"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "ignore-region-path-length",
- "description": "Ignore Region-Path Length During Best-Path Algorithm",
- "details": "Ignore Region-Path Length During Best-Path Algorithm",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "transport-gateway",
- "description": "Transport Gateway Path Behavior",
- "details": "Transport gateway path computation",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "prefer",
- "value": "Prefer Transport Gateway Path"
- },
- {
- "key": "ecmp-with-direct-path",
- "value": "Do ECMP Between Direct and Transport Gateway Paths"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "site-types",
- "description": "Site Types",
- "details": "Apply transport gateway settings to site types",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "type-1",
- "value": "type-1"
- },
- {
- "key": "type-2",
- "value": "type-2"
- },
- {
- "key": "type-3",
- "value": "type-3"
- },
- {
- "key": "cloud",
- "value": "cloud"
- },
- {
- "key": "branch",
- "value": "branch"
- },
- {
- "key": "br",
- "value": "br"
- },
- {
- "key": "spoke",
- "value": "spoke"
- }
- ]
- },
- "dataPath": [
- "transport-gateway-settings"
- ],
- "objectType": "list"
- },
- {
- "key": "auto-translate",
- "description": "Auto-translate the AS-PATH length to OMP route preference",
- "details": "Auto-translate the AS-PATH length to OMP route preference",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_ospf.json b/catalystwan/tests/templates/schemas/cisco_ospf.json
deleted file mode 100644
index acf068ca..00000000
--- a/catalystwan/tests/templates/schemas/cisco_ospf.json
+++ /dev/null
@@ -1,908 +0,0 @@
-{
- "name": "cisco_ospf",
- "xmlPath": [],
- "xmlRootTag": "router",
- "parentPath": "",
- "nameSpace": "http://viptela.com/vpn",
- "fields": [
- {
- "key": "router-id",
- "description": "Router ID",
- "details": "Set OSPF router ID to override system IP address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [
- "ospf"
- ],
- "objectType": "object"
- },
- {
- "key": "reference-bandwidth",
- "description": "Reference Bandwidth (Mbps)",
- "details": "Set reference bandwidth method to assign OSPF cost",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967,
- "default": 100
- },
- "dataPath": [
- "ospf",
- "auto-cost"
- ],
- "objectType": "object"
- },
- {
- "key": "rfc1583",
- "description": "RFC 1583 Compatible",
- "details": "Calculate summary route cost based on RFC 1583",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "ospf",
- "compatible"
- ],
- "objectType": "object"
- },
- {
- "key": "originate",
- "description": "Originate Default Route",
- "details": "Distribute default external route into OSPF",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ospf",
- "default-information"
- ],
- "objectType": "node-only"
- },
- {
- "key": "always",
- "description": "Always",
- "details": "Always advertise default route",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ospf",
- "default-information",
- "originate"
- ],
- "objectType": "node-only"
- },
- {
- "key": "metric",
- "description": "Default Metric",
- "details": "Set metric used to generate default route <0..16777214>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 16777214
- },
- "dataPath": [
- "ospf",
- "default-information",
- "originate"
- ],
- "objectType": "object"
- },
- {
- "key": "metric-type",
- "description": "Metric Type",
- "details": "Set default route type",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "type1",
- "value": "type1"
- },
- {
- "key": "type2",
- "value": "type2"
- }
- ]
- },
- "dataPath": [
- "ospf",
- "default-information",
- "originate"
- ],
- "objectType": "object"
- },
- {
- "key": "external",
- "description": "Distance for External Routes",
- "details": "Set distance for external routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 110
- },
- "dataPath": [
- "ospf",
- "distance"
- ],
- "objectType": "object"
- },
- {
- "key": "inter-area",
- "description": "Distance for Inter-Area Routes",
- "details": "Set distance for inter-area routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 110
- },
- "dataPath": [
- "ospf",
- "distance"
- ],
- "objectType": "object"
- },
- {
- "key": "intra-area",
- "description": "Distance for Intra-Area Routes",
- "details": "Set distance for intra-area routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 110
- },
- "dataPath": [
- "ospf",
- "distance"
- ],
- "objectType": "object"
- },
- {
- "key": "delay",
- "description": "SPF Calculation Delay (milliseconds)",
- "details": "Set delay from first change received until performing SPF calculation",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 600000,
- "default": 200
- },
- "dataPath": [
- "ospf",
- "timers",
- "spf"
- ],
- "objectType": "object"
- },
- {
- "key": "initial-hold",
- "description": "Initial Hold Time (milliseconds)",
- "details": "Set initial hold time between consecutive SPF calculations",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 600000,
- "default": 1000
- },
- "dataPath": [
- "ospf",
- "timers",
- "spf"
- ],
- "objectType": "object"
- },
- {
- "key": "max-hold",
- "description": "Maximum Hold Time (milliseconds)",
- "details": "Set maximum hold time between consecutive SPF calculations",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 600000,
- "default": 10000
- },
- "dataPath": [
- "ospf",
- "timers",
- "spf"
- ],
- "objectType": "object"
- },
- {
- "key": "redistribute",
- "description": "Redistribute Routes",
- "details": "Redistribute routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ospf"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "protocol"
- ],
- "children": [
- {
- "key": "protocol",
- "description": "Protocol",
- "details": "Set the protocol",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "static",
- "value": "static"
- },
- {
- "key": "connected",
- "value": "connected"
- },
- {
- "key": "bgp",
- "value": "bgp"
- },
- {
- "key": "omp",
- "value": "omp"
- },
- {
- "key": "nat",
- "value": "nat"
- },
- {
- "key": "eigrp",
- "value": "eigrp"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "route-policy",
- "description": "Route Policy",
- "details": "Set route policy to apply to redistributed routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "dia",
- "description": "Enable NAT DIA",
- "details": "Enable NAT DIA for redistributed routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "router-lsa",
- "description": "Router LSA",
- "details": "Advertise own router LSA with infinite distance",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ospf",
- "max-metric"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "ad-type"
- ],
- "children": [
- {
- "key": "ad-type",
- "description": "Type",
- "details": "Set the router LSA advertisement type",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "administrative",
- "value": "administrative"
- },
- {
- "key": "on-startup",
- "value": "on-startup"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "time",
- "description": "Advertisement Time (seconds)",
- "details": "Set how long to advertise maximum metric after router starts up",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 5,
- "max": 86400
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "route-policy",
- "description": "Route Policy",
- "details": "Set route policy to apply",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ospf"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "direction"
- ],
- "children": [
- {
- "key": "direction",
- "description": "Direction",
- "details": "Set direction to apply policy",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "in",
- "value": "in"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "pol-name",
- "description": "Policy Name",
- "details": "Name of route policy",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "area",
- "description": "OSPF Area",
- "details": "Configure OSPF area",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ospf"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "a-num"
- ],
- "children": [
- {
- "key": "a-num",
- "description": "Area Number",
- "details": "Set OSPF area number",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "no-summary",
- "description": "No summary",
- "details": "Do not inject interarea routes into stub",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "stub"
- ],
- "objectType": "node-only"
- },
- {
- "key": "no-summary",
- "description": "No-summary",
- "details": "Do not inject interarea routes into NSSA",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "nssa"
- ],
- "objectType": "node-only"
- },
- {
- "key": "interface",
- "description": "OSPF Interface",
- "details": "Set OSPF interface parameters",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Interface Name",
- "details": "Set interface name",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "hello-interval",
- "description": "Hello Interval (seconds)",
- "details": "Set interval between OSPF hello packets",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535,
- "default": 10
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "dead-interval",
- "description": "Dead Interval (seconds)",
- "details": "Set interval after which neighbor is declared to be down",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535,
- "default": 40
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "retransmit-interval",
- "description": "LSA Retransmission Interval (seconds)",
- "details": "Set time between retransmitting LSAs",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535,
- "default": 5
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "cost",
- "description": "Interface Cost",
- "details": "Set cost of OSPF interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Designated Router Priority",
- "details": "Set router\u2019s priority to be elected as designated router",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "network",
- "description": "OSPF Network Type",
- "details": "Set the OSPF network type",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "broadcast",
- "value": "broadcast"
- },
- {
- "key": "point-to-point",
- "value": "point-to-point"
- },
- {
- "key": "non-broadcast",
- "value": "non-broadcast"
- },
- {
- "key": "point-to-multipoint",
- "value": "point-to-multipoint"
- }
- ],
- "default": "broadcast"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "passive-interface",
- "description": "Passive Interface",
- "details": "Set the interface to advertise its address, but not to actively run OSPF",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "type",
- "description": "Authentication Type",
- "details": "Set OSPF interface authentication type",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "simple",
- "value": "simple"
- },
- {
- "key": "message-digest",
- "value": "message-digest"
- },
- {
- "key": "null",
- "value": "null"
- }
- ]
- },
- "dataPath": [
- "authentication"
- ],
- "objectType": "object"
- },
- {
- "key": "message-digest-key",
- "description": "Message Digest Key ID",
- "details": "Set MD5 message digest key",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255
- },
- "dataPath": [
- "authentication",
- "message-digest"
- ],
- "objectType": "object"
- },
- {
- "key": "md5",
- "description": "Message Digest Key",
- "details": "Set MD5 authentication key",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "passphrase",
- "minLength": 1,
- "maxLength": 31
- },
- "dataPath": [
- "authentication",
- "message-digest"
- ],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "range",
- "description": "Summarize Routes",
- "details": "Summarize OSPF routes at an area boundary",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "Address",
- "details": "Set matching prefix",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "cost",
- "description": "Cost",
- "details": "Set cost for this range",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 16777214
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "no-advertise",
- "description": "No-advertise",
- "details": "Do not advertise this range",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json b/catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json
deleted file mode 100644
index 99fe36bc..00000000
--- a/catalystwan/tests/templates/schemas/cisco_secure_internet_gateway.json
+++ /dev/null
@@ -1,1520 +0,0 @@
-{
- "name": "cisco_secure_internet_gateway",
- "xmlPath": [
- "vpn"
- ],
- "xmlRootTag": "vpn-instance",
- "uniqueKey": "vpn-id",
- "nameSpace": "http://viptela.com/vpn",
- "fields": [
- {
- "key": "vpn-id",
- "description": "VPN",
- "details": "List of VPN instances",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65527,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "childOrgId",
- "description": "Child Organization Id",
- "details": "Child Organization Id",
- "optionType": [
- "ignore",
- "constant",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "default": ""
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "interface",
- "description": "IPSec Interface",
- "details": "Interface name: IPsec when present",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataPath": [],
- "objectType": "tree",
- "minElements": 1,
- "maxElements": 4,
- "primaryKeys": [
- "if-name"
- ],
- "children": [
- {
- "key": "if-name",
- "description": "Interface Name (1..255)",
- "details": "Interface name: IPsec when present",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 4,
- "maxLength": 8,
- "min": 1,
- "max": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "auto",
- "description": "Auto Tunnel Mode",
- "details": "Auto Tunnel Mode",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "shutdown",
- "description": "Shutdown",
- "details": "Administrative state",
- "optionType": [
- "constant",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "boolean",
- "default": "false",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "description",
- "description": "Description",
- "details": "Interface description",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "unnumbered",
- "description": "Unnumbered Interface",
- "details": "Unnumbered interface",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "node-only"
- },
- {
- "key": "address",
- "description": "IPv4 address",
- "details": "Assign IPv4 address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "tunnel-source",
- "description": "Tunnel Source IP Address",
- "details": "Tunnel source IP Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tunnel-source-interface",
- "description": "Tunnel Source Interface",
- "details": "<1..32 characters> Interface name: ge0/<0-..> or ge0/<0-..>.vlanid",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tunnel-route-via",
- "description": "Tunnel Route-via Interface",
- "details": "<1..32 characters> Interface name: ge0/<0-..> or ge0/<0-..>.vlanid",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tunnel-destination",
- "description": "Tunnel Destination IP Address/FQDN(Ipsec)",
- "details": "Tunnel destination IP address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "default": "dynamic",
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "application",
- "description": "Application",
- "details": "Enable Application Tunnel Type",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "sig",
- "value": "Secure Internet Gateway"
- }
- ],
- "default": "sig"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "application",
- "description": "Application",
- "details": "Enable Application Tunnel Type",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "sig",
- "value": "Secure Internet Gateway"
- }
- ],
- "default": "sig"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tunnel-set",
- "description": "SIG Provider",
- "details": "SIG Tunnel Provider",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "secure-internet-gateway-umbrella",
- "value": "Umbrella"
- },
- {
- "key": "secure-internet-gateway-zscaler",
- "value": "Zscaler"
- },
- {
- "key": "secure-internet-gateway-other",
- "value": "Generic"
- }
- ],
- "default": "secure-internet-gateway-umbrella"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tunnel-dc-preference",
- "description": "Data-Center",
- "details": "SIG Tunnel Data Center",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "primary-dc",
- "value": "Primary"
- },
- {
- "key": "secondary-dc",
- "value": "Secondary"
- }
- ],
- "default": "primary-dc"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tcp-mss-adjust",
- "description": "TCP MSS",
- "details": "TCP MSS on SYN packets, in bytes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 500,
- "max": 1460
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mtu",
- "description": "IP MTU",
- "details": "Interface MTU <576..2000>, in bytes",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "number",
- "min": 576,
- "max": 2000,
- "default": 1400
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "dpd-interval",
- "description": "DPD Interval",
- "details": "IKE keepalive interval (seconds)",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65535,
- "default": 10
- },
- "dataPath": [
- "dead-peer-detection"
- ],
- "objectType": "object"
- },
- {
- "key": "dpd-retries",
- "description": "DPD Retries",
- "details": "IKE keepalive retries",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 255,
- "default": 3
- },
- "dataPath": [
- "dead-peer-detection"
- ],
- "objectType": "object"
- },
- {
- "key": "ike-version",
- "description": "IKE Version",
- "details": "IKE Version <1..2>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 2,
- "default": 2
- },
- "dataPath": [
- "ike"
- ],
- "objectType": "object"
- },
- {
- "key": "pre-shared-secret",
- "description": "Preshared Key",
- "details": "Use preshared key to authenticate IKE peer",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "restrictedPassphrase",
- "minLength": 1,
- "maxLength": 127
- },
- "dataPath": [
- "ike",
- "authentication-type",
- "pre-shared-key"
- ],
- "objectType": "object"
- },
- {
- "key": "ike-rekey-interval",
- "description": "IKE Rekey Interval (seconds)",
- "details": "IKE rekey interval <300..1209600> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 300,
- "max": 1209600,
- "default": 14400
- },
- "dataPath": [
- "ike"
- ],
- "objectType": "object"
- },
- {
- "key": "ike-ciphersuite",
- "description": "IKE Cipher Suite",
- "details": "IKE identity the IKE preshared secret belongs to",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "aes256-cbc-sha1",
- "value": "AES 256 CBC SHA1"
- },
- {
- "key": "aes256-cbc-sha2",
- "value": "AES 256 CBC SHA2"
- },
- {
- "key": "aes128-cbc-sha1",
- "value": "AES 128 CBC SHA1"
- },
- {
- "key": "aes128-cbc-sha2",
- "value": "AES 128 CBC SHA2"
- }
- ],
- "default": "aes256-cbc-sha1"
- },
- "dataPath": [
- "ike"
- ],
- "objectType": "object"
- },
- {
- "key": "ike-group",
- "description": "IKE Diffie-Hellman Group",
- "details": "IKE Diffie Hellman Groups",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "2",
- "value": "2 1024-bit modulus"
- },
- {
- "key": "5",
- "value": "5 1536-bit modulus"
- },
- {
- "key": "14",
- "value": "14 2048-bit modulus"
- },
- {
- "key": "15",
- "value": "15 3072-bit modulus"
- },
- {
- "key": "16",
- "value": "16 4096-bit modulus"
- },
- {
- "key": "19",
- "value": "19 256-bit random ECP"
- },
- {
- "key": "20",
- "value": "20 384-bit random ECP"
- },
- {
- "key": "21",
- "value": "21 521-bit random ECP"
- }
- ],
- "default": "14"
- },
- "dataPath": [
- "ike"
- ],
- "objectType": "object"
- },
- {
- "key": "pre-shared-key-dynamic",
- "description": "Preshared Key",
- "details": "Use preshared key to authenticate IKE peer",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "ike",
- "authentication-type"
- ],
- "objectType": "node-only"
- },
- {
- "key": "ike-local-id",
- "description": "IKE ID for local End point",
- "details": "IKE ID for the local endpoint. Input IPv4 address, domain name, or email address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ike",
- "minLength": 1,
- "maxLength": 63
- },
- "dataPath": [
- "ike",
- "authentication-type",
- "pre-shared-key"
- ],
- "objectType": "object"
- },
- {
- "key": "ike-remote-id",
- "description": "IKE ID for Remote End point",
- "details": "IKE ID for the remote endpoint. Input IPv4 address, domain name, or email address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ike",
- "minLength": 1,
- "maxLength": 63
- },
- "dataPath": [
- "ike",
- "authentication-type",
- "pre-shared-key"
- ],
- "objectType": "object"
- },
- {
- "key": "ipsec-rekey-interval",
- "description": "IPsec Rekey Interval (seconds)",
- "details": "IPsec rekey interval <300..1209600> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 300,
- "max": 1209600,
- "default": 3600
- },
- "dataPath": [
- "ipsec"
- ],
- "objectType": "object"
- },
- {
- "key": "ipsec-replay-window",
- "description": "IPsec Replay Window",
- "details": "Replay window size 32..8192 (must be a power of 2)",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 64,
- "max": 4096,
- "default": 512
- },
- "dataPath": [
- "ipsec"
- ],
- "objectType": "object"
- },
- {
- "key": "ipsec-ciphersuite",
- "description": "IPsec Cipher Suite",
- "details": "IPsec(ESP) encryption and integrity protocol",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "aes256-cbc-sha1",
- "value": "AES 256 CBC SHA1"
- },
- {
- "key": "aes256-cbc-sha384",
- "value": "AES 256 CBC SHA 384"
- },
- {
- "key": "aes256-cbc-sha256",
- "value": "AES 256 CBC SHA 256"
- },
- {
- "key": "aes256-cbc-sha512",
- "value": "AES 256 CBC SHA 512"
- },
- {
- "key": "aes256-gcm",
- "value": "AES 256 GCM"
- },
- {
- "key": "null-sha1",
- "value": "Null SHA1"
- },
- {
- "key": "null-sha384",
- "value": "Nul SHA 384"
- },
- {
- "key": "null-sha256",
- "value": "Nul SHA 256"
- },
- {
- "key": "null-sha512",
- "value": "Nul SHA 512"
- }
- ],
- "default": "aes256-gcm"
- },
- "dataPath": [
- "ipsec"
- ],
- "objectType": "object"
- },
- {
- "key": "perfect-forward-secrecy",
- "description": "Perfect Forward Secrecy",
- "details": "IPsec perfect forward secrecy settings",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "group-2",
- "value": "Group-2 1024-bit modulus"
- },
- {
- "key": "group-5",
- "value": "Group-5 1536-bit modulus"
- },
- {
- "key": "group-14",
- "value": "Group-14 2048-bit modulus"
- },
- {
- "key": "group-15",
- "value": "Group-15 3072-bit modulus"
- },
- {
- "key": "group-16",
- "value": "Group-16 4096-bit modulus"
- },
- {
- "key": "group-19",
- "value": "Group-19 256-bit random ECP"
- },
- {
- "key": "group-20",
- "value": "Group-20 384-bit random ECP"
- },
- {
- "key": "group-21",
- "value": "Group-21 521-bit random ECP"
- },
- {
- "key": "none",
- "value": "None"
- }
- ],
- "default": "none"
- },
- "dataPath": [
- "ipsec"
- ],
- "objectType": "object"
- },
- {
- "key": "tracker",
- "description": "Tracker",
- "details": "Enable tracker for this interface",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "",
- "value": ""
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "track-enable",
- "description": "Track this interface for SIG",
- "details": "Enable/disable SIG tracking",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tunnel-public-ip",
- "description": "Source Public IP",
- "details": "Public IP required to setup GRE tunnel to Zscaler",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4",
- "default": "Auto"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "service",
- "description": "Service",
- "details": "Configure services",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "svc-type"
- ],
- "children": [
- {
- "key": "svc-type",
- "description": "Service Type",
- "details": "Service Type",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "sig",
- "value": "SIG"
- }
- ],
- "default": "sig"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "interface-pair",
- "description": "Interface Pair",
- "details": "Interface Pair for active and backup",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataPath": [
- "ha-pairs"
- ],
- "objectType": "tree",
- "minElements": 1,
- "maxElements": 4,
- "primaryKeys": [
- "active-interface",
- "backup-interface"
- ],
- "children": [
- {
- "key": "active-interface",
- "description": "Active Tunnel Interface",
- "details": "Active Tunnel Interface for SIG",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "",
- "value": ""
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "active-interface-weight",
- "description": "Weight",
- "details": "Active Tunnel Interface Weight",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "backup-interface",
- "description": "Backup Tunnel Interface",
- "details": "Backup Tunnel Interface for SIG",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "",
- "value": ""
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "backup-interface-weight",
- "description": "Weight",
- "details": "Backup Tunnel Interface Weight",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "auth-required",
- "description": "Authentication Required",
- "details": "Enforce Authentication",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "zscaler-location-settings"
- ],
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "objectType": "object"
- },
- {
- "key": "xff-forward-enabled",
- "description": "XFF Forwarding",
- "details": "XFF forwarding enabled",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "zscaler-location-settings"
- ],
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "objectType": "object"
- },
- {
- "key": "ofw-enabled",
- "description": "Enable Firewall",
- "details": "Firewall enabled",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "zscaler-location-settings"
- ],
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "objectType": "object"
- },
- {
- "key": "ips-control",
- "description": "Enable IPS Control",
- "details": "Enable IPS Control",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "zscaler-location-settings"
- ],
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "objectType": "object"
- },
- {
- "key": "caution-enabled",
- "description": "Enable Caution",
- "details": "Enable Caution",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "zscaler-location-settings"
- ],
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "objectType": "object"
- },
- {
- "key": "primary-data-center",
- "description": "Primary Data-Center",
- "details": "Custom Primary Datacenter",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "default": "Auto"
- },
- "dataPath": [
- "zscaler-location-settings",
- "datacenters"
- ],
- "objectType": "object"
- },
- {
- "key": "secondary-data-center",
- "description": "Secondary Data-Center",
- "details": "Custom Secondary Datacenter",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "default": "Auto"
- },
- "dataPath": [
- "zscaler-location-settings",
- "datacenters"
- ],
- "objectType": "object"
- },
- {
- "key": "ip",
- "description": "Enable Surrogate IP",
- "details": "Enable Surrogate IP",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "zscaler-location-settings",
- "surrogate"
- ],
- "objectType": "object"
- },
- {
- "key": "idle-time",
- "description": "Idle Time to Disassociation",
- "details": "Idle time to disassociation",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max:": 4294967296,
- "default": 0
- },
- "dataPath": [
- "zscaler-location-settings",
- "surrogate"
- ],
- "objectType": "object"
- },
- {
- "key": "display-time-unit",
- "description": "Display Time Unit",
- "details": "Display time unit",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "MINUTE",
- "value": "MINUTE"
- },
- {
- "key": "HOUR",
- "value": "HOUR"
- },
- {
- "key": "DAY",
- "value": "DAY"
- }
- ],
- "default": "MINUTE"
- },
- "dataPath": [
- "zscaler-location-settings",
- "surrogate"
- ],
- "objectType": "object"
- },
- {
- "key": "ip-enforced-for-known-browsers",
- "description": "Enforce Surrogate IP for known browsers",
- "details": "Enforce Surrogate IP for known browsers",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "zscaler-location-settings",
- "surrogate"
- ],
- "objectType": "object"
- },
- {
- "key": "refresh-time",
- "description": "Refresh Time",
- "details": "Refresh time for re-validation of surrogacy in minutes",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max:": 4294967296,
- "default": 0
- },
- "dataPath": [
- "zscaler-location-settings",
- "surrogate"
- ],
- "objectType": "object"
- },
- {
- "key": "refresh-time-unit",
- "description": "Refresh Time Unit",
- "details": "Refresh Time unit",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "MINUTE",
- "value": "MINUTE"
- },
- {
- "key": "HOUR",
- "value": "HOUR"
- },
- {
- "key": "DAY",
- "value": "DAY"
- }
- ],
- "default": "MINUTE"
- },
- "dataPath": [
- "zscaler-location-settings",
- "surrogate"
- ],
- "objectType": "object"
- },
- {
- "key": "enabled",
- "description": "Enable AUP",
- "details": "Enable Acceptable User Policy",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "zscaler-location-settings",
- "aup"
- ],
- "objectType": "object"
- },
- {
- "key": "block-internet-until-accepted",
- "description": "First Time AUP Block Internet Access",
- "details": "For first-time Acceptable User Policy behavior, block Internet access",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "zscaler-location-settings",
- "aup"
- ],
- "objectType": "object"
- },
- {
- "key": "force-ssl-inspection",
- "description": "Force SSL Inspection",
- "details": "For first-time Acceptable User Policy behavior, force SSL inspection",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "zscaler-location-settings",
- "aup"
- ],
- "objectType": "object"
- },
- {
- "key": "timeout",
- "description": "AUP Frequency",
- "details": "Custom Acceptable User Policy frequency in days",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "default": 0
- },
- "dataPath": [
- "zscaler-location-settings",
- "aup"
- ],
- "objectType": "object"
- },
- {
- "key": "location-name",
- "description": "Zscaler Location Name",
- "details": "Zscaler location name (optional)",
- "optionType": [
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "default": "Auto"
- },
- "dataPath": [
- "zscaler-location-settings"
- ],
- "objectType": "object"
- },
- {
- "key": "data-center-primary",
- "description": "Umbrella Primary Data-Center",
- "details": "Umbrella Primary Datacenter",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "default": "Auto"
- },
- "dataPath": [
- "umbrella-data-center"
- ],
- "objectType": "object"
- },
- {
- "key": "data-center-secondary",
- "description": "Umbrella Secondary Data-Center",
- "details": "Umbrella Secondary Datacenter",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "default": "Auto"
- },
- "dataPath": [
- "umbrella-data-center"
- ],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "tracker-src-ip",
- "description": "Source IP Address",
- "details": "Source IP address for Tracker",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tracker",
- "description": "Tracker",
- "details": "Tracker configuration",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "tracker-type",
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Tracker name",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "endpoint-api-url",
- "description": "API url of endpoint",
- "details": "API url of endpoint",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 0,
- "maxLength": 512
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "threshold",
- "description": "Threshold",
- "details": "Probe Timeout threshold <100..1000> milliseconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 100,
- "max": 1000,
- "default": 300
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "interval",
- "description": "Interval",
- "details": "Probe interval <10..600> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 20,
- "max": 600,
- "default": 60
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "multiplier",
- "description": "Multiplier",
- "details": "Probe failure multiplier <1..10> failed attempts",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 10,
- "default": 3
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tracker-type",
- "description": "Tracker Type",
- "details": "",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "SIG",
- "value": "SIG"
- }
- ],
- "default": " SIG"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_snmp.json b/catalystwan/tests/templates/schemas/cisco_snmp.json
deleted file mode 100644
index 94eb7beb..00000000
--- a/catalystwan/tests/templates/schemas/cisco_snmp.json
+++ /dev/null
@@ -1,561 +0,0 @@
-{
- "name": "cisco_snmp",
- "xmlRootTag": "snmp",
- "nameSpace": "http://viptela.com/snmp",
- "fields": [
- {
- "key": "shutdown",
- "description": "Shutdown",
- "details": "Enable or disable SNMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "contact",
- "description": "Contact Person",
- "details": "Set the contact for this managed node",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "location",
- "description": "Location of Device",
- "details": "Set the physical location of this managed node",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "view",
- "description": "View",
- "details": "Configure a view record",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Set the name of the SNMP view",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "oid",
- "description": "Object Identifier",
- "details": "Configure SNMP object identifier",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "id"
- ],
- "children": [
- {
- "key": "id",
- "description": "Object Identifier",
- "details": "Configure identifier of subtree of MIB objects",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "exclude",
- "description": "Exclude OID",
- "details": "Exclude the OID",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- }
- ]
- }
- ]
- },
- {
- "key": "community",
- "description": "Community",
- "details": "Configure SNMP community",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Set name of the SNMP community",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "restrictedPassphrase",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object",
- "vipNeedsEncryption": "true"
- },
- {
- "key": "view",
- "description": "View",
- "details": "Set name of the SNMP view",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "authorization",
- "description": "Authorization",
- "details": "Configure access permissions",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataPath": [],
- "objectType": "object",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "read-only",
- "value": "read-only"
- }
- ]
- }
- }
- ]
- },
- {
- "key": "group",
- "description": "Group",
- "details": "Configure an SNMP group",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name",
- "security-level"
- ],
- "children": [
- {
- "key": "name",
- "description": "Name",
- "details": "Name of the SNMP group",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "security-level",
- "description": "Security Level",
- "details": "Configure security level",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "no-auth-no-priv",
- "value": "NoAuthNoPriv"
- },
- {
- "key": "auth-no-priv",
- "value": "AuthNoPriv"
- },
- {
- "key": "auth-priv",
- "value": "AuthPriv"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "view",
- "description": "View",
- "details": "Name of the SNMP view",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "user",
- "description": "User",
- "details": "Configure an SNMP user",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "User",
- "details": "Name of the SNMP user",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "auth",
- "description": "Authentication Protocol",
- "details": "Configure authentication protocol",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "md5",
- "value": "MD5"
- },
- {
- "key": "sha",
- "value": "SHA"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "auth-password",
- "description": "Authentication Password",
- "details": "Specify authentication protocol password",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "restrictedPassphrase",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object",
- "vipNeedsEncryption": "true"
- },
- {
- "key": "priv",
- "description": "Privacy Protocol",
- "details": "Configure privacy protocol",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "aes-cfb-128",
- "value": "AES-CFB-128"
- },
- {
- "key": "aes-256-cfb-128",
- "value": "AES-256-CFB-128"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priv-password",
- "description": "Privacy Password",
- "details": "Specify privacy protocol password",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "restrictedPassphrase",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object",
- "vipNeedsEncryption": "true"
- },
- {
- "key": "group",
- "description": "Group",
- "details": "Name of the SNMP group",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "target",
- "description": "Trap Target",
- "details": "Configure SNMP server to receive SNMP traps",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "trap"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "vpn-id",
- "ip",
- "port"
- ],
- "children": [
- {
- "key": "vpn-id",
- "description": "VPN ID",
- "details": "Set VPN in which SNMP server is located",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ip",
- "description": "IP Address",
- "details": "Set IPv4/IPv6 address of SNMP server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ip"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "port",
- "description": "UDP Port",
- "details": "Set UDP port number to connect to SNMP server",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "community-name",
- "description": "Community Name",
- "details": "Set name of the SNMP community",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object",
- "vipNeedsEncryption": "true"
- },
- {
- "key": "user",
- "description": "User Name",
- "details": "Set name of the SNMP user",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-interface",
- "description": "Source Interface",
- "details": "Source interface for outgoing SNMP traps",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_system.json b/catalystwan/tests/templates/schemas/cisco_system.json
index ad9f6914..eb77fecb 100644
--- a/catalystwan/tests/templates/schemas/cisco_system.json
+++ b/catalystwan/tests/templates/schemas/cisco_system.json
@@ -1973,52 +1973,6 @@
"dataPath": [],
"objectType": "object"
},
- {
- "key": "site-type",
- "description": "Site Type",
- "details": "Configure site type",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "type-1",
- "value": "type-1"
- },
- {
- "key": "type-2",
- "value": "type-2"
- },
- {
- "key": "type-3",
- "value": "type-3"
- },
- {
- "key": "cloud",
- "value": "cloud"
- },
- {
- "key": "branch",
- "value": "branch"
- },
- {
- "key": "br",
- "value": "br"
- },
- {
- "key": "spoke",
- "value": "spoke"
- }
- ]
- },
- "dataPath": [],
- "objectType": "list"
- },
{
"key": "port-offset",
"description": "Port Offset",
@@ -2840,78 +2794,6 @@
],
"objectType": "list"
},
- {
- "key": "preference-auto",
- "description": "Affinity Group Preference Auto",
- "details": "Enable affinity preference auto flag",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "affinity-group"
- ],
- "objectType": "object"
- },
- {
- "key": "affinity-per-vrf",
- "description": "Affinity Group Number for VRFs",
- "details": "Set Affinity per VRF",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "primaryKeys": [
- "affinity-group-number"
- ],
- "children": [
- {
- "key": "affinity-group-number",
- "description": "Affinity Group Number",
- "details": "Router affinity group number",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 63
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vrf-range",
- "description": "VRFs",
- "details": "Range of VRFs",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 11
- },
- "dataPath": [],
- "objectType": "object"
- }
- ],
- "dataPath": [
- "affinity-group"
- ],
- "objectType": "tree"
- },
{
"key": "transport-gateway",
"description": "Transport Gateway",
@@ -2970,130 +2852,6 @@
},
"dataPath": [],
"objectType": "object"
- },
- {
- "key": "enable-management-region",
- "description": "Management Region",
- "details": "Enable Management Region",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vrf",
- "description": "VRF Name",
- "details": "VRF Name for Management Region",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "management-region"
- ],
- "objectType": "tree",
- "maxElements": 1,
- "primaryKeys": [
- "vrf-id"
- ],
- "children": [
- {
- "key": "vrf-id",
- "description": "VRF ID",
- "details": "VRF ID for management region",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65531
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "gateway-preference",
- "description": "List of affinity group preferences for VRF",
- "details": "List of affinity group preferences for VRF",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 63
- },
- "dataPath": [],
- "objectType": "list"
- }
- ]
- },
- {
- "key": "management-gateway",
- "description": "Management Gateway",
- "details": "Enable Management Gateway",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "epfr",
- "description": "Enhanced App-Aware Routing",
- "details": "Enable SLA Dampening and Enhanced App-Aware Routing.",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "disabled",
- "value": "Disabled"
- },
- {
- "key": "aggressive",
- "value": "Aggressive"
- },
- {
- "key": "moderate",
- "value": "Moderate"
- },
- {
- "key": "conservative",
- "value": "Conservative"
- }
- ],
- "default": "disabled"
- },
- "dataPath": [],
- "objectType": "object"
}
]
}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/cisco_vpn.json b/catalystwan/tests/templates/schemas/cisco_vpn.json
index c462c7a7..b4c0552a 100644
--- a/catalystwan/tests/templates/schemas/cisco_vpn.json
+++ b/catalystwan/tests/templates/schemas/cisco_vpn.json
@@ -290,7 +290,7 @@
"defaultOption": "constant",
"dataType": {
"type": "ip",
- "max": 14
+ "max": 8
},
"dataPath": [],
"objectType": "list"
@@ -1162,32 +1162,6 @@
},
"dataPath": [],
"objectType": "object"
- },
- {
- "key": "region",
- "description": "Region",
- "details": "Region",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "core",
- "value": "Core"
- },
- {
- "key": "access",
- "value": "Access"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
}
]
}
@@ -1337,32 +1311,6 @@
},
"dataPath": [],
"objectType": "object"
- },
- {
- "key": "region",
- "description": "Region",
- "details": "Region",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "core",
- "value": "Core"
- },
- {
- "key": "access",
- "value": "Access"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
}
]
}
diff --git a/catalystwan/tests/templates/schemas/cisco_vpn_interface.json b/catalystwan/tests/templates/schemas/cisco_vpn_interface.json
deleted file mode 100644
index 274bc12e..00000000
--- a/catalystwan/tests/templates/schemas/cisco_vpn_interface.json
+++ /dev/null
@@ -1,3348 +0,0 @@
-{
- "name": "Interface",
- "xmlPath": [],
- "xmlRootTag": "interface",
- "parentPath": "",
- "uniqueKey": "if-name",
- "nameSpace": "http://viptela.com/vpn",
- "fields": [
- {
- "key": "if-name",
- "description": "Interface Name",
- "details": "Interface name: ge0/<0-..> or ge0/<0-..>.vlanid or irb or loopback or natpool-<1..31> when present",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "regex": "(ge|Ethernet|GigabitEthernet|mgmt|Cellular|Serial|Vlan|Multilink|ATM|DIALER|TenGigabitEthernet|TwoGigabitEthernet|FiveGigabitEthernet|TwentyFiveGigabitEthernet|TwentyFiveGigE|HundredGigE|FortyGigabitEthernet|FastEthernet|Loopback|ipsec|gre|VirtualPortGroup|Tunnel)([0-9]*(. ?[1-9][0-9]*)*|[0-9/]+|[0-9]+/[0-9]+/[0-9]+:[0-9]+|[0-9]+/[0-9]+/[0-9]+|[0-9]+/[0-9]+|[0-9]+)",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "description",
- "description": "Description",
- "details": "Interface description",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "poe",
- "description": "Power Over Ethernet",
- "details": "Configure interface as Power-over-Ethernet source",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object",
- "deviceModels": [
- "vedge-100",
- "vedge-ISR1100-4GLTE",
- "vedge-ISR1100X-4G",
- "vedge-100-W2",
- "vedge-100-WM",
- "vedge-100-M2",
- "vedge-100-M",
- "vedge-ISR1100-4G"
- ]
- },
- {
- "key": "address",
- "description": "IPv4 Address/ prefix-length",
- "details": "Assign IPv4 address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "secondary-address",
- "description": "Secondary IP Address",
- "details": "Assign secondary IP addresses",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ip"
- ],
- "objectType": "tree",
- "maxElements": 4,
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "IP Address",
- "details": "IP Address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "dhcp-client",
- "description": "DHCP",
- "details": "Enable DHCP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-distance",
- "description": "DHCP Distance",
- "details": "Set administrative distance for DHCP default route",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65536,
- "default": 1
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "address",
- "description": "IPv6 Address",
- "details": "Assign IPv6 address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv6-prefix"
- },
- "dataPath": [
- "ipv6"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-client",
- "description": "DHCP",
- "details": "Enable DHCPv6",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ipv6"
- ],
- "objectType": "object"
- },
- {
- "key": "secondary-address",
- "description": "Secondary IPv6 Address",
- "details": "Assign secondary IPv6 addresses",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ipv6"
- ],
- "objectType": "tree",
- "maxElements": 2,
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "IPv6 Address",
- "details": "IPv6 Address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv6-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "access-list",
- "description": "ACL IPv6",
- "details": "Apply IPv6 access list",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ipv6"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "direction"
- ],
- "children": [
- {
- "key": "direction",
- "description": "Direction",
- "details": "Direction",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "in",
- "value": "in"
- },
- {
- "key": "out",
- "value": "out"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "acl-name",
- "description": "Access List",
- "details": "Name of access list",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "dhcp-helper",
- "description": "DHCP Helper",
- "details": "List of DHCP IPv4 helper addresses",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "minElements": 1,
- "maxElements": 8,
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "list"
- },
- {
- "key": "dhcp-helper-v6",
- "description": "DHCPv6 Helper",
- "details": "DHCPv6 Helper",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ipv6"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "minElements": 1,
- "maxElements": 8,
- "children": [
- {
- "key": "address",
- "description": "DHCPv6 Helper",
- "details": "DHCPv6 Helper address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv6"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "DHCPv6 Helper VPN",
- "details": "DHCPv6 Helper VPN",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65536
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "tracker",
- "description": "Tracker",
- "details": "Enable tracker for this interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "list"
- },
- {
- "key": "auto-bandwidth-detect",
- "description": "Auto Detect Bandwidth",
- "details": "Interface auto detect bandwidth",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "iperf-server",
- "description": "Iperf Server",
- "details": "Iperf server for auto bandwidth detect",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "nat",
- "description": "NAT",
- "details": "Network Address Translation on this interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "nat-choice",
- "description": "NAT Type",
- "details": "NAT type",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "radioButtonList",
- "default": "interface",
- "values": [
- {
- "label": "Interface",
- "value": "interface"
- },
- {
- "label": "Pool",
- "value": "pool"
- },
- {
- "label": "Loopback",
- "value": "loopback"
- }
- ]
- },
- "dataPath": [
- "nat"
- ],
- "objectType": "object"
- },
- {
- "key": "udp-timeout",
- "description": "UDP Timeout",
- "details": "Set NAT UDP session timeout, in minutes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 8947,
- "default": 1
- },
- "dataPath": [
- "nat"
- ],
- "objectType": "object"
- },
- {
- "key": "tcp-timeout",
- "description": "TCP Timeout",
- "details": "Set NAT TCP session timeout, in minutes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 8947,
- "default": 60
- },
- "dataPath": [
- "nat"
- ],
- "objectType": "object"
- },
- {
- "key": "range-start",
- "description": "NAT Pool Range Start",
- "details": "Starting IP address of NAT pool range",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [
- "nat",
- "natpool"
- ],
- "objectType": "object"
- },
- {
- "key": "range-end",
- "description": "NAT Pool Range End",
- "details": "Ending IP address of NAT pool range",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [
- "nat",
- "natpool"
- ],
- "objectType": "object"
- },
- {
- "key": "overload",
- "description": "Overload",
- "details": "Enable port translation(PAT)",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "nat"
- ],
- "objectType": "object"
- },
- {
- "key": "loopback-interface",
- "description": "NAT Inside Source Loopback Interface",
- "details": "Configure NAT Inside Loopback Interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [
- "nat",
- "interface"
- ],
- "objectType": "object"
- },
- {
- "key": "prefix-length",
- "description": "NAT Pool Prefix Length",
- "details": "Ending IP address of NAT Pool Prefix Length",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number"
- },
- "dataPath": [
- "nat",
- "natpool"
- ],
- "objectType": "object"
- },
- {
- "key": "enable",
- "description": "NAT64",
- "details": "NAT64 on this interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "nat64"
- ],
- "objectType": "node-only"
- },
- {
- "key": "nat64",
- "description": "NAT64",
- "details": "NAT64 on this interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "nat66",
- "description": "NAT66",
- "details": "NAT66 on this interface",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "static-nat66",
- "description": "Static Nat",
- "details": "static NAT",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataPath": [
- "nat66"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "source-prefix",
- "source-vpn-id"
- ],
- "children": [
- {
- "key": "source-prefix",
- "description": "Source Prefix",
- "details": "Source Prefix",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv6-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "translated-source-prefix",
- "description": "Translated Source Prefix",
- "details": "Translated Source Prefix",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-vpn-id",
- "description": "Source VPN ID",
- "details": "Source VPN ID",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "egress-interface",
- "description": "Egress Interface",
- "details": "Egress Interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "static",
- "description": "Static Rules",
- "details": "Configure static NAT entries",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "nat"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "source-ip",
- "translate-ip"
- ],
- "children": [
- {
- "key": "source-ip",
- "description": "Source IP Address",
- "details": "Source IP address to be translated",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "translate-ip",
- "description": "Translated Source IP Address",
- "details": "Statically translated source IP address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "static-nat-direction",
- "description": "Static NAT Direction",
- "details": "Direction of static NAT translation",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "inside",
- "value": "Inside"
- },
- {
- "key": "outside",
- "value": "Outside"
- }
- ],
- "default": "inside"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-vpn",
- "description": "Source VPN ID",
- "details": "Configure VPN ID",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "static-port-forward",
- "description": "Port Forward",
- "details": "Configure Port Forward entries",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "nat"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "source-ip",
- "translate-ip",
- "proto",
- "source-port",
- "translate-port"
- ],
- "children": [
- {
- "key": "source-ip",
- "description": "Source IP Address",
- "details": "Source IP address to be translated",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "translate-ip",
- "description": "Translated Source IP Address",
- "details": "Statically translated source IP address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "static-nat-direction",
- "description": "Static NAT Direction",
- "details": "Direction of static NAT translation",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "inside",
- "value": "Inside"
- },
- {
- "key": "outside",
- "value": "Outside"
- }
- ],
- "default": "inside"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-port",
- "description": "Source Port",
- "details": "Source Port",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "default": 0,
- "min": 0,
- "max": 65535
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "translate-port",
- "description": "Translate Port",
- "details": "Translate Port",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "default": 0,
- "min": 0,
- "max": 65535
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "proto",
- "description": "Protocol",
- "details": "Protocol",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "tcp",
- "value": "TCP"
- },
- {
- "key": "udp",
- "value": "UDP"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "source-vpn",
- "description": "Source VPN ID",
- "details": "Configure VPN ID",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 65530,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "enable-core-region",
- "description": "Enable Core Region",
- "details": "Enable core region",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false",
- "label": {
- "on": "On",
- "off": "Off"
- }
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "core-region",
- "description": "Core Region",
- "details": "Enable core region",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "core",
- "value": "Only in Core Region"
- },
- {
- "key": "core-shared",
- "value": "Shared Between Core and Primary Regions"
- }
- ],
- "default": "core"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "secondary-region",
- "description": "Enable Secondary Region",
- "details": "Enable secondary region",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "off",
- "value": "Off"
- },
- {
- "key": "secondary-only",
- "value": "Only in Secondary Region"
- },
- {
- "key": "secondary-shared",
- "value": "Shared Between Primary and Secondary Regions"
- }
- ],
- "default": "off"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "encapsulation",
- "description": "Encapsulation",
- "details": "Encapsulation for TLOC",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "encap"
- ],
- "children": [
- {
- "key": "encap",
- "description": "Encapsulation",
- "details": "Encapsulation",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "gre",
- "value": "gre"
- },
- {
- "key": "ipsec",
- "value": "ipsec"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "preference",
- "description": "Preference",
- "details": "Set preference for TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "weight",
- "description": "Weight",
- "details": "Set weight for TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "border",
- "description": "Border",
- "details": "Set TLOC as border TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "per-tunnel-qos",
- "description": "Per-tunnel Qos",
- "details": "Per-tunnel Qos",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "per-tunnel-qos-aggregator",
- "description": "Per-tunnel QoS Aggregator",
- "details": "Per-tunnel QoS Aggregator",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mode",
- "description": "Set tunnel QoS mode",
- "details": "Set tunnel QoS mode",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "hub",
- "value": "hub"
- },
- {
- "key": "spoke",
- "value": "spoke"
- }
- ]
- },
- "dataPath": [
- "tunnel-interface",
- "tunnel-qos"
- ],
- "objectType": "object"
- },
- {
- "key": "tunnels-bandwidth",
- "description": "Tunnels Bandwidth Percent",
- "details": "Tunnels Bandwidth Percent",
- "optionType": [
- "constant",
- "variable",
- "notIgnore"
- ],
- "defaultOption": "notIgnore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 99,
- "default": 50
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "group",
- "description": "Groups",
- "details": "List of groups",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "list"
- },
- {
- "key": "value",
- "description": "Color",
- "details": "Set color for TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "mpls",
- "value": "mpls"
- },
- {
- "key": "metro-ethernet",
- "value": "metro-ethernet"
- },
- {
- "key": "biz-internet",
- "value": "biz-internet"
- },
- {
- "key": "public-internet",
- "value": "public-internet"
- },
- {
- "key": "lte",
- "value": "lte"
- },
- {
- "key": "3g",
- "value": "3g"
- },
- {
- "key": "red",
- "value": "red"
- },
- {
- "key": "green",
- "value": "green"
- },
- {
- "key": "blue",
- "value": "blue"
- },
- {
- "key": "gold",
- "value": "gold"
- },
- {
- "key": "silver",
- "value": "silver"
- },
- {
- "key": "bronze",
- "value": "bronze"
- },
- {
- "key": "custom1",
- "value": "custom1"
- },
- {
- "key": "custom2",
- "value": "custom2"
- },
- {
- "key": "custom3",
- "value": "custom3"
- },
- {
- "key": "private1",
- "value": "private1"
- },
- {
- "key": "private2",
- "value": "private2"
- },
- {
- "key": "private3",
- "value": "private3"
- },
- {
- "key": "private4",
- "value": "private4"
- },
- {
- "key": "private5",
- "value": "private5"
- },
- {
- "key": "private6",
- "value": "private6"
- }
- ],
- "default": "default"
- },
- "dataPath": [
- "tunnel-interface",
- "color"
- ],
- "objectType": "object"
- },
- {
- "key": "max-control-connections",
- "description": "Maximum Control Connections",
- "details": "Set the maximum number of control connections for this TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 100
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "control-connections",
- "description": "Control Connection",
- "details": "Allow Control Connection",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object",
- "objectStatus": "deprecated"
- },
- {
- "key": "vbond-as-stun-server",
- "description": "vBond As Stun Server",
- "details": "Put this wan interface in STUN mode only",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "exclude-controller-group-list",
- "description": "Exclude Controller Group List",
- "details": "Exclude the following controller groups defined in this list",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 100
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "list"
- },
- {
- "key": "vmanage-connection-preference",
- "description": "vManage Connection Preference",
- "details": "Set interface preference for control connection to vManage <0..8>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 8,
- "default": 5
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "port-hop",
- "description": "Port Hop",
- "details": "Disallow port hopping on the tunnel interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "restrict",
- "description": "Restrict",
- "details": "Restrict this TLOC behavior",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "color"
- ],
- "objectType": "node-only"
- },
- {
- "key": "dst-ip",
- "description": "GRE tunnel destination IP",
- "details": "Extend the TLOC to a remote node over GRE tunnel",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [
- "tunnel-interface",
- "tloc-extension-gre-to"
- ],
- "objectType": "object"
- },
- {
- "key": "carrier",
- "description": "Carrier",
- "details": "Set carrier for TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "carrier1",
- "value": "carrier1"
- },
- {
- "key": "carrier2",
- "value": "carrier2"
- },
- {
- "key": "carrier3",
- "value": "carrier3"
- },
- {
- "key": "carrier4",
- "value": "carrier4"
- },
- {
- "key": "carrier5",
- "value": "carrier5"
- },
- {
- "key": "carrier6",
- "value": "carrier6"
- },
- {
- "key": "carrier7",
- "value": "carrier7"
- },
- {
- "key": "carrier8",
- "value": "carrier8"
- }
- ],
- "default": "default"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "nat-refresh-interval",
- "description": "NAT Refresh Interval",
- "details": "Set time period of nat refresh packets <1...60> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 60,
- "default": 5
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "hello-interval",
- "description": "Hello Interval",
- "details": "Set time period of control hello packets <100..600000> milli seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 100,
- "max": 600000,
- "default": 1000
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "hello-tolerance",
- "description": "Hello Tolerance",
- "details": "Set tolerance of control hello packets <12..6000> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 12,
- "max": 6000,
- "default": 12
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "bind",
- "description": "Bind Loopback Tunnel",
- "details": "Bind loopback tunnel interface to a physical interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "last-resort-circuit",
- "description": "Last-Resort Circuit",
- "details": "Set TLOC as last resort",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "low-bandwidth-link",
- "description": "Low-Bandwidth Link",
- "details": "Set the interface as a low-bandwidth circuit",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "tunnel-tcp-mss-adjust",
- "description": "Tunnel TCP MSS",
- "details": "Tunnel TCP MSS on SYN packets, in bytes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 500,
- "max": 1460
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "clear-dont-fragment",
- "description": "Clear-Dont-Fragment",
- "details": "Enable clear dont fragment (Currently Only SDWAN Tunnel Interface)",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "propagate-sgt",
- "description": "CTS SGT Propagation",
- "details": "CTS SGT Propagation configuration",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "network-broadcast",
- "description": "Network Broadcast",
- "details": "Accept and respond to network-prefix-directed broadcasts)",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "all",
- "description": "All",
- "details": "Allow all traffic. Overrides all other allow-service options if allow-service all is set",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "bgp",
- "description": "BGP",
- "details": "Allow/deny BGP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp",
- "description": "DHCP",
- "details": "Allow/Deny DHCP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "dns",
- "description": "DNS",
- "details": "Allow/Deny DNS",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "icmp",
- "description": "ICMP",
- "details": "Allow/Deny ICMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "sshd",
- "description": "SSH",
- "details": "Allow/Deny SSH",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "netconf",
- "description": "NETCONF",
- "details": "Allow/Deny NETCONF",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "ntp",
- "description": "NTP",
- "details": "Allow/Deny NTP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "ospf",
- "description": "OSPF",
- "details": "Allow/Deny OSPF",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "stun",
- "description": "STUN",
- "details": "Allow/Deny STUN",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "snmp",
- "description": "SNMP",
- "details": "Allow/Deny SNMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "https",
- "description": "HTTPS",
- "details": "Allow/Deny Https",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "media-type",
- "description": "Media type",
- "details": "Media type",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "auto-select",
- "value": "auto-select"
- },
- {
- "key": "rj45",
- "value": "rj45"
- },
- {
- "key": "sfp",
- "value": "sfp"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "intrf-mtu",
- "description": "Interface MTU",
- "details": "Interface MTU GigabitEthernet0 <1500..1518>, Other GigabitEthernet <1500..9216> in bytes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1500,
- "max": 9216,
- "default": 1500
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mtu",
- "description": "IP MTU",
- "details": "IP MTU for GigabitEthernet main <576..Interface MTU>, GigabitEthernet subinterface <576..9216>, Other Interfaces <576..2000> in bytes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 576,
- "max": 9216,
- "default": 1500
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tcp-mss-adjust",
- "description": "TCP MSS",
- "details": "TCP MSS on SYN packets, in bytes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 500,
- "max": 1460
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tloc-extension",
- "description": "TLOC Extension",
- "details": "Extends a local TLOC to a remote node only for vpn 0",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "tlocExtension"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "load-interval",
- "description": "Load Interval",
- "details": "Interval for interface load calculation",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "numberFixedInterval",
- "interval": 30,
- "min": 30,
- "max": 600,
- "default": 30
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "src-ip",
- "description": "GRE tunnel source IP",
- "details": "Extend remote TLOC over a GRE tunnel to a local WAN interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [
- "tloc-extension-gre-from"
- ],
- "objectType": "object"
- },
- {
- "key": "xconnect",
- "description": "Xconnect",
- "details": "Extend remote TLOC over a GRE tunnel to a local WAN interface",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "xConnect"
- },
- "dataPath": [
- "tloc-extension-gre-from"
- ],
- "objectType": "object"
- },
- {
- "key": "mac-address",
- "description": "MAC Address",
- "details": "Set MAC-layer address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "mac"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "speed",
- "description": "Speed",
- "details": "Set interface speed",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "10",
- "value": "10"
- },
- {
- "key": "100",
- "value": "100"
- },
- {
- "key": "1000",
- "value": "1000"
- },
- {
- "key": "2500",
- "value": "2500"
- },
- {
- "key": "10000",
- "value": "10000"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "duplex",
- "description": "Duplex",
- "details": "Duplex mode",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "full",
- "value": "full"
- },
- {
- "key": "half",
- "value": "half"
- },
- {
- "key": "auto",
- "value": "auto"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "shutdown",
- "description": "Shutdown",
- "details": "Administrative state",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "arp-timeout",
- "description": "ARP Timeout",
- "details": "Timeout value for dynamically learned ARP entries, <0..2678400> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 2147483,
- "default": 1200
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "autonegotiate",
- "description": "Autonegotiation",
- "details": "Link autonegotiation",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ip-directed-broadcast",
- "description": "IP Directed-Broadcast",
- "details": "IP Directed-Broadcast",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "icmp-redirect-disable",
- "description": "ICMP/ICMPv6 Redirect Disable",
- "details": "Set this option to disable the icmp/icmpv6 redirect packets",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true",
- "label": {
- "on": "On",
- "off": "Off"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "qos-adaptive",
- "description": "Adaptive QoS",
- "details": "Adaptive QoS",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "period",
- "description": "Adapt Period(Minutes)",
- "details": "Periodic timer for adaptive QoS in minutes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 720,
- "default": 15
- },
- "dataPath": [
- "qos-adaptive"
- ],
- "objectType": "object"
- },
- {
- "key": "bandwidth-down",
- "description": "Default Downstream (Kbps)",
- "details": "Adaptive QoS default downstream bandwidth",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [
- "qos-adaptive",
- "downstream"
- ],
- "objectType": "object"
- },
- {
- "key": "dmin",
- "description": "Min Downstream (Kbps)",
- "details": "Downstream min bandwidth limit",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [
- "qos-adaptive",
- "downstream",
- "range"
- ],
- "objectType": "object"
- },
- {
- "key": "dmax",
- "description": "Max Downstream (Kbps)",
- "details": "Downstream max bandwidth limit",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [
- "qos-adaptive",
- "downstream",
- "range"
- ],
- "objectType": "object"
- },
- {
- "key": "bandwidth-up",
- "description": "Default Upstream (Kbps)",
- "details": "Adaptive QoS default upstream bandwidth",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [
- "qos-adaptive",
- "upstream"
- ],
- "objectType": "object"
- },
- {
- "key": "umin",
- "description": "Min Upstream (Kbps)",
- "details": "Upstream min bandwidth limit",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [
- "qos-adaptive",
- "upstream",
- "range"
- ],
- "objectType": "object"
- },
- {
- "key": "umax",
- "description": "Max Upstream (Kbps)",
- "details": "Upstream max bandwidth limit",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [
- "qos-adaptive",
- "upstream",
- "range"
- ],
- "objectType": "object"
- },
- {
- "key": "shaping-rate",
- "description": "Shaping Rate (Kbps)",
- "details": "1ge interfaces: [0..1000000]kbps; 10ge interfaces: [0..10000000]kbps",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 8,
- "max": 100000000
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "qos-map",
- "description": "QoS Map",
- "details": "Name of QoS map",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "qos-map-vpn",
- "description": "VPN QoS Map",
- "details": "Name of VPN QoS map",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "service-provider",
- "description": "Service Provider",
- "details": "Service Provider Name",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "min": 1,
- "max": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "bandwidth-upstream",
- "description": "Bandwidth Upstream",
- "details": "Interface upstream bandwidth capacity, in kbps",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 2147483647
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "bandwidth-downstream",
- "description": "Bandwidth Downstream",
- "details": "Interface downstream bandwidth capacity, in kbps",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 2147483647
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "block-non-source-ip",
- "description": "Block Non Source IP",
- "details": "Block packets originating from IP address that is not from this source",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "rule-name",
- "description": "Rewrite Rule",
- "details": "Name of rewrite rule",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [
- "rewrite-rule"
- ],
- "objectType": "object"
- },
- {
- "key": "access-list",
- "description": "ACL",
- "details": "Apply ACL",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "direction"
- ],
- "children": [
- {
- "key": "direction",
- "description": "Direction",
- "details": "Direction",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "in",
- "value": "in"
- },
- {
- "key": "out",
- "value": "out"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "acl-name",
- "description": "Access list",
- "details": "Name of access list",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "ip",
- "description": "Static ARP",
- "details": "Configure static ARP entries",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "arp"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "addr"
- ],
- "children": [
- {
- "key": "addr",
- "description": "IP Address",
- "details": "IP Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mac",
- "description": "MAC address",
- "details": "MAC address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "mac"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "vrrp",
- "description": "VRRP",
- "details": "Enable VRRP",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "grp-id"
- ],
- "children": [
- {
- "key": "grp-id",
- "description": "Group ID",
- "details": "Group ID",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Priority",
- "details": "Set priority",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 254,
- "default": 100
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "timer",
- "description": "Timer (milliseconds)",
- "details": "Timer interval for successive advertisements, in milliseconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 100,
- "max": 40950,
- "default": 1000
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "track-omp",
- "description": "Track OMP",
- "details": "Track OMP status",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "track-prefix-list",
- "description": "Track Prefix List",
- "details": "Track Prefix List",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "address",
- "description": "IP Address",
- "details": "Assign IP Address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [
- "ipv4"
- ],
- "objectType": "object"
- },
- {
- "key": "ipv4-secondary",
- "description": "VRRP Secondary IP address",
- "details": "VRRP Secondary IP address",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "VRRP Secondary IP address",
- "details": "VRRP Secondary IP address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "tloc-change-pref",
- "description": "TLOC Preference Change",
- "details": "change TLOC preference",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "value",
- "description": "TLOC Preference Change Value",
- "details": "Set tloc preference change value",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tracking-object",
- "description": "Object Tracker",
- "details": "tracking object for VRRP configuration",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "name"
- ],
- "children": [
- {
- "key": "name",
- "description": "Tracker ID",
- "details": "Tracker ID",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 1000
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "track-action",
- "description": "Action",
- "details": "Track Action",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "radioButtonList",
- "default": "decrement",
- "values": [
- {
- "label": "Decrement",
- "value": "decrement"
- },
- {
- "label": "Shutdown",
- "value": "shutdown"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "decrement",
- "description": "Decrement Value",
- "details": "Decrement Value for VRRP priority",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
- },
- {
- "key": "ipv6-vrrp",
- "description": "VRRP",
- "details": "Enable VRRP",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "grp-id"
- ],
- "children": [
- {
- "key": "grp-id",
- "description": "Group ID",
- "details": "Group ID",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "priority",
- "description": "Priority",
- "details": "Set priority",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 254,
- "default": 100
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "timer",
- "description": "Timer (milliseconds)",
- "details": "Timer interval for successive advertisements, in milliseconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 100,
- "max": 40950,
- "default": 1000
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "track-omp",
- "description": "Track OMP",
- "details": "Track OMP status",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "track-prefix-list",
- "description": "Track Prefix List",
- "details": "Track Prefix List",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "regex": "^[a-zA-Z0-9-_]+$",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ipv6",
- "description": "IPv6",
- "details": "IPv6 VRRP",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "ipv6-link-local"
- ],
- "children": [
- {
- "key": "ipv6-link-local",
- "description": "Link Local IPv6 Address",
- "details": "Use link-local IPv6 Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv6"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "prefix",
- "description": "Global IPv6 Prefix",
- "details": "Assign Global IPv6 Prefix",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv6-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
- },
- {
- "key": "sgt",
- "description": "Propagate",
- "details": "Enable/Disable CTS SGT propagation on an interface.",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "trustsec",
- "propagate"
- ],
- "objectType": "object"
- },
- {
- "key": "sgt",
- "description": "Security Group Tag",
- "details": "SGT value between 2 and 65519.",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 2,
- "max": 65519
- },
- "dataPath": [
- "trustsec",
- "static"
- ],
- "objectType": "object"
- },
- {
- "key": "trusted",
- "description": "Trusted",
- "details": "Indicates that the interface is trustworthy for CTS.",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "trustsec",
- "static"
- ],
- "objectType": "node-only"
- },
- {
- "key": "enable",
- "description": "Enable SGT Propagation",
- "details": "Enables the interface for CTS SGT authorization and forwarding.",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "trustsec"
- ],
- "objectType": "object"
- },
- {
- "key": "enable",
- "description": "Enable Enforcement",
- "details": "Enable/Disable SGT Enforcement on an interface",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean"
- },
- "dataPath": [
- "trustsec",
- "enforcement"
- ],
- "objectType": "object"
- },
- {
- "key": "sgt",
- "description": "Enforcement Security Group Tag",
- "details": "SGT value between 2 and 65519.",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 2,
- "max": 65519
- },
- "dataPath": [
- "trustsec",
- "enforcement"
- ],
- "objectType": "object"
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/omp-vsmart.json b/catalystwan/tests/templates/schemas/omp-vsmart.json
index 5bc584da..5489450b 100644
--- a/catalystwan/tests/templates/schemas/omp-vsmart.json
+++ b/catalystwan/tests/templates/schemas/omp-vsmart.json
@@ -197,26 +197,6 @@
"outbound"
],
"objectType": "object"
- },
- {
- "key": "tloc-color",
- "description": "Enable Filtering Route Updates Based on TLOC-Color",
- "details": "Filter routes based on TLOC color",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "filter-route",
- "outbound"
- ],
- "objectType": "object"
}
]
}
diff --git a/catalystwan/tests/templates/schemas/security-vsmart.json b/catalystwan/tests/templates/schemas/security-vsmart.json
deleted file mode 100644
index 9d565f3c..00000000
--- a/catalystwan/tests/templates/schemas/security-vsmart.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "name": "Security",
- "xmlPath": [],
- "xmlRootTag": "security",
- "nameSpace": "http://viptela.com/security",
- "fields": [
- {
- "key": "protocol",
- "description": "Protocol",
- "details": "Set protocol for control-plane connections",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "dtls",
- "value": "DTLS"
- },
- {
- "key": "tls",
- "value": "TLS"
- }
- ],
- "default": "dtls"
- },
- "dataPath": [
- "control"
- ],
- "objectType": "object"
- },
- {
- "key": "tls-port",
- "description": "Control TLS Port",
- "details": "Set TLS port number",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1025,
- "max": 65535,
- "default": 23456
- },
- "dataPath": [
- "control"
- ],
- "objectType": "object"
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/system-vsmart.json b/catalystwan/tests/templates/schemas/system-vsmart.json
deleted file mode 100644
index 80d2f698..00000000
--- a/catalystwan/tests/templates/schemas/system-vsmart.json
+++ /dev/null
@@ -1,2585 +0,0 @@
-{
- "name": "System",
- "xmlPath": [],
- "xmlRootTag": "system",
- "nameSpace": "http://viptela.com/system",
- "fields": [
- {
- "key": "timezone",
- "description": "Timezone",
- "details": "Set the timezone",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "Europe/Andorra",
- "value": "Europe/Andorra"
- },
- {
- "key": "Asia/Dubai",
- "value": "Asia/Dubai"
- },
- {
- "key": "Asia/Kabul",
- "value": "Asia/Kabul"
- },
- {
- "key": "America/Antigua",
- "value": "America/Antigua"
- },
- {
- "key": "America/Anguilla",
- "value": "America/Anguilla"
- },
- {
- "key": "Europe/Tirane",
- "value": "Europe/Tirane"
- },
- {
- "key": "Asia/Yerevan",
- "value": "Asia/Yerevan"
- },
- {
- "key": "Africa/Luanda",
- "value": "Africa/Luanda"
- },
- {
- "key": "Antarctica/McMurdo",
- "value": "Antarctica/McMurdo"
- },
- {
- "key": "Antarctica/Rothera",
- "value": "Antarctica/Rothera"
- },
- {
- "key": "Antarctica/Palmer",
- "value": "Antarctica/Palmer"
- },
- {
- "key": "Antarctica/Mawson",
- "value": "Antarctica/Mawson"
- },
- {
- "key": "Antarctica/Davis",
- "value": "Antarctica/Davis"
- },
- {
- "key": "Antarctica/Casey",
- "value": "Antarctica/Casey"
- },
- {
- "key": "Antarctica/Vostok",
- "value": "Antarctica/Vostok"
- },
- {
- "key": "Antarctica/DumontDUrville",
- "value": "Antarctica/DumontDUrville"
- },
- {
- "key": "Antarctica/Syowa",
- "value": "Antarctica/Syowa"
- },
- {
- "key": "America/Argentina/Buenos_Aires",
- "value": "America/Argentina/Buenos_Aires"
- },
- {
- "key": "America/Argentina/Cordoba",
- "value": "America/Argentina/Cordoba"
- },
- {
- "key": "America/Argentina/Salta",
- "value": "America/Argentina/Salta"
- },
- {
- "key": "America/Argentina/Jujuy",
- "value": "America/Argentina/Jujuy"
- },
- {
- "key": "America/Argentina/Tucuman",
- "value": "America/Argentina/Tucuman"
- },
- {
- "key": "America/Argentina/Catamarca",
- "value": "America/Argentina/Catamarca"
- },
- {
- "key": "America/Argentina/La_Rioja",
- "value": "America/Argentina/La_Rioja"
- },
- {
- "key": "America/Argentina/San_Juan",
- "value": "America/Argentina/San_Juan"
- },
- {
- "key": "America/Argentina/Mendoza",
- "value": "America/Argentina/Mendoza"
- },
- {
- "key": "America/Argentina/San_Luis",
- "value": "America/Argentina/San_Luis"
- },
- {
- "key": "America/Argentina/Rio_Gallegos",
- "value": "America/Argentina/Rio_Gallegos"
- },
- {
- "key": "America/Argentina/Ushuaia",
- "value": "America/Argentina/Ushuaia"
- },
- {
- "key": "Pacific/Pago_Pago",
- "value": "Pacific/Pago_Pago"
- },
- {
- "key": "Europe/Vienna",
- "value": "Europe/Vienna"
- },
- {
- "key": "Australia/Lord_Howe",
- "value": "Australia/Lord_Howe"
- },
- {
- "key": "Antarctica/Macquarie",
- "value": "Antarctica/Macquarie"
- },
- {
- "key": "Australia/Hobart",
- "value": "Australia/Hobart"
- },
- {
- "key": "Australia/Currie",
- "value": "Australia/Currie"
- },
- {
- "key": "Australia/Melbourne",
- "value": "Australia/Melbourne"
- },
- {
- "key": "Australia/Sydney",
- "value": "Australia/Sydney"
- },
- {
- "key": "Australia/Broken_Hill",
- "value": "Australia/Broken_Hill"
- },
- {
- "key": "Australia/Brisbane",
- "value": "Australia/Brisbane"
- },
- {
- "key": "Australia/Lindeman",
- "value": "Australia/Lindeman"
- },
- {
- "key": "Australia/Adelaide",
- "value": "Australia/Adelaide"
- },
- {
- "key": "Australia/Darwin",
- "value": "Australia/Darwin"
- },
- {
- "key": "Australia/Perth",
- "value": "Australia/Perth"
- },
- {
- "key": "Australia/Eucla",
- "value": "Australia/Eucla"
- },
- {
- "key": "America/Aruba",
- "value": "America/Aruba"
- },
- {
- "key": "Europe/Mariehamn",
- "value": "Europe/Mariehamn"
- },
- {
- "key": "Asia/Baku",
- "value": "Asia/Baku"
- },
- {
- "key": "Europe/Sarajevo",
- "value": "Europe/Sarajevo"
- },
- {
- "key": "America/Barbados",
- "value": "America/Barbados"
- },
- {
- "key": "Asia/Dhaka",
- "value": "Asia/Dhaka"
- },
- {
- "key": "Europe/Brussels",
- "value": "Europe/Brussels"
- },
- {
- "key": "Africa/Ouagadougou",
- "value": "Africa/Ouagadougou"
- },
- {
- "key": "Europe/Sofia",
- "value": "Europe/Sofia"
- },
- {
- "key": "Asia/Bahrain",
- "value": "Asia/Bahrain"
- },
- {
- "key": "Africa/Bujumbura",
- "value": "Africa/Bujumbura"
- },
- {
- "key": "Africa/Porto-Novo",
- "value": "Africa/Porto-Novo"
- },
- {
- "key": "America/St_Barthelemy",
- "value": "America/St_Barthelemy"
- },
- {
- "key": "Atlantic/Bermuda",
- "value": "Atlantic/Bermuda"
- },
- {
- "key": "Asia/Brunei",
- "value": "Asia/Brunei"
- },
- {
- "key": "America/La_Paz",
- "value": "America/La_Paz"
- },
- {
- "key": "America/Kralendijk",
- "value": "America/Kralendijk"
- },
- {
- "key": "America/Noronha",
- "value": "America/Noronha"
- },
- {
- "key": "America/Belem",
- "value": "America/Belem"
- },
- {
- "key": "America/Fortaleza",
- "value": "America/Fortaleza"
- },
- {
- "key": "America/Recife",
- "value": "America/Recife"
- },
- {
- "key": "America/Araguaina",
- "value": "America/Araguaina"
- },
- {
- "key": "America/Maceio",
- "value": "America/Maceio"
- },
- {
- "key": "America/Bahia",
- "value": "America/Bahia"
- },
- {
- "key": "America/Sao_Paulo",
- "value": "America/Sao_Paulo"
- },
- {
- "key": "America/Campo_Grande",
- "value": "America/Campo_Grande"
- },
- {
- "key": "America/Cuiaba",
- "value": "America/Cuiaba"
- },
- {
- "key": "America/Santarem",
- "value": "America/Santarem"
- },
- {
- "key": "America/Porto_Velho",
- "value": "America/Porto_Velho"
- },
- {
- "key": "America/Boa_Vista",
- "value": "America/Boa_Vista"
- },
- {
- "key": "America/Manaus",
- "value": "America/Manaus"
- },
- {
- "key": "America/Eirunepe",
- "value": "America/Eirunepe"
- },
- {
- "key": "America/Rio_Branco",
- "value": "America/Rio_Branco"
- },
- {
- "key": "America/Nassau",
- "value": "America/Nassau"
- },
- {
- "key": "Asia/Thimphu",
- "value": "Asia/Thimphu"
- },
- {
- "key": "Africa/Gaborone",
- "value": "Africa/Gaborone"
- },
- {
- "key": "Europe/Minsk",
- "value": "Europe/Minsk"
- },
- {
- "key": "America/Belize",
- "value": "America/Belize"
- },
- {
- "key": "America/St_Johns",
- "value": "America/St_Johns"
- },
- {
- "key": "America/Halifax",
- "value": "America/Halifax"
- },
- {
- "key": "America/Glace_Bay",
- "value": "America/Glace_Bay"
- },
- {
- "key": "America/Moncton",
- "value": "America/Moncton"
- },
- {
- "key": "America/Goose_Bay",
- "value": "America/Goose_Bay"
- },
- {
- "key": "America/Blanc-Sablon",
- "value": "America/Blanc-Sablon"
- },
- {
- "key": "America/Toronto",
- "value": "America/Toronto"
- },
- {
- "key": "America/Nipigon",
- "value": "America/Nipigon"
- },
- {
- "key": "America/Thunder_Bay",
- "value": "America/Thunder_Bay"
- },
- {
- "key": "America/Iqaluit",
- "value": "America/Iqaluit"
- },
- {
- "key": "America/Pangnirtung",
- "value": "America/Pangnirtung"
- },
- {
- "key": "America/Resolute",
- "value": "America/Resolute"
- },
- {
- "key": "America/Atikokan",
- "value": "America/Atikokan"
- },
- {
- "key": "America/Rankin_Inlet",
- "value": "America/Rankin_Inlet"
- },
- {
- "key": "America/Winnipeg",
- "value": "America/Winnipeg"
- },
- {
- "key": "America/Rainy_River",
- "value": "America/Rainy_River"
- },
- {
- "key": "America/Regina",
- "value": "America/Regina"
- },
- {
- "key": "America/Swift_Current",
- "value": "America/Swift_Current"
- },
- {
- "key": "America/Edmonton",
- "value": "America/Edmonton"
- },
- {
- "key": "America/Cambridge_Bay",
- "value": "America/Cambridge_Bay"
- },
- {
- "key": "America/Yellowknife",
- "value": "America/Yellowknife"
- },
- {
- "key": "America/Inuvik",
- "value": "America/Inuvik"
- },
- {
- "key": "America/Creston",
- "value": "America/Creston"
- },
- {
- "key": "America/Dawson_Creek",
- "value": "America/Dawson_Creek"
- },
- {
- "key": "America/Vancouver",
- "value": "America/Vancouver"
- },
- {
- "key": "America/Whitehorse",
- "value": "America/Whitehorse"
- },
- {
- "key": "America/Dawson",
- "value": "America/Dawson"
- },
- {
- "key": "Indian/Cocos",
- "value": "Indian/Cocos"
- },
- {
- "key": "Africa/Kinshasa",
- "value": "Africa/Kinshasa"
- },
- {
- "key": "Africa/Lubumbashi",
- "value": "Africa/Lubumbashi"
- },
- {
- "key": "Africa/Bangui",
- "value": "Africa/Bangui"
- },
- {
- "key": "Africa/Brazzaville",
- "value": "Africa/Brazzaville"
- },
- {
- "key": "Europe/Zurich",
- "value": "Europe/Zurich"
- },
- {
- "key": "Africa/Abidjan",
- "value": "Africa/Abidjan"
- },
- {
- "key": "Pacific/Rarotonga",
- "value": "Pacific/Rarotonga"
- },
- {
- "key": "America/Santiago",
- "value": "America/Santiago"
- },
- {
- "key": "Pacific/Easter",
- "value": "Pacific/Easter"
- },
- {
- "key": "Africa/Douala",
- "value": "Africa/Douala"
- },
- {
- "key": "Asia/Shanghai",
- "value": "Asia/Shanghai"
- },
- {
- "key": "Asia/Harbin",
- "value": "Asia/Harbin"
- },
- {
- "key": "Asia/Chongqing",
- "value": "Asia/Chongqing"
- },
- {
- "key": "Asia/Urumqi",
- "value": "Asia/Urumqi"
- },
- {
- "key": "Asia/Kashgar",
- "value": "Asia/Kashgar"
- },
- {
- "key": "America/Bogota",
- "value": "America/Bogota"
- },
- {
- "key": "America/Costa_Rica",
- "value": "America/Costa_Rica"
- },
- {
- "key": "America/Havana",
- "value": "America/Havana"
- },
- {
- "key": "Atlantic/Cape_Verde",
- "value": "Atlantic/Cape_Verde"
- },
- {
- "key": "America/Curacao",
- "value": "America/Curacao"
- },
- {
- "key": "Indian/Christmas",
- "value": "Indian/Christmas"
- },
- {
- "key": "Asia/Nicosia",
- "value": "Asia/Nicosia"
- },
- {
- "key": "Europe/Prague",
- "value": "Europe/Prague"
- },
- {
- "key": "Europe/Berlin",
- "value": "Europe/Berlin"
- },
- {
- "key": "Europe/Busingen",
- "value": "Europe/Busingen"
- },
- {
- "key": "Africa/Djibouti",
- "value": "Africa/Djibouti"
- },
- {
- "key": "Europe/Copenhagen",
- "value": "Europe/Copenhagen"
- },
- {
- "key": "America/Dominica",
- "value": "America/Dominica"
- },
- {
- "key": "America/Santo_Domingo",
- "value": "America/Santo_Domingo"
- },
- {
- "key": "Africa/Algiers",
- "value": "Africa/Algiers"
- },
- {
- "key": "America/Guayaquil",
- "value": "America/Guayaquil"
- },
- {
- "key": "Pacific/Galapagos",
- "value": "Pacific/Galapagos"
- },
- {
- "key": "Europe/Tallinn",
- "value": "Europe/Tallinn"
- },
- {
- "key": "Africa/Cairo",
- "value": "Africa/Cairo"
- },
- {
- "key": "Africa/El_Aaiun",
- "value": "Africa/El_Aaiun"
- },
- {
- "key": "Africa/Asmara",
- "value": "Africa/Asmara"
- },
- {
- "key": "Europe/Madrid",
- "value": "Europe/Madrid"
- },
- {
- "key": "Africa/Ceuta",
- "value": "Africa/Ceuta"
- },
- {
- "key": "Atlantic/Canary",
- "value": "Atlantic/Canary"
- },
- {
- "key": "Africa/Addis_Ababa",
- "value": "Africa/Addis_Ababa"
- },
- {
- "key": "Europe/Helsinki",
- "value": "Europe/Helsinki"
- },
- {
- "key": "Pacific/Fiji",
- "value": "Pacific/Fiji"
- },
- {
- "key": "Atlantic/Stanley",
- "value": "Atlantic/Stanley"
- },
- {
- "key": "Pacific/Chuuk",
- "value": "Pacific/Chuuk"
- },
- {
- "key": "Pacific/Pohnpei",
- "value": "Pacific/Pohnpei"
- },
- {
- "key": "Pacific/Kosrae",
- "value": "Pacific/Kosrae"
- },
- {
- "key": "Atlantic/Faroe",
- "value": "Atlantic/Faroe"
- },
- {
- "key": "Europe/Paris",
- "value": "Europe/Paris"
- },
- {
- "key": "Africa/Libreville",
- "value": "Africa/Libreville"
- },
- {
- "key": "Europe/London",
- "value": "Europe/London"
- },
- {
- "key": "America/Grenada",
- "value": "America/Grenada"
- },
- {
- "key": "Asia/Tbilisi",
- "value": "Asia/Tbilisi"
- },
- {
- "key": "America/Cayenne",
- "value": "America/Cayenne"
- },
- {
- "key": "Europe/Guernsey",
- "value": "Europe/Guernsey"
- },
- {
- "key": "Africa/Accra",
- "value": "Africa/Accra"
- },
- {
- "key": "Europe/Gibraltar",
- "value": "Europe/Gibraltar"
- },
- {
- "key": "America/Godthab",
- "value": "America/Godthab"
- },
- {
- "key": "America/Danmarkshavn",
- "value": "America/Danmarkshavn"
- },
- {
- "key": "America/Scoresbysund",
- "value": "America/Scoresbysund"
- },
- {
- "key": "America/Thule",
- "value": "America/Thule"
- },
- {
- "key": "Africa/Banjul",
- "value": "Africa/Banjul"
- },
- {
- "key": "Africa/Conakry",
- "value": "Africa/Conakry"
- },
- {
- "key": "America/Guadeloupe",
- "value": "America/Guadeloupe"
- },
- {
- "key": "Africa/Malabo",
- "value": "Africa/Malabo"
- },
- {
- "key": "Europe/Athens",
- "value": "Europe/Athens"
- },
- {
- "key": "Atlantic/South_Georgia",
- "value": "Atlantic/South_Georgia"
- },
- {
- "key": "America/Guatemala",
- "value": "America/Guatemala"
- },
- {
- "key": "Pacific/Guam",
- "value": "Pacific/Guam"
- },
- {
- "key": "Africa/Bissau",
- "value": "Africa/Bissau"
- },
- {
- "key": "America/Guyana",
- "value": "America/Guyana"
- },
- {
- "key": "Asia/Hong_Kong",
- "value": "Asia/Hong_Kong"
- },
- {
- "key": "America/Tegucigalpa",
- "value": "America/Tegucigalpa"
- },
- {
- "key": "Europe/Zagreb",
- "value": "Europe/Zagreb"
- },
- {
- "key": "America/Port-au-Prince",
- "value": "America/Port-au-Prince"
- },
- {
- "key": "Europe/Budapest",
- "value": "Europe/Budapest"
- },
- {
- "key": "Asia/Jakarta",
- "value": "Asia/Jakarta"
- },
- {
- "key": "Asia/Pontianak",
- "value": "Asia/Pontianak"
- },
- {
- "key": "Asia/Makassar",
- "value": "Asia/Makassar"
- },
- {
- "key": "Asia/Jayapura",
- "value": "Asia/Jayapura"
- },
- {
- "key": "Europe/Dublin",
- "value": "Europe/Dublin"
- },
- {
- "key": "Asia/Jerusalem",
- "value": "Asia/Jerusalem"
- },
- {
- "key": "Europe/Isle_of_Man",
- "value": "Europe/Isle_of_Man"
- },
- {
- "key": "Asia/Kolkata",
- "value": "Asia/Kolkata"
- },
- {
- "key": "Indian/Chagos",
- "value": "Indian/Chagos"
- },
- {
- "key": "Asia/Baghdad",
- "value": "Asia/Baghdad"
- },
- {
- "key": "Asia/Tehran",
- "value": "Asia/Tehran"
- },
- {
- "key": "Atlantic/Reykjavik",
- "value": "Atlantic/Reykjavik"
- },
- {
- "key": "Europe/Rome",
- "value": "Europe/Rome"
- },
- {
- "key": "Europe/Jersey",
- "value": "Europe/Jersey"
- },
- {
- "key": "America/Jamaica",
- "value": "America/Jamaica"
- },
- {
- "key": "Asia/Amman",
- "value": "Asia/Amman"
- },
- {
- "key": "Asia/Tokyo",
- "value": "Asia/Tokyo"
- },
- {
- "key": "Africa/Nairobi",
- "value": "Africa/Nairobi"
- },
- {
- "key": "Asia/Bishkek",
- "value": "Asia/Bishkek"
- },
- {
- "key": "Asia/Phnom_Penh",
- "value": "Asia/Phnom_Penh"
- },
- {
- "key": "Pacific/Tarawa",
- "value": "Pacific/Tarawa"
- },
- {
- "key": "Pacific/Enderbury",
- "value": "Pacific/Enderbury"
- },
- {
- "key": "Pacific/Kiritimati",
- "value": "Pacific/Kiritimati"
- },
- {
- "key": "Indian/Comoro",
- "value": "Indian/Comoro"
- },
- {
- "key": "America/St_Kitts",
- "value": "America/St_Kitts"
- },
- {
- "key": "Asia/Pyongyang",
- "value": "Asia/Pyongyang"
- },
- {
- "key": "Asia/Seoul",
- "value": "Asia/Seoul"
- },
- {
- "key": "Asia/Kuwait",
- "value": "Asia/Kuwait"
- },
- {
- "key": "America/Cayman",
- "value": "America/Cayman"
- },
- {
- "key": "Asia/Almaty",
- "value": "Asia/Almaty"
- },
- {
- "key": "Asia/Qyzylorda",
- "value": "Asia/Qyzylorda"
- },
- {
- "key": "Asia/Aqtobe",
- "value": "Asia/Aqtobe"
- },
- {
- "key": "Asia/Aqtau",
- "value": "Asia/Aqtau"
- },
- {
- "key": "Asia/Oral",
- "value": "Asia/Oral"
- },
- {
- "key": "Asia/Vientiane",
- "value": "Asia/Vientiane"
- },
- {
- "key": "Asia/Beirut",
- "value": "Asia/Beirut"
- },
- {
- "key": "America/St_Lucia",
- "value": "America/St_Lucia"
- },
- {
- "key": "Europe/Vaduz",
- "value": "Europe/Vaduz"
- },
- {
- "key": "Asia/Colombo",
- "value": "Asia/Colombo"
- },
- {
- "key": "Africa/Monrovia",
- "value": "Africa/Monrovia"
- },
- {
- "key": "Africa/Maseru",
- "value": "Africa/Maseru"
- },
- {
- "key": "Europe/Vilnius",
- "value": "Europe/Vilnius"
- },
- {
- "key": "Europe/Luxembourg",
- "value": "Europe/Luxembourg"
- },
- {
- "key": "Europe/Riga",
- "value": "Europe/Riga"
- },
- {
- "key": "Africa/Tripoli",
- "value": "Africa/Tripoli"
- },
- {
- "key": "Africa/Casablanca",
- "value": "Africa/Casablanca"
- },
- {
- "key": "Europe/Monaco",
- "value": "Europe/Monaco"
- },
- {
- "key": "Europe/Chisinau",
- "value": "Europe/Chisinau"
- },
- {
- "key": "Europe/Podgorica",
- "value": "Europe/Podgorica"
- },
- {
- "key": "America/Marigot",
- "value": "America/Marigot"
- },
- {
- "key": "Indian/Antananarivo",
- "value": "Indian/Antananarivo"
- },
- {
- "key": "Pacific/Majuro",
- "value": "Pacific/Majuro"
- },
- {
- "key": "Pacific/Kwajalein",
- "value": "Pacific/Kwajalein"
- },
- {
- "key": "Europe/Skopje",
- "value": "Europe/Skopje"
- },
- {
- "key": "Africa/Bamako",
- "value": "Africa/Bamako"
- },
- {
- "key": "Asia/Rangoon",
- "value": "Asia/Rangoon"
- },
- {
- "key": "Asia/Ulaanbaatar",
- "value": "Asia/Ulaanbaatar"
- },
- {
- "key": "Asia/Hovd",
- "value": "Asia/Hovd"
- },
- {
- "key": "Asia/Choibalsan",
- "value": "Asia/Choibalsan"
- },
- {
- "key": "Asia/Macau",
- "value": "Asia/Macau"
- },
- {
- "key": "Pacific/Saipan",
- "value": "Pacific/Saipan"
- },
- {
- "key": "America/Martinique",
- "value": "America/Martinique"
- },
- {
- "key": "Africa/Nouakchott",
- "value": "Africa/Nouakchott"
- },
- {
- "key": "America/Montserrat",
- "value": "America/Montserrat"
- },
- {
- "key": "Europe/Malta",
- "value": "Europe/Malta"
- },
- {
- "key": "Indian/Mauritius",
- "value": "Indian/Mauritius"
- },
- {
- "key": "Indian/Maldives",
- "value": "Indian/Maldives"
- },
- {
- "key": "Africa/Blantyre",
- "value": "Africa/Blantyre"
- },
- {
- "key": "America/Mexico_City",
- "value": "America/Mexico_City"
- },
- {
- "key": "America/Cancun",
- "value": "America/Cancun"
- },
- {
- "key": "America/Merida",
- "value": "America/Merida"
- },
- {
- "key": "America/Monterrey",
- "value": "America/Monterrey"
- },
- {
- "key": "America/Matamoros",
- "value": "America/Matamoros"
- },
- {
- "key": "America/Mazatlan",
- "value": "America/Mazatlan"
- },
- {
- "key": "America/Chihuahua",
- "value": "America/Chihuahua"
- },
- {
- "key": "America/Ojinaga",
- "value": "America/Ojinaga"
- },
- {
- "key": "America/Hermosillo",
- "value": "America/Hermosillo"
- },
- {
- "key": "America/Tijuana",
- "value": "America/Tijuana"
- },
- {
- "key": "America/Santa_Isabel",
- "value": "America/Santa_Isabel"
- },
- {
- "key": "America/Bahia_Banderas",
- "value": "America/Bahia_Banderas"
- },
- {
- "key": "Asia/Kuala_Lumpur",
- "value": "Asia/Kuala_Lumpur"
- },
- {
- "key": "Asia/Kuching",
- "value": "Asia/Kuching"
- },
- {
- "key": "Africa/Maputo",
- "value": "Africa/Maputo"
- },
- {
- "key": "Africa/Windhoek",
- "value": "Africa/Windhoek"
- },
- {
- "key": "Pacific/Noumea",
- "value": "Pacific/Noumea"
- },
- {
- "key": "Africa/Niamey",
- "value": "Africa/Niamey"
- },
- {
- "key": "Pacific/Norfolk",
- "value": "Pacific/Norfolk"
- },
- {
- "key": "Africa/Lagos",
- "value": "Africa/Lagos"
- },
- {
- "key": "America/Managua",
- "value": "America/Managua"
- },
- {
- "key": "Europe/Amsterdam",
- "value": "Europe/Amsterdam"
- },
- {
- "key": "Europe/Oslo",
- "value": "Europe/Oslo"
- },
- {
- "key": "Asia/Kathmandu",
- "value": "Asia/Kathmandu"
- },
- {
- "key": "Pacific/Nauru",
- "value": "Pacific/Nauru"
- },
- {
- "key": "Pacific/Niue",
- "value": "Pacific/Niue"
- },
- {
- "key": "Pacific/Auckland",
- "value": "Pacific/Auckland"
- },
- {
- "key": "Pacific/Chatham",
- "value": "Pacific/Chatham"
- },
- {
- "key": "Asia/Muscat",
- "value": "Asia/Muscat"
- },
- {
- "key": "America/Panama",
- "value": "America/Panama"
- },
- {
- "key": "America/Lima",
- "value": "America/Lima"
- },
- {
- "key": "Pacific/Tahiti",
- "value": "Pacific/Tahiti"
- },
- {
- "key": "Pacific/Marquesas",
- "value": "Pacific/Marquesas"
- },
- {
- "key": "Pacific/Gambier",
- "value": "Pacific/Gambier"
- },
- {
- "key": "Pacific/Port_Moresby",
- "value": "Pacific/Port_Moresby"
- },
- {
- "key": "Asia/Manila",
- "value": "Asia/Manila"
- },
- {
- "key": "Asia/Karachi",
- "value": "Asia/Karachi"
- },
- {
- "key": "Europe/Warsaw",
- "value": "Europe/Warsaw"
- },
- {
- "key": "America/Miquelon",
- "value": "America/Miquelon"
- },
- {
- "key": "Pacific/Pitcairn",
- "value": "Pacific/Pitcairn"
- },
- {
- "key": "America/Puerto_Rico",
- "value": "America/Puerto_Rico"
- },
- {
- "key": "Asia/Gaza",
- "value": "Asia/Gaza"
- },
- {
- "key": "Asia/Hebron",
- "value": "Asia/Hebron"
- },
- {
- "key": "Europe/Lisbon",
- "value": "Europe/Lisbon"
- },
- {
- "key": "Atlantic/Madeira",
- "value": "Atlantic/Madeira"
- },
- {
- "key": "Atlantic/Azores",
- "value": "Atlantic/Azores"
- },
- {
- "key": "Pacific/Palau",
- "value": "Pacific/Palau"
- },
- {
- "key": "America/Asuncion",
- "value": "America/Asuncion"
- },
- {
- "key": "Asia/Qatar",
- "value": "Asia/Qatar"
- },
- {
- "key": "Indian/Reunion",
- "value": "Indian/Reunion"
- },
- {
- "key": "Europe/Bucharest",
- "value": "Europe/Bucharest"
- },
- {
- "key": "Europe/Belgrade",
- "value": "Europe/Belgrade"
- },
- {
- "key": "Europe/Kaliningrad",
- "value": "Europe/Kaliningrad"
- },
- {
- "key": "Europe/Moscow",
- "value": "Europe/Moscow"
- },
- {
- "key": "Europe/Volgograd",
- "value": "Europe/Volgograd"
- },
- {
- "key": "Europe/Samara",
- "value": "Europe/Samara"
- },
- {
- "key": "Asia/Yekaterinburg",
- "value": "Asia/Yekaterinburg"
- },
- {
- "key": "Asia/Omsk",
- "value": "Asia/Omsk"
- },
- {
- "key": "Asia/Novosibirsk",
- "value": "Asia/Novosibirsk"
- },
- {
- "key": "Asia/Novokuznetsk",
- "value": "Asia/Novokuznetsk"
- },
- {
- "key": "Asia/Krasnoyarsk",
- "value": "Asia/Krasnoyarsk"
- },
- {
- "key": "Asia/Irkutsk",
- "value": "Asia/Irkutsk"
- },
- {
- "key": "Asia/Yakutsk",
- "value": "Asia/Yakutsk"
- },
- {
- "key": "Asia/Khandyga",
- "value": "Asia/Khandyga"
- },
- {
- "key": "Asia/Vladivostok",
- "value": "Asia/Vladivostok"
- },
- {
- "key": "Asia/Sakhalin",
- "value": "Asia/Sakhalin"
- },
- {
- "key": "Asia/Ust-Nera",
- "value": "Asia/Ust-Nera"
- },
- {
- "key": "Asia/Magadan",
- "value": "Asia/Magadan"
- },
- {
- "key": "Asia/Kamchatka",
- "value": "Asia/Kamchatka"
- },
- {
- "key": "Asia/Anadyr",
- "value": "Asia/Anadyr"
- },
- {
- "key": "Africa/Kigali",
- "value": "Africa/Kigali"
- },
- {
- "key": "Asia/Riyadh",
- "value": "Asia/Riyadh"
- },
- {
- "key": "Pacific/Guadalcanal",
- "value": "Pacific/Guadalcanal"
- },
- {
- "key": "Indian/Mahe",
- "value": "Indian/Mahe"
- },
- {
- "key": "Africa/Khartoum",
- "value": "Africa/Khartoum"
- },
- {
- "key": "Europe/Stockholm",
- "value": "Europe/Stockholm"
- },
- {
- "key": "Asia/Singapore",
- "value": "Asia/Singapore"
- },
- {
- "key": "Atlantic/St_Helena",
- "value": "Atlantic/St_Helena"
- },
- {
- "key": "Europe/Ljubljana",
- "value": "Europe/Ljubljana"
- },
- {
- "key": "Arctic/Longyearbyen",
- "value": "Arctic/Longyearbyen"
- },
- {
- "key": "Europe/Bratislava",
- "value": "Europe/Bratislava"
- },
- {
- "key": "Africa/Freetown",
- "value": "Africa/Freetown"
- },
- {
- "key": "Europe/San_Marino",
- "value": "Europe/San_Marino"
- },
- {
- "key": "Africa/Dakar",
- "value": "Africa/Dakar"
- },
- {
- "key": "Africa/Mogadishu",
- "value": "Africa/Mogadishu"
- },
- {
- "key": "America/Paramaribo",
- "value": "America/Paramaribo"
- },
- {
- "key": "Africa/Juba",
- "value": "Africa/Juba"
- },
- {
- "key": "Africa/Sao_Tome",
- "value": "Africa/Sao_Tome"
- },
- {
- "key": "America/El_Salvador",
- "value": "America/El_Salvador"
- },
- {
- "key": "America/Lower_Princes",
- "value": "America/Lower_Princes"
- },
- {
- "key": "Asia/Damascus",
- "value": "Asia/Damascus"
- },
- {
- "key": "Africa/Mbabane",
- "value": "Africa/Mbabane"
- },
- {
- "key": "America/Grand_Turk",
- "value": "America/Grand_Turk"
- },
- {
- "key": "Africa/Ndjamena",
- "value": "Africa/Ndjamena"
- },
- {
- "key": "Indian/Kerguelen",
- "value": "Indian/Kerguelen"
- },
- {
- "key": "Africa/Lome",
- "value": "Africa/Lome"
- },
- {
- "key": "Asia/Bangkok",
- "value": "Asia/Bangkok"
- },
- {
- "key": "Asia/Dushanbe",
- "value": "Asia/Dushanbe"
- },
- {
- "key": "Pacific/Fakaofo",
- "value": "Pacific/Fakaofo"
- },
- {
- "key": "Asia/Dili",
- "value": "Asia/Dili"
- },
- {
- "key": "Asia/Ashgabat",
- "value": "Asia/Ashgabat"
- },
- {
- "key": "Africa/Tunis",
- "value": "Africa/Tunis"
- },
- {
- "key": "Pacific/Tongatapu",
- "value": "Pacific/Tongatapu"
- },
- {
- "key": "Europe/Istanbul",
- "value": "Europe/Istanbul"
- },
- {
- "key": "America/Port_of_Spain",
- "value": "America/Port_of_Spain"
- },
- {
- "key": "Pacific/Funafuti",
- "value": "Pacific/Funafuti"
- },
- {
- "key": "Asia/Taipei",
- "value": "Asia/Taipei"
- },
- {
- "key": "Africa/Dar_es_Salaam",
- "value": "Africa/Dar_es_Salaam"
- },
- {
- "key": "Europe/Kiev",
- "value": "Europe/Kiev"
- },
- {
- "key": "Europe/Uzhgorod",
- "value": "Europe/Uzhgorod"
- },
- {
- "key": "Europe/Zaporozhye",
- "value": "Europe/Zaporozhye"
- },
- {
- "key": "Europe/Simferopol",
- "value": "Europe/Simferopol"
- },
- {
- "key": "Africa/Kampala",
- "value": "Africa/Kampala"
- },
- {
- "key": "Pacific/Johnston",
- "value": "Pacific/Johnston"
- },
- {
- "key": "Pacific/Midway",
- "value": "Pacific/Midway"
- },
- {
- "key": "Pacific/Wake",
- "value": "Pacific/Wake"
- },
- {
- "key": "America/New_York",
- "value": "America/New_York"
- },
- {
- "key": "America/Detroit",
- "value": "America/Detroit"
- },
- {
- "key": "America/Kentucky/Louisville",
- "value": "America/Kentucky/Louisville"
- },
- {
- "key": "America/Kentucky/Monticello",
- "value": "America/Kentucky/Monticello"
- },
- {
- "key": "America/Indiana/Indianapolis",
- "value": "America/Indiana/Indianapolis"
- },
- {
- "key": "America/Indiana/Vincennes",
- "value": "America/Indiana/Vincennes"
- },
- {
- "key": "America/Indiana/Winamac",
- "value": "America/Indiana/Winamac"
- },
- {
- "key": "America/Indiana/Marengo",
- "value": "America/Indiana/Marengo"
- },
- {
- "key": "America/Indiana/Petersburg",
- "value": "America/Indiana/Petersburg"
- },
- {
- "key": "America/Indiana/Vevay",
- "value": "America/Indiana/Vevay"
- },
- {
- "key": "America/Chicago",
- "value": "America/Chicago"
- },
- {
- "key": "America/Indiana/Tell_City",
- "value": "America/Indiana/Tell_City"
- },
- {
- "key": "America/Indiana/Knox",
- "value": "America/Indiana/Knox"
- },
- {
- "key": "America/Menominee",
- "value": "America/Menominee"
- },
- {
- "key": "America/North_Dakota/Center",
- "value": "America/North_Dakota/Center"
- },
- {
- "key": "America/North_Dakota/New_Salem",
- "value": "America/North_Dakota/New_Salem"
- },
- {
- "key": "America/North_Dakota/Beulah",
- "value": "America/North_Dakota/Beulah"
- },
- {
- "key": "America/Denver",
- "value": "America/Denver"
- },
- {
- "key": "America/Boise",
- "value": "America/Boise"
- },
- {
- "key": "America/Phoenix",
- "value": "America/Phoenix"
- },
- {
- "key": "America/Los_Angeles",
- "value": "America/Los_Angeles"
- },
- {
- "key": "America/Anchorage",
- "value": "America/Anchorage"
- },
- {
- "key": "America/Juneau",
- "value": "America/Juneau"
- },
- {
- "key": "America/Sitka",
- "value": "America/Sitka"
- },
- {
- "key": "America/Yakutat",
- "value": "America/Yakutat"
- },
- {
- "key": "America/Nome",
- "value": "America/Nome"
- },
- {
- "key": "America/Adak",
- "value": "America/Adak"
- },
- {
- "key": "America/Metlakatla",
- "value": "America/Metlakatla"
- },
- {
- "key": "Pacific/Honolulu",
- "value": "Pacific/Honolulu"
- },
- {
- "key": "America/Montevideo",
- "value": "America/Montevideo"
- },
- {
- "key": "Asia/Samarkand",
- "value": "Asia/Samarkand"
- },
- {
- "key": "Asia/Tashkent",
- "value": "Asia/Tashkent"
- },
- {
- "key": "Europe/Vatican",
- "value": "Europe/Vatican"
- },
- {
- "key": "America/St_Vincent",
- "value": "America/St_Vincent"
- },
- {
- "key": "America/Caracas",
- "value": "America/Caracas"
- },
- {
- "key": "America/Tortola",
- "value": "America/Tortola"
- },
- {
- "key": "America/St_Thomas",
- "value": "America/St_Thomas"
- },
- {
- "key": "Asia/Ho_Chi_Minh",
- "value": "Asia/Ho_Chi_Minh"
- },
- {
- "key": "Pacific/Efate",
- "value": "Pacific/Efate"
- },
- {
- "key": "Pacific/Wallis",
- "value": "Pacific/Wallis"
- },
- {
- "key": "Pacific/Apia",
- "value": "Pacific/Apia"
- },
- {
- "key": "Asia/Aden",
- "value": "Asia/Aden"
- },
- {
- "key": "Indian/Mayotte",
- "value": "Indian/Mayotte"
- },
- {
- "key": "Africa/Johannesburg",
- "value": "Africa/Johannesburg"
- },
- {
- "key": "Africa/Lusaka",
- "value": "Africa/Lusaka"
- },
- {
- "key": "Africa/Harare",
- "value": "Africa/Harare"
- },
- {
- "key": "UTC",
- "value": "UTC"
- }
- ],
- "default": "UTC"
- },
- "dataPath": [
- "clock"
- ],
- "objectType": "object"
- },
- {
- "key": "host-name",
- "description": "Hostname",
- "details": "Set the hostname",
- "optionType": [
- "variable"
- ],
- "defaultOption": "variable",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ipv6-strict-control",
- "description": "Dual Stack IPv6 Default",
- "details": "Enable Dual Stack IPv6 Default",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "variable",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "description",
- "description": "Description",
- "details": "Set a text description of the device",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "location",
- "description": "Location",
- "details": "Set the location of the device",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "system-tunnel-mtu",
- "description": "MTU Of DTLS Tunnel",
- "details": "Set MTU of system\u2019s internal DTLS tunnel",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 500,
- "max": 2000,
- "default": 1024
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "latitude",
- "description": "Latitude",
- "details": "Set the device\u2019s physical latitude",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "float",
- "min": -90,
- "max": 90
- },
- "dataPath": [
- "gps-location"
- ],
- "objectType": "object"
- },
- {
- "key": "longitude",
- "description": "Longitude",
- "details": "Set the device\u2019s physical longitude",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "float",
- "min": -180,
- "max": 180
- },
- "dataPath": [
- "gps-location"
- ],
- "objectType": "object"
- },
- {
- "key": "device-groups",
- "description": "Device Groups",
- "details": "Configure a list of comma-separated device groups",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "list"
- },
- {
- "key": "system-ip",
- "description": "System IP",
- "details": "Set the system IP address",
- "optionType": [
- "variable"
- ],
- "defaultOption": "variable",
- "dataType": {
- "type": "string"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "site-id",
- "description": "Site ID",
- "details": "Set the site ID",
- "optionType": [
- "variable"
- ],
- "defaultOption": "variable",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "overlay-id",
- "description": "Overlay ID",
- "details": "Set the Overlay ID",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 4294967295,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "topology",
- "description": "Topology",
- "details": "Set the topology",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "hub-and-spoke",
- "value": "Hub and Spoke"
- }
- ]
- },
- "dataPath": [],
- "objectType": "list"
- },
- {
- "key": "port-offset",
- "description": "Port Offset",
- "details": "Set the TLOC port offset when multiple devices are behind a NAT",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 20,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "port-hop",
- "description": "Port Hopping",
- "details": "Enable port hopping",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "control-session-pps",
- "description": "Control Session Policer Rate (pps)",
- "details": "Set the policer rate for control sessions",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65535,
- "default": 300
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "controller-group-id",
- "description": "Controller Group ID",
- "details": "Controller group id",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 100,
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "track-transport",
- "description": "Track Transport",
- "details": "Configure tracking of transport",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "dns-cache-timeout",
- "description": "DNS Cache Timeout (minutes)",
- "details": "Set when to time out vBond addresses cached by device",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 30,
- "default": 2
- },
- "dataPath": [
- "timer"
- ],
- "objectType": "object"
- },
- {
- "key": "track-default-gateway",
- "description": "Gateway Tracking",
- "details": "Enable or disable default gateway tracking",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "iptables-enable",
- "description": "IP Tables",
- "details": "Enable IP tables for all WAN interfaces",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "admin-tech-on-failure",
- "description": "Collect Admin Tech on Reboot",
- "details": "Collect admin-tech before reboot due to daemon failure",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "idle-timeout",
- "description": "Idle Timeout",
- "details": "Idle CLI timeout in minutes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 300
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "region-id-list",
- "description": "Region ID List",
- "details": "Configure a list of region ID",
- "optionType": [
- "constant",
- "ignore",
- "variable"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 63
- },
- "dataPath": [
- "region"
- ],
- "objectType": "list"
- },
- {
- "key": "management-region",
- "description": "Management Region",
- "details": "Management region",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "compatible",
- "description": "Compatible TLOC Color",
- "details": "Configure compatible TLOC color",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "tloc-color-compatibility"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "color-1",
- "color-2"
- ],
- "children": [
- {
- "key": "color-1",
- "description": "First TLOC color in comparsion",
- "details": "First TLOC color in comparsion",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "mpls",
- "value": "mpls"
- },
- {
- "key": "metro-ethernet",
- "value": "metro-ethernet"
- },
- {
- "key": "biz-internet",
- "value": "biz-internet"
- },
- {
- "key": "public-internet",
- "value": "public-internet"
- },
- {
- "key": "lte",
- "value": "lte"
- },
- {
- "key": "3g",
- "value": "3g"
- },
- {
- "key": "red",
- "value": "red"
- },
- {
- "key": "green",
- "value": "green"
- },
- {
- "key": "blue",
- "value": "blue"
- },
- {
- "key": "gold",
- "value": "gold"
- },
- {
- "key": "silver",
- "value": "silver"
- },
- {
- "key": "bronze",
- "value": "bronze"
- },
- {
- "key": "custom1",
- "value": "custom1"
- },
- {
- "key": "custom2",
- "value": "custom2"
- },
- {
- "key": "custom3",
- "value": "custom3"
- },
- {
- "key": "private1",
- "value": "private1"
- },
- {
- "key": "private2",
- "value": "private2"
- },
- {
- "key": "private3",
- "value": "private3"
- },
- {
- "key": "private4",
- "value": "private4"
- },
- {
- "key": "private5",
- "value": "private5"
- },
- {
- "key": "private6",
- "value": "private6"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "color-2",
- "description": "Second TLOC color in comparsion",
- "details": "Second TLOC color in comparsion",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "mpls",
- "value": "mpls"
- },
- {
- "key": "metro-ethernet",
- "value": "metro-ethernet"
- },
- {
- "key": "biz-internet",
- "value": "biz-internet"
- },
- {
- "key": "public-internet",
- "value": "public-internet"
- },
- {
- "key": "lte",
- "value": "lte"
- },
- {
- "key": "3g",
- "value": "3g"
- },
- {
- "key": "red",
- "value": "red"
- },
- {
- "key": "green",
- "value": "green"
- },
- {
- "key": "blue",
- "value": "blue"
- },
- {
- "key": "gold",
- "value": "gold"
- },
- {
- "key": "silver",
- "value": "silver"
- },
- {
- "key": "bronze",
- "value": "bronze"
- },
- {
- "key": "custom1",
- "value": "custom1"
- },
- {
- "key": "custom2",
- "value": "custom2"
- },
- {
- "key": "custom3",
- "value": "custom3"
- },
- {
- "key": "private1",
- "value": "private1"
- },
- {
- "key": "private2",
- "value": "private2"
- },
- {
- "key": "private3",
- "value": "private3"
- },
- {
- "key": "private4",
- "value": "private4"
- },
- {
- "key": "private5",
- "value": "private5"
- },
- {
- "key": "private6",
- "value": "private6"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "incompatible",
- "description": "Incompatible TLOC Color",
- "details": "Configure incompatible TLOC color",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "tloc-color-compatibility"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "color-1",
- "color-2"
- ],
- "children": [
- {
- "key": "color-1",
- "description": "First TLOC color in comparsion",
- "details": "First TLOC color in comparsion",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "mpls",
- "value": "mpls"
- },
- {
- "key": "metro-ethernet",
- "value": "metro-ethernet"
- },
- {
- "key": "biz-internet",
- "value": "biz-internet"
- },
- {
- "key": "public-internet",
- "value": "public-internet"
- },
- {
- "key": "lte",
- "value": "lte"
- },
- {
- "key": "3g",
- "value": "3g"
- },
- {
- "key": "red",
- "value": "red"
- },
- {
- "key": "green",
- "value": "green"
- },
- {
- "key": "blue",
- "value": "blue"
- },
- {
- "key": "gold",
- "value": "gold"
- },
- {
- "key": "silver",
- "value": "silver"
- },
- {
- "key": "bronze",
- "value": "bronze"
- },
- {
- "key": "custom1",
- "value": "custom1"
- },
- {
- "key": "custom2",
- "value": "custom2"
- },
- {
- "key": "custom3",
- "value": "custom3"
- },
- {
- "key": "private1",
- "value": "private1"
- },
- {
- "key": "private2",
- "value": "private2"
- },
- {
- "key": "private3",
- "value": "private3"
- },
- {
- "key": "private4",
- "value": "private4"
- },
- {
- "key": "private5",
- "value": "private5"
- },
- {
- "key": "private6",
- "value": "private6"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "color-2",
- "description": "Second TLOC color in comparsion",
- "details": "Second TLOC color in comparsion",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "mpls",
- "value": "mpls"
- },
- {
- "key": "metro-ethernet",
- "value": "metro-ethernet"
- },
- {
- "key": "biz-internet",
- "value": "biz-internet"
- },
- {
- "key": "public-internet",
- "value": "public-internet"
- },
- {
- "key": "lte",
- "value": "lte"
- },
- {
- "key": "3g",
- "value": "3g"
- },
- {
- "key": "red",
- "value": "red"
- },
- {
- "key": "green",
- "value": "green"
- },
- {
- "key": "blue",
- "value": "blue"
- },
- {
- "key": "gold",
- "value": "gold"
- },
- {
- "key": "silver",
- "value": "silver"
- },
- {
- "key": "bronze",
- "value": "bronze"
- },
- {
- "key": "custom1",
- "value": "custom1"
- },
- {
- "key": "custom2",
- "value": "custom2"
- },
- {
- "key": "custom3",
- "value": "custom3"
- },
- {
- "key": "private1",
- "value": "private1"
- },
- {
- "key": "private2",
- "value": "private2"
- },
- {
- "key": "private3",
- "value": "private3"
- },
- {
- "key": "private4",
- "value": "private4"
- },
- {
- "key": "private5",
- "value": "private5"
- },
- {
- "key": "private6",
- "value": "private6"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/vpn-vsmart-interface.json b/catalystwan/tests/templates/schemas/vpn-vsmart-interface.json
deleted file mode 100644
index 0462a219..00000000
--- a/catalystwan/tests/templates/schemas/vpn-vsmart-interface.json
+++ /dev/null
@@ -1,859 +0,0 @@
-{
- "name": "Interface",
- "xmlPath": [],
- "xmlRootTag": "interface",
- "parentPath": "",
- "uniqueKey": "if-name",
- "nameSpace": "http://viptela.com/vpn",
- "fields": [
- {
- "key": "if-name",
- "description": "Interface Name",
- "details": "Interface name on vSmart: eth<0-..> or eth<0-..>.vlanid or loopback when present",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "description",
- "description": "Description",
- "details": "Interface description",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "address",
- "description": "IPv4 Address",
- "details": "Assign IPv4 address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-client",
- "description": "DHCP",
- "details": "Enable DHCP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-distance",
- "description": "DHCP Distance",
- "details": "Set administrative distance for DHCP default route",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65536,
- "default": 1
- },
- "dataPath": [
- "ip"
- ],
- "objectType": "object"
- },
- {
- "key": "address",
- "description": "IPv6 Address",
- "details": "Assign IPv6 address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "ipv6-prefix"
- },
- "dataPath": [
- "ipv6"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-client",
- "description": "DHCP",
- "details": "Enable DHCP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ipv6"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-distance",
- "description": "DHCP Distance",
- "details": "Set administrative distance for DHCP default route",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 65536,
- "default": 1
- },
- "dataPath": [
- "ipv6"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp-rapid-commit",
- "description": "DHCP Rapid Commit",
- "details": "Enable DHCPv6 rapid commit",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "ipv6"
- ],
- "objectType": "object"
- },
- {
- "key": "group",
- "description": "Groups",
- "details": "List of groups",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 0,
- "max": 4294967295
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "list"
- },
- {
- "key": "value",
- "description": "Color",
- "details": "Set color for TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "mpls",
- "value": "mpls"
- },
- {
- "key": "metro-ethernet",
- "value": "metro-ethernet"
- },
- {
- "key": "biz-internet",
- "value": "biz-internet"
- },
- {
- "key": "public-internet",
- "value": "public-internet"
- },
- {
- "key": "lte",
- "value": "lte"
- },
- {
- "key": "3g",
- "value": "3g"
- },
- {
- "key": "red",
- "value": "red"
- },
- {
- "key": "green",
- "value": "green"
- },
- {
- "key": "blue",
- "value": "blue"
- },
- {
- "key": "gold",
- "value": "gold"
- },
- {
- "key": "silver",
- "value": "silver"
- },
- {
- "key": "bronze",
- "value": "bronze"
- },
- {
- "key": "custom1",
- "value": "custom1"
- },
- {
- "key": "custom2",
- "value": "custom2"
- },
- {
- "key": "custom3",
- "value": "custom3"
- },
- {
- "key": "private1",
- "value": "private1"
- },
- {
- "key": "private2",
- "value": "private2"
- },
- {
- "key": "private3",
- "value": "private3"
- },
- {
- "key": "private4",
- "value": "private4"
- },
- {
- "key": "private5",
- "value": "private5"
- },
- {
- "key": "private6",
- "value": "private6"
- }
- ],
- "default": "default"
- },
- "dataPath": [
- "tunnel-interface",
- "color"
- ],
- "objectType": "object"
- },
- {
- "key": "carrier",
- "description": "Carrier",
- "details": "Set carrier for TLOC",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "default",
- "value": "default"
- },
- {
- "key": "carrier1",
- "value": "carrier1"
- },
- {
- "key": "carrier2",
- "value": "carrier2"
- },
- {
- "key": "carrier3",
- "value": "carrier3"
- },
- {
- "key": "carrier4",
- "value": "carrier4"
- },
- {
- "key": "carrier5",
- "value": "carrier5"
- },
- {
- "key": "carrier6",
- "value": "carrier6"
- },
- {
- "key": "carrier7",
- "value": "carrier7"
- },
- {
- "key": "carrier8",
- "value": "carrier8"
- }
- ],
- "default": "default"
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "nat-refresh-interval",
- "description": "Nat Refresh Interval",
- "details": "Set time period of nat refresh packets <1...60> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 60,
- "default": 5
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "hello-interval",
- "description": "Hello Interval",
- "details": "Set time period of control hello packets <100..600000> milli seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 100,
- "max": 600000,
- "default": 1000
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "hello-tolerance",
- "description": "Hello Tolerance",
- "details": "Set tolerance of control hello packets <12..60> seconds",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 12,
- "max": 6000,
- "default": 12
- },
- "dataPath": [
- "tunnel-interface"
- ],
- "objectType": "object"
- },
- {
- "key": "all",
- "description": "All",
- "details": "Allow all traffic. Overrides all other allow-service options if allow-service all is set",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "dhcp",
- "description": "DHCP",
- "details": "Allow/Deny DHCP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "dns",
- "description": "DNS",
- "details": "Allow/Deny DNS",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "icmp",
- "description": "ICMP",
- "details": "Allow/Deny ICMP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "sshd",
- "description": "SSH",
- "details": "Allow/Deny SSH",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "netconf",
- "description": "NETCONF",
- "details": "Allow/Deny NETCONF",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "ntp",
- "description": "NTP",
- "details": "Allow/Deny NTP",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "stun",
- "description": "STUN",
- "details": "Allow/Deny STUN",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [
- "tunnel-interface",
- "allow-service"
- ],
- "objectType": "object"
- },
- {
- "key": "flow-control",
- "description": "Flow Control",
- "details": "Enable flow control",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "ingress",
- "value": "ingress"
- },
- {
- "key": "egress",
- "value": "egress"
- },
- {
- "key": "autoneg",
- "value": "autoneg"
- },
- {
- "key": "both",
- "value": "both"
- },
- {
- "key": "none",
- "value": "none"
- }
- ],
- "default": "autoneg"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "clear-dont-fragment",
- "description": "Clear-Dont-Fragment",
- "details": "Clear don't fragment bit",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "autonegotiate",
- "description": "Autonegotiation",
- "details": "Link autonegotiation",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "pmtu",
- "description": "PMTU Discovery",
- "details": "Path MTU Discovery",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mtu",
- "description": "IP MTU",
- "details": "Interface MTU <576..2000>",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 576,
- "max": 2000,
- "default": 1500
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "tcp-mss-adjust",
- "description": "TCP MSS",
- "details": "TCP MSS on SYN packets, in bytes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 552,
- "max": 1960
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mac-address",
- "description": "MAC Address",
- "details": "Set MAC-layer address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "mac"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "speed",
- "description": "Speed",
- "details": "Set interface speed",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "10",
- "value": "10"
- },
- {
- "key": "100",
- "value": "100"
- },
- {
- "key": "1000",
- "value": "1000"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "duplex",
- "description": "Duplex",
- "details": "Duplex mode",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "full",
- "value": "full"
- },
- {
- "key": "half",
- "value": "half"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "shutdown",
- "description": "Shutdown",
- "details": "Administrative state",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "true",
- "label": {
- "on": "Yes",
- "off": "No"
- }
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ip",
- "description": "Static ARP",
- "details": "Configure static ARP entries",
- "optionType": [
- "constant",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "arp"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "addr"
- ],
- "children": [
- {
- "key": "addr",
- "description": "IP Address",
- "details": "IP Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "mac",
- "description": "MAC Address",
- "details": "MAC address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "mac"
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/schemas/vpn-vsmart.json b/catalystwan/tests/templates/schemas/vpn-vsmart.json
deleted file mode 100644
index e365eb8e..00000000
--- a/catalystwan/tests/templates/schemas/vpn-vsmart.json
+++ /dev/null
@@ -1,445 +0,0 @@
-{
- "name": "VPN",
- "xmlPath": [
- "vpn"
- ],
- "xmlRootTag": "vpn-instance",
- "uniqueKey": "vpn-id",
- "nameSpace": "http://viptela.com/vpn",
- "fields": [
- {
- "key": "vpn-id",
- "description": "VPN",
- "details": "Only 0 and 512 are allowed on vsmart",
- "optionType": [
- "constant"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "0",
- "value": "VPN 0"
- },
- {
- "key": "512",
- "value": "VPN 512"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "name",
- "description": "Name",
- "details": "Name",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 32
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "dns",
- "description": "DNS",
- "details": "DNS",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "dns-addr"
- ],
- "children": [
- {
- "key": "dns-addr",
- "description": "DNS Address",
- "details": "DNS Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "role",
- "description": "Role",
- "details": "Role",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "enum",
- "values": [
- {
- "key": "primary",
- "value": "Primary"
- },
- {
- "key": "secondary",
- "value": "Secondary"
- }
- ]
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "host",
- "description": "Static DNS mapping",
- "details": "Static DNS mapping",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "hostname"
- ],
- "children": [
- {
- "key": "hostname",
- "description": "Hostname",
- "details": "Hostname",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "string",
- "minLength": 1,
- "maxLength": 128
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "ip",
- "description": "List of IP",
- "details": "Role",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ip",
- "max": 8
- },
- "dataPath": [],
- "objectType": "list"
- }
- ]
- },
- {
- "key": "route",
- "description": "IPv4 Static Route",
- "details": "Configure IPv4 Static Routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ip"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "prefix"
- ],
- "children": [
- {
- "key": "prefix",
- "description": "Prefix",
- "details": "Prefix",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "next-hop",
- "description": "IP Gateway",
- "details": "IP gateway address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "Address",
- "details": "IP Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv4"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "distance",
- "description": "Distance",
- "details": "Administrative distance",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "null0",
- "description": "null0",
- "details": "null0",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "distance",
- "description": "Distance",
- "details": "Administrative distance",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN",
- "details": "Destination VPN(!=0 or !=512) to resolve the prefix",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "range": "0",
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "route",
- "description": "IPv6 Static Route",
- "details": "Configure IPv6 Static Routes",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [
- "ipv6"
- ],
- "objectType": "tree",
- "primaryKeys": [
- "prefix"
- ],
- "children": [
- {
- "key": "prefix",
- "description": "Prefix",
- "details": "Prefix",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv6-prefix"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "next-hop",
- "description": "IP Gateway",
- "details": "IP gateway address",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataPath": [],
- "objectType": "tree",
- "primaryKeys": [
- "address"
- ],
- "children": [
- {
- "key": "address",
- "description": "Address",
- "details": "IP Address",
- "optionType": [
- "constant",
- "variable"
- ],
- "defaultOption": "constant",
- "dataType": {
- "type": "ipv6"
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "distance",
- "description": "Distance",
- "details": "Administrative distance",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- },
- {
- "key": "null0",
- "description": "null0",
- "details": "null0",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "boolean",
- "default": "false"
- },
- "dataPath": [],
- "objectType": "node-only"
- },
- {
- "key": "distance",
- "description": "Distance",
- "details": "Administrative distance",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "min": 1,
- "max": 255,
- "default": 1
- },
- "dataPath": [],
- "objectType": "object"
- },
- {
- "key": "vpn",
- "description": "VPN",
- "details": "Destination VPN(!=0 or !=512) to resolve the prefix",
- "optionType": [
- "constant",
- "variable",
- "ignore"
- ],
- "defaultOption": "ignore",
- "dataType": {
- "type": "number",
- "range": "0",
- "default": 0
- },
- "dataPath": [],
- "objectType": "object"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/catalystwan/tests/templates/test_chose_model.py b/catalystwan/tests/templates/test_chose_model.py
index 2fa771f1..fdf220a7 100644
--- a/catalystwan/tests/templates/test_chose_model.py
+++ b/catalystwan/tests/templates/test_chose_model.py
@@ -4,18 +4,22 @@
from parameterized import parameterized # type: ignore
-from catalystwan.api.templates.models.supported import available_models
+from catalystwan.api.templates.models.cisco_aaa_model import CiscoAAAModel
+from catalystwan.api.templates.models.cisco_system import CiscoSystemModel
+from catalystwan.api.templates.models.omp_vsmart_model import OMPvSmart
+from catalystwan.api.templates.models.security_vsmart_model import SecurityvSmart
+from catalystwan.api.templates.models.system_vsmart_model import SystemVsmart
from catalystwan.utils.feature_template.choose_model import choose_model
-# For "cisco_secure_internet_gateway" there are required values
-
class TestChooseModel(unittest.TestCase):
@parameterized.expand(
[
- (key, value)
- for key, value in available_models.items()
- if key not in ["cisco_secure_internet_gateway", "vpn_vsmart"] # required values
+ ("cedge_aaa", CiscoAAAModel),
+ ("omp-vsmart", OMPvSmart),
+ ("security-vsmart", SecurityvSmart),
+ ("system-vsmart", SystemVsmart),
+ ("cisco_system", CiscoSystemModel),
]
)
def test_choose_model(self, model_type, model_cls):
diff --git a/catalystwan/tests/templates/test_deserialize_model.py b/catalystwan/tests/templates/test_deserialize_model.py
index c8ae1603..efb4a3e4 100644
--- a/catalystwan/tests/templates/test_deserialize_model.py
+++ b/catalystwan/tests/templates/test_deserialize_model.py
@@ -13,7 +13,7 @@
import catalystwan.tests.templates.models as models
from catalystwan.api.templates.feature_template import FeatureTemplate
-from catalystwan.models.templates import FeatureTemplateInformation
+from catalystwan.dataclasses import FeatureTemplateInfo
from catalystwan.typed_list import DataSequence
from catalystwan.utils.creation_tools import create_dataclass
@@ -42,13 +42,13 @@ def setUp(self):
"template_type": template.type,
"device_type": ["vedge-C8000V"],
"version": "15.0.0",
- "template_definition": f"{json.dumps(definition)}",
+ "template_definiton": f"{json.dumps(definition)}",
}
)
self.get_feature_templates_response = DataSequence(
- FeatureTemplateInformation,
- [create_dataclass(FeatureTemplateInformation, response) for response in feature_template_response],
+ FeatureTemplateInfo,
+ [create_dataclass(FeatureTemplateInfo, response) for response in feature_template_response],
)
@parameterized.expand([(template,) for template in map(models.__dict__.get, models.__all__)])
diff --git a/catalystwan/tests/test_cli_template.py b/catalystwan/tests/test_cli_template.py
index 472a642b..05f676bb 100644
--- a/catalystwan/tests/test_cli_template.py
+++ b/catalystwan/tests/test_cli_template.py
@@ -9,6 +9,7 @@
from catalystwan.api.templates.cli_template import CLITemplate
from catalystwan.dataclasses import Device
from catalystwan.exceptions import TemplateTypeError
+from catalystwan.utils.device_model import DeviceModel
class TestCLITemplate(unittest.TestCase):
@@ -39,7 +40,7 @@ def test_load_success(self, mock_session):
# Arrange
mock_session.get_json.return_value = {"configType": "file", "templateConfiguration": self.config}
# Act
- temp = CLITemplate(template_name="test", template_description="test", device_model="vedge-cloud")
+ temp = CLITemplate(template_name="test", template_description="test", device_model=DeviceModel.VEDGE)
answer = temp.load(session=mock_session, id="temp_id")
# Assert
self.assertEqual(answer.ioscfg, self.template.ioscfg)
@@ -53,7 +54,7 @@ def test_load_raise(self, mock_session):
"templateConfiguration": self.config,
}
# Act
- temp = CLITemplate(template_name="test", template_description="test", device_model="vedge-cloud")
+ temp = CLITemplate(template_name="test", template_description="test", device_model=DeviceModel.VEDGE)
def answer():
return temp.load(session=mock_session, id="temp_id")
@@ -78,7 +79,7 @@ def test_load_running_success(self, mock_session):
model="vedge-cloud",
)
# Act
- temp = CLITemplate(template_name="test", template_description="test", device_model="vedge-cloud")
+ temp = CLITemplate(template_name="test", template_description="test", device_model=DeviceModel.VEDGE)
answer = temp.load_running(session=mock_session, device=device)
# Assert
self.assertEqual(answer.ioscfg, self.template.ioscfg)
@@ -86,7 +87,7 @@ def test_load_running_success(self, mock_session):
def test_generate_payload(self):
# Arrange
template = CLITemplate(
- template_name="test", template_description="test", device_model="vedge-cloud", config=self.template
+ template_name="test", template_description="test", device_model=DeviceModel.VEDGE, config=self.template
)
# Act
answer = template.generate_payload()
@@ -125,7 +126,7 @@ def test_generate_payload_cedge(self):
template = CLITemplate(
template_name="test",
template_description="test",
- device_model="vedge-C8000V",
+ device_model=DeviceModel.VEDGE_C8000V,
config=self.template,
)
# Act
@@ -173,7 +174,7 @@ def test_update_suceess(self, mock_session):
)
config = CiscoConfParse(templateConfiguration.splitlines())
# Act
- template = CLITemplate(template_name="test", template_description="test", device_model="vedge-cloud")
+ template = CLITemplate(template_name="test", template_description="test", device_model=DeviceModel.VEDGE)
result = template.update(session=mock_session, id="temp_id", config=config)
# Assert
self.assertTrue(result)
@@ -190,7 +191,7 @@ def test_update_template_failure(self, mock_session):
" system-ip 192.168.1.26\n"
)
config = CiscoConfParse(templateConfiguration.splitlines())
- template = CLITemplate(template_name="test", template_description="test", device_model="vedge-cloud")
+ template = CLITemplate(template_name="test", template_description="test", device_model=DeviceModel.VEDGE)
# Act
with self.assertRaises(HTTPError):
@@ -212,7 +213,7 @@ def test_compare_template(self):
config2 = CiscoConfParse(templateConfiguration2.splitlines())
# Act
result = CLITemplate(
- template_name="test", template_description="test", device_model="vedge-cloud"
+ template_name="test", template_description="test", device_model=DeviceModel.VEDGE
).compare_template(config1, config2)
# Assert
self.assertEqual(result, "")
diff --git a/catalystwan/tests/test_templates.py b/catalystwan/tests/test_templates.py
index 30ff2755..86b7f754 100644
--- a/catalystwan/tests/test_templates.py
+++ b/catalystwan/tests/test_templates.py
@@ -12,9 +12,10 @@
from catalystwan.api.templates.feature_template import FeatureTemplate
from catalystwan.api.templates.models.cisco_aaa_model import CiscoAAAModel
from catalystwan.api.templates.payloads.aaa.aaa_model import AAAModel, AuthenticationOrder
-from catalystwan.dataclasses import Device
-from catalystwan.endpoints.configuration_template_master import DeviceTemplateInformation
+from catalystwan.dataclasses import Device, FeatureTemplateInfo, TemplateInfo
from catalystwan.typed_list import DataSequence
+from catalystwan.utils.creation_tools import create_dataclass
+from catalystwan.utils.device_model import DeviceModel
from catalystwan.utils.personality import Personality
from catalystwan.utils.reachability import Reachability
@@ -54,8 +55,8 @@ def setUp(self):
},
]
self.templates = DataSequence(
- DeviceTemplateInformation,
- [DeviceTemplateInformation(**template) for template in self.data_template],
+ TemplateInfo,
+ [create_dataclass(TemplateInfo, template) for template in self.data_template],
)
self.device_info = Device(
personality=Personality.EDGE,
@@ -85,10 +86,12 @@ def setUp(self):
)
self.task = TaskResult(result=True, sub_tasks_data=[sub_tasks_data])
+ @patch("catalystwan.response.ManagerResponse")
@patch("catalystwan.session.ManagerSession")
- def test_templates_success(self, mock_session):
+ def test_templates_success(self, mock_session, mocked_response):
# Arrange
- mock_session.endpoints.configuration_general_template.get_feature_template_list.return_value = self.templates
+ mock_session.get.return_value = mocked_response
+ mocked_response.dataseq.return_value = self.templates
# Act
answer = TemplatesAPI(mock_session).get(FeatureTemplate)
@@ -96,18 +99,18 @@ def test_templates_success(self, mock_session):
# Assert
self.assertEqual(answer, self.templates)
+ @patch("catalystwan.response.ManagerResponse")
@patch("catalystwan.session.ManagerSession")
- def test_templates_get(self, mock_session):
+ def test_templates_get(self, mock_session, mocked_response):
# Arrange
- mock_session.endpoints.configuration_general_template.get_feature_template_list.return_value = self.templates
+ mock_session.get_data.return_value = mocked_response
+ mocked_response.dataseq.return_value = DataSequence(FeatureTemplateInfo, [])
# Act
TemplatesAPI(mock_session).get(FeatureTemplate)
# Assert
- mock_session.endpoints.configuration_general_template.get_feature_template_list.assert_called_once_with(
- params={"summary": True}
- )
+ mock_session.get.assert_called_once_with(url="/dataservice/template/feature", params={"summary": True})
@parameterized.expand(
[
@@ -127,14 +130,14 @@ def test_templates_get(self, mock_session):
DeviceTemplate( # type: ignore
template_name="test_device_template",
template_description="test_device_template_description",
- device_type="vedge-2000",
+ device_type=DeviceModel.VEDGE_2000,
general_templates=[],
),
"device_template_id",
),
(
CLITemplate( # type: ignore
- template_name="test", template_description="test", device_model="vedge-100"
+ template_name="test", template_description="test", device_model=DeviceModel.VEDGE
),
"cli_id",
),
@@ -190,13 +193,13 @@ def test_templates_create_success(
DeviceTemplate( # type: ignore
template_name="test_device_template",
template_description="test_device_template_description",
- device_type="vedge-2000",
+ device_type=DeviceModel.VEDGE_2000,
general_templates=[],
),
CLITemplate( # type: ignore
template_name="test_cli_template",
template_description="test_cli_description",
- device_model="vedge-cloud",
+ device_model=DeviceModel.VBOND,
),
CiscoAAAModel( # type: ignore
template_name="test_aaa_model",
diff --git a/catalystwan/utils/config_migration/converters/feature_template/basic.py b/catalystwan/utils/config_migration/converters/feature_template/basic.py
index 57074736..9350ddaa 100644
--- a/catalystwan/utils/config_migration/converters/feature_template/basic.py
+++ b/catalystwan/utils/config_migration/converters/feature_template/basic.py
@@ -2,7 +2,6 @@
from typing import Dict, Optional
from catalystwan.api.configuration_groups.parcel import Global, OptionType, as_default, as_global
-from catalystwan.models.common import Timezone
from catalystwan.models.configuration.feature_profile.sdwan.system import BasicParcel
from catalystwan.models.configuration.feature_profile.sdwan.system.basic import (
Clock,
@@ -12,6 +11,7 @@
Sms,
)
from catalystwan.utils.config_migration.converters.feature_template.helpers import create_dict_without_none
+from catalystwan.utils.timezone import Timezone
from .base import FTConverter
diff --git a/catalystwan/utils/config_migration/converters/feature_template/cloud_credentials.py b/catalystwan/utils/config_migration/converters/feature_template/cloud_credentials.py
index 8cacbc69..f6a77783 100644
--- a/catalystwan/utils/config_migration/converters/feature_template/cloud_credentials.py
+++ b/catalystwan/utils/config_migration/converters/feature_template/cloud_credentials.py
@@ -39,7 +39,7 @@ def parse_zscaler_credentials(template_values: dict):
def create_cloud_credentials_from_templates(templates: List[FeatureTemplateInformation]) -> CloudCredentials:
merged_credentials = {}
for template in templates:
- template_definition_as_dict = json.loads(cast(str, template.template_definition))
+ template_definition_as_dict = json.loads(cast(str, template.template_definiton))
template_values = find_template_values(template_definition_as_dict)
if template.name == "Cisco-Zscaler-Global-Credentials":
merged_credentials.update(parse_zscaler_credentials(template_values))
diff --git a/catalystwan/utils/config_migration/converters/feature_template/parcel_factory.py b/catalystwan/utils/config_migration/converters/feature_template/parcel_factory.py
index df2125a8..638348ed 100644
--- a/catalystwan/utils/config_migration/converters/feature_template/parcel_factory.py
+++ b/catalystwan/utils/config_migration/converters/feature_template/parcel_factory.py
@@ -133,16 +133,16 @@ def unsupported_type(template_type: str) -> ConvertResult[AnyParcel]:
return ConvertResult(status="unsupported", output=None, info=[f"Template type {template_type} not supported"])
-def extract_template_values(template_definition: str) -> Dict[str, Any]:
+def extract_template_values(template_definiton: str) -> Dict[str, Any]:
"""Extracts the template values from the template definition and create easy to consume dictionary."""
- template_definition_as_dict = json.loads(cast(str, template_definition))
+ template_definition_as_dict = json.loads(cast(str, template_definiton))
template_values = find_template_values(template_definition_as_dict)
template_values_normalized = template_values_normalization(template_values)
return template_values_normalized
def convert(converter: FTConverter, template: FeatureTemplateInformation) -> ConvertResult[AnyParcel]:
- definition = template.template_definition
+ definition = template.template_definiton
if definition is None:
return ConvertResult(status="failed", output=None, info=["Template definition is empty"])
template_values = extract_template_values(definition)
diff --git a/catalystwan/utils/config_migration/steps/transform.py b/catalystwan/utils/config_migration/steps/transform.py
index a1b9676f..3ccad11e 100644
--- a/catalystwan/utils/config_migration/steps/transform.py
+++ b/catalystwan/utils/config_migration/steps/transform.py
@@ -110,9 +110,9 @@ def merge_parcels(ux2: UX2Config) -> UX2Config:
def get_vpn_id_or_none(template: FeatureTemplateInformation) -> Optional[int]:
"""Applies only to cisco_vpn tempalte type. Get VPN Id safely from the template definition."""
- if template.template_definition is None:
+ if template.template_definiton is None:
return None
- definition = json.loads(template.template_definition)
+ definition = json.loads(template.template_definiton)
return definition.get("vpn-id", {}).get("vipValue")
@@ -123,14 +123,14 @@ def resolve_vpn_and_subtemplates_type(cisco_vpn_template: GeneralTemplate, ux1_c
# Find the target feature template based on the provided template ID
target_feature_template = next(
- (t for t in ux1_config.templates.feature_templates if t.id == cisco_vpn_template.template_id), None
+ (t for t in ux1_config.templates.feature_templates if t.id == cisco_vpn_template.templateId), None
)
if not target_feature_template:
- logger.error(f"Cisco VPN template {cisco_vpn_template.template_id} not found in Feature Templates list.")
+ logger.error(f"Cisco VPN template {cisco_vpn_template.templateId} not found in Feature Templates list.")
logger.error(
"All items depended on this template will NOT be converted:"
- f"{[sub.template_id for sub in cisco_vpn_template.sub_templates]}"
+ f"{[sub.templateId for sub in cisco_vpn_template.subTemplates]}"
)
return set()
@@ -140,16 +140,16 @@ def resolve_vpn_and_subtemplates_type(cisco_vpn_template: GeneralTemplate, ux1_c
logger.error(f"VPN ID not found in Cisco VPN template {target_feature_template.name}.")
logger.error(
"All items depended on this template will NOT be converted:"
- f"{[sub.template_id for sub in cisco_vpn_template.sub_templates]}"
+ f"{[sub.templateId for sub in cisco_vpn_template.subTemplates]}"
)
return set()
if vpn_id == 0:
- cisco_vpn_template.template_type = VPN_TRANSPORT
+ cisco_vpn_template.templateType = VPN_TRANSPORT
elif vpn_id == 512:
- cisco_vpn_template.template_type = VPN_MANAGEMENT
+ cisco_vpn_template.templateType = VPN_MANAGEMENT
else:
- cisco_vpn_template.template_type = VPN_SERVICE
+ cisco_vpn_template.templateType = VPN_SERVICE
new_vpn_id = str(uuid4())
new_vpn_name = f"{target_feature_template.name}_{new_vpn_id[:5]}"
@@ -158,19 +158,19 @@ def resolve_vpn_and_subtemplates_type(cisco_vpn_template: GeneralTemplate, ux1_c
vpn.name = new_vpn_name
ux1_config.templates.feature_templates.append(vpn)
- cisco_vpn_template.template_id = new_vpn_id
+ cisco_vpn_template.templateId = new_vpn_id
cisco_vpn_template.name = new_vpn_name
used_feature_templates = {vpn.id}
logger.debug(
f"Resolved Cisco VPN {target_feature_template.name} "
- f"template to type {cisco_vpn_template.template_type } and changed name to new name {new_vpn_name}"
+ f"template to type {cisco_vpn_template.templateType} and changed name to new name {new_vpn_name}"
)
# Get templates that need casting
general_templates_from_device_template = [
- t for t in cisco_vpn_template.sub_templates if t.template_type in VPN_ADDITIONAL_TEMPLATES
+ t for t in cisco_vpn_template.subTemplates if t.templateType in VPN_ADDITIONAL_TEMPLATES
]
if len(general_templates_from_device_template) == 0:
@@ -183,11 +183,11 @@ def resolve_vpn_and_subtemplates_type(cisco_vpn_template: GeneralTemplate, ux1_c
for ft, gt in feature_and_general_templates:
new_id = str(uuid4())
- new_name = f"{ft.name}_{new_id[:5]}{VPN_TEMPLATE_MAPPINGS[cisco_vpn_template.template_type ]['suffix']}"
- new_type = VPN_TEMPLATE_MAPPINGS[cisco_vpn_template.template_type]["mapping"][ft.template_type] # type: ignore
+ new_name = f"{ft.name}_{new_id[:5]}{VPN_TEMPLATE_MAPPINGS[cisco_vpn_template.templateType]['suffix']}"
+ new_type = VPN_TEMPLATE_MAPPINGS[cisco_vpn_template.templateType]["mapping"][ft.template_type] # type: ignore
if NO_SUBSTITUTE_ERROR in new_type:
- cisco_vpn_template.sub_templates.remove(gt)
+ cisco_vpn_template.subTemplates.remove(gt)
logger.error(new_type)
continue
@@ -202,8 +202,8 @@ def resolve_vpn_and_subtemplates_type(cisco_vpn_template: GeneralTemplate, ux1_c
ux1_config.templates.feature_templates.append(ft_copy)
- gt.template_id = new_id
- gt.template_type = new_type
+ gt.templateId = new_id
+ gt.templateType = new_type
gt.name = new_name
used_feature_templates.add(new_id)
@@ -227,10 +227,10 @@ def create_feature_template_and_general_template_pairs(
pairs: List[Tuple[FeatureTemplateInformation, GeneralTemplate]] = []
for gt in general_templates:
- feature_template = next((ft for ft in feature_templates if ft.id == gt.template_id), None)
+ feature_template = next((ft for ft in feature_templates if ft.id == gt.templateId), None)
if not feature_template:
- logger.error(f"Feature template with UUID [{gt.template_id}] not found in Feature Templates list.")
+ logger.error(f"Feature template with UUID [{gt.templateId}] not found in Feature Templates list.")
continue
pairs.append((feature_template, gt))
diff --git a/catalystwan/utils/device_model.py b/catalystwan/utils/device_model.py
new file mode 100644
index 00000000..6a4ee417
--- /dev/null
+++ b/catalystwan/utils/device_model.py
@@ -0,0 +1,88 @@
+# Copyright 2022 Cisco Systems, Inc. and its affiliates
+
+from enum import Enum
+
+
+class DeviceModel(str, Enum):
+ # controlers
+ VSMART = "vsmart"
+ VBOND = "vedge-cloud"
+ VMANAGE = "vmanage"
+
+ # vedges
+ VEDGE_ISR1100_6G = "vedge-ISR1100-6G"
+ VEDGE_ISR1100X_6G = "vedge-ISR1100X-6G"
+ VEDGE_ISR1100_4G = "vedge-ISR1100-4G"
+ VEDGE_ISR1100X_4G = "vedge-ISR1100X-4G"
+ VEDGE_ISR1100_4GLTE = "vedge-ISR1100-4GLTE"
+ VEDGE = "vedge-cloud"
+ VEDGE_1000 = "vedge-1000"
+ VEDGE_2000 = "vedge-2000"
+ VEDGE_100 = "vedge-100"
+ VEDGE_100_B = "vedge-100-B"
+ VEDGE_100_WM = "vedge-100-WM"
+ VEDGE_100_M = "vedge-100-M"
+ VEDGE_5000 = "vedge-5000"
+
+ # IR1101
+ VEDGE_IR_1101 = "vedge-IR-1101"
+ VEDGE_ESR_6300 = "vedge-ESR-6300"
+ VEDGE_IR_1821 = "vedge-IR-1821"
+ VEDGE_IR_1831 = "vedge-IR-1831"
+ VEDGE_IR_1833 = "vedge-IR-1833"
+ VEDGE_IR_1835 = "vedge-IR-1835"
+
+ # ASR devices
+ VEDGE_ASR_1001_X = "vedge-ASR-1001-X"
+ VEDGE_ASR_1002_X = "vedge-ASR-1002-X"
+ VEDGE_ASR_1002_HX = "vedge-ASR-1002-HX"
+ VEDGE_ASR_1001_HX = "vedge-ASR-1001-HX"
+ VEDGE_C8500L_8G4X = "vedge-C8500L-8G4X"
+ VEDGE_C8500_12X4QC = "vedge-C8500-12X4QC"
+ VEDGE_C8500_12X = "vedge-C8500-12X"
+ VEDGE_C8500L_8S4X = "vedge-C8500L-8S4X"
+ VEDGE_ASR_1006_X = "vedge-ASR-1006-X"
+ VEDGE_C8500_20X6C = "vedge-C8500-20X6C"
+
+ # CSR
+ VEDGE_CSR_1000V = "vedge-CSR-1000v"
+ VEDGE_C8000V = "vedge-C8000V"
+
+ # ISR
+ VEDGE_ISR_4331 = "vedge-ISR-4331"
+ VEDGE_ISR_4431 = "vedge-ISR-4431"
+ VEDGE_ISR_4461 = "vedge-ISR-4461"
+ VEDGE_ISR_4451_X = "vedge-ISR-4451-X"
+ VEDGE_ISR_4321 = "vedge-ISR-4321"
+ VEDGE_ISR_4351 = "vedge-ISR-4351"
+ VEDGE_ISR_4221 = "vedge-ISR-4221"
+ VEDGE_ISR_4221X = "vedge-ISR-4221X"
+
+ # C1100 DSL
+ VEDGE_C1111_8PW = "vedge-C1111-8PW"
+ VEDGE_C1111_8PLTELAW = "vedge-C1111-8PLTELAW"
+ VEDGE_C1111_8PLTEEAW = "vedge-C1111-8PLTEEAW"
+ VEDGE_C1113_8PMLTEEA = "vedge-C1113-8PMLTEEA"
+ VEDGE_C1116_4P = "vedge-C1116-4P"
+ VEDGE_C1116_4PLTEEA = "vedge-C1116-4PLTEEA"
+ VEDGE_C1117_4P = "vedge-C1117-4P"
+ VEDGE_C1117_4PM = "vedge-C1117-4PM"
+ VEDGE_C1117_4PLTEEA = "vedge-C1117-4PLTEEA"
+ VEDGE_C1111_8PLTELA = "vedge-C1111-8PLTELA"
+ VEDGE_C1111_8PLTEEA = "vedge-C1111-8PLTEEA"
+ VEDGE_C1121_8PLTEPW = "vedge-C1121-8PLTEPW"
+ VEDGE_C1221_8PLTEP = "vedge-C1121-8PLTEP"
+ VEDGE_C1221X_8PLTEP = "vedge-C1121X-8PLTEP"
+ VEDGE_C1111_4PLTEEA = "vedge-C1111-4PLTEEA"
+ VEDGE_C1161X_8PLTEP = "vedge-C1161X-8PLTEP"
+
+ # C8300
+ VEDGE_C8300_2N2S_6T = "vedge-C8300-2N2S-6T"
+ VEDGE_C8300_1N1S_6T = "vedge-C8300-1N1S-6T"
+ VEDGE_C8300_1N1S_4T2X = "vedge-C8300-1N1S-4T2X"
+ VEDGE_C8300_2N2S_4T2X = "vedge-C8300-2N2S-4T2X"
+ VEDGE_C8200_1N_4T = "vedge-C8200-1N-4T"
+ VEDGE_C8200L_1N_4T = "vedge-C8200L-1N-4T"
+
+ # ISRv
+ VEDGE_ISRV = "vedge-ISRv"
diff --git a/catalystwan/utils/timezone.py b/catalystwan/utils/timezone.py
new file mode 100644
index 00000000..e210b891
--- /dev/null
+++ b/catalystwan/utils/timezone.py
@@ -0,0 +1,422 @@
+# Copyright 2023 Cisco Systems, Inc. and its affiliates
+
+from enum import Enum
+
+
+class Timezone(str, Enum):
+ EUROPE_ANDORRA = "Europe/Andorra"
+ ASIA_DUBAI = "Asia/Dubai"
+ ASIA_KABUL_ = "Asia/Kabul"
+ AMERICA_ANTIGUA_ = "America/Antigua"
+ AMERICA_ANGUILLA_ = "America/Anguilla"
+ EUROPE_TIRANE_ = "Europe/Tirane"
+ ASIA_YEREVAN_ = "Asia/Yerevan"
+ AFRICA_LUANDA_ = "Africa/Luanda"
+ ANTARCTICA_MCMURDO = "Antarctica/McMurdo"
+ ANTARCTICA_ROTHERA = "Antarctica/Rothera"
+ ANTARCTICA_PALMER = "Antarctica/Palmer"
+ ANTARCTICA_MAWSON = "Antarctica/Mawson"
+ ANTARCTICA_DAVIS = "Antarctica/Davis"
+ ANTARCTICA_CASEY = "Antarctica/Casey"
+ ANTARCTICA_VOSTOK = "Antarctica/Vostok"
+ ANTARCTICA_DUMONTDURVILLE = "Antarctica/DumontDUrville"
+ ANTARCTICA_SYOWA = "Antarctica/Syowa"
+ AMERICA_ARGENTINA_BUENOS_AIRES = "America/Argentina/Buenos_Aires"
+ AMERICA_ARGENTINA_CORDOBA = "America/Argentina/Cordoba"
+ AMERICA_ARGENTINA_SALTA = "America/Argentina/Salta"
+ AMERICA_ARGENTINA_JUJUY = "America/Argentina/Jujuy"
+ AMERICA_ARGENTINA_TUCUMAN = "America/Argentina/Tucuman"
+ AMERICA_ARGENTINA_CATAMARCA = "America/Argentina/Catamarca"
+ AMERICA_ARGENTINA_LA_RIOJA = "America/Argentina/La_Rioja"
+ AMERICA_ARGENTINA_SAN_JUAN = "America/Argentina/San_Juan"
+ AMERICA_ARGENTINA_MENDOZA = "America/Argentina/Mendoza"
+ AMERICA_ARGENTINA_SAN_LUIS = "America/Argentina/San_Luis"
+ AMERICA_ARGENTINA_RIO_GALLEGOS = "America/Argentina/Rio_Gallegos"
+ AMERICA_ARGENTINA_USHUAIA = "America/Argentina/Ushuaia"
+ PACIFIC_PAGO_PAGO = "Pacific/Pago_Pago"
+ EUROPE_VIENNA = "Europe/Vienna"
+ AUSTRALIA_LORD_HOWE = "Australia/Lord_Howe"
+ ANTARCTICA_MACQUARIE = "Antarctica/Macquarie"
+ AUSTRALIA_HOBART = "Australia/Hobart"
+ AUSTRALIA_CURRIE = "Australia/Currie"
+ AUSTRALIA_MELBOURNE = "Australia/Melbourne"
+ AUSTRALIA_SYDNEY = "Australia/Sydney"
+ AUSTRALIA_BROKEN_HILL = "Australia/Broken_Hill"
+ AUSTRALIA_BRISBANE = "Australia/Brisbane"
+ AUSTRALIA_LINDEMAN = "Australia/Lindeman"
+ AUSTRALIA_ADELAIDE = "Australia/Adelaide"
+ AUSTRALIA_DARWIN = "Australia/Darwin"
+ AUSTRALIA_PERTH = "Australia/Perth"
+ AUSTRALIA_EUCLA = "Australia/Eucla"
+ AMERICA_ARUBA = "America/Aruba"
+ EUROPE_MARIEHAMN = "Europe/Mariehamn"
+ ASIA_BAKU = "Asia/Baku"
+ EUROPE_SARAJEVO = "Europe/Sarajevo"
+ AMERICA_BARBADOS = "America/Barbados"
+ ASIA_DHAKA = "Asia/Dhaka"
+ EUROPE_BRUSSELS = "Europe/Brussels"
+ AFRICA_OUAGADOUGOU = "Africa/Ouagadougou"
+ EUROPE_SOFIA = "Europe/Sofia"
+ ASIA_BAHRAIN = "Asia/Bahrain"
+ AFRICA_BUJUMBURA = "Africa/Bujumbura"
+ AFRICA_PORTO_NOVO = "Africa/Porto-Novo"
+ AMERICA_ST_BARTHELEMY = "America/St_Barthelemy"
+ ATLANTIC_BERMUDA = "Atlantic/Bermuda"
+ ASIA_BRUNEI = "Asia/Brunei"
+ AMERICA_LA_PAZ = "America/La_Paz"
+ AMERICA_KRALENDIJK = "America/Kralendijk"
+ AMERICA_NORONHA = "America/Noronha"
+ AMERICA_BELEM = "America/Belem"
+ AMERICA_FORTALEZA = "America/Fortaleza"
+ AMERICA_RECIFE = "America/Recife"
+ AMERICA_ARAGUAINA = "America/Araguaina"
+ AMERICA_MACEIO = "America/Maceio"
+ AMERICA_BAHIA = "America/Bahia"
+ AMERICA_SAO_PAULO = "America/Sao_Paulo"
+ AMERICA_CAMPO_GRANDE = "America/Campo_Grande"
+ AMERICA_CUIABA = "America/Cuiaba"
+ AMERICA_SANTAREM = "America/Santarem"
+ AMERICA_PORTO_VELHO = "America/Porto_Velho"
+ AMERICA_BOA_VISTA = "America/Boa_Vista"
+ AMERICA_MANAUS = "America/Manaus"
+ AMERICA_EIRUNEPE = "America/Eirunepe"
+ AMERICA_RIO_BRANCO = "America/Rio_Branco"
+ AMERICA_NASSAU = "America/Nassau"
+ ASIA_THIMPHU = "Asia/Thimphu"
+ AFRICA_GABORONE = "Africa/Gaborone"
+ EUROPE_MINSK = "Europe/Minsk"
+ AMERICA_BELIZE = "America/Belize"
+ AMERICA_ST_JOHNS = "America/St_Johns"
+ AMERICA_HALIFAX = "America/Halifax"
+ AMERICA_GLACE_BAY = "America/Glace_Bay"
+ AMERICA_MONCTON = "America/Moncton"
+ AMERICA_GOOSE_BAY = "America/Goose_Bay"
+ AMERICA_BLANC_SABLON = "America/Blanc-Sablon"
+ AMERICA_TORONTO = "America/Toronto"
+ AMERICA_NIPIGON = "America/Nipigon"
+ AMERICA_THUNDER_BAY = "America/Thunder_Bay"
+ AMERICA_IQALUIT = "America/Iqaluit"
+ AMERICA_PANGNIRTUNG = "America/Pangnirtung"
+ AMERICA_RESOLUTE = "America/Resolute"
+ AMERICA_ATIKOKAN = "America/Atikokan"
+ AMERICA_RANKIN_INLET = "America/Rankin_Inlet"
+ AMERICA_WINNIPEG = "America/Winnipeg"
+ AMERICA_RAINY_RIVER = "America/Rainy_River"
+ AMERICA_REGINA = "America/Regina"
+ AMERICA_SWIFT_CURRENT = "America/Swift_Current"
+ AMERICA_EDMONTON = "America/Edmonton"
+ AMERICA_CAMBRIDGE_BAY = "America/Cambridge_Bay"
+ AMERICA_YELLOWKNIFE = "America/Yellowknife"
+ AMERICA_INUVIK = "America/Inuvik"
+ AMERICA_CRESTON = "America/Creston"
+ AMERICA_DAWSON_CREEK = "America/Dawson_Creek"
+ AMERICA_VANCOUVER = "America/Vancouver"
+ AMERICA_WHITEHORSE = "America/Whitehorse"
+ AMERICA_DAWSON = "America/Dawson"
+ INDIAN_COCOS = "Indian/Cocos"
+ AFRICA_KINSHASA = "Africa/Kinshasa"
+ AFRICA_LUBUMBASHI = "Africa/Lubumbashi"
+ AFRICA_BANGUI = "Africa/Bangui"
+ AFRICA_BRAZZAVILLE = "Africa/Brazzaville"
+ EUROPE_ZURICH = "Europe/Zurich"
+ AFRICA_ABIDJAN = "Africa/Abidjan"
+ PACIFIC_RAROTONGA = "Pacific/Rarotonga"
+ AMERICA_SANTIAGO = "America/Santiago"
+ PACIFIC_EASTER = "Pacific/Easter"
+ AFRICA_DOUALA = "Africa/Douala"
+ ASIA_SHANGHAI = "Asia/Shanghai"
+ ASIA_HARBIN = "Asia/Harbin"
+ ASIA_CHONGQING = "Asia/Chongqing"
+ ASIA_URUMQI = "Asia/Urumqi"
+ ASIA_KASHGAR = "Asia/Kashgar"
+ AMERICA_BOGOTA = "America/Bogota"
+ AMERICA_COSTA_RICA = "America/Costa_Rica"
+ AMERICA_HAVANA = "America/Havana"
+ ATLANTIC_CAPE_VERDE = "Atlantic/Cape_Verde"
+ AMERICA_CURACAO = "America/Curacao"
+ INDIAN_CHRISTMAS = "Indian/Christmas"
+ ASIA_NICOSIA = "Asia/Nicosia"
+ EUROPE_PRAGUE = "Europe/Prague"
+ EUROPE_BERLIN = "Europe/Berlin"
+ EUROPE_BUSINGEN = "Europe/Busingen"
+ AFRICA_DJIBOUTI = "Africa/Djibouti"
+ EUROPE_COPENHAGEN = "Europe/Copenhagen"
+ AMERICA_DOMINICA = "America/Dominica"
+ AMERICA_SANTO_DOMINGO = "America/Santo_Domingo"
+ AFRICA_ALGIERS = "Africa/Algiers"
+ AMERICA_GUAYAQUIL = "America/Guayaquil"
+ PACIFIC_GALAPAGOS = "Pacific/Galapagos"
+ EUROPE_TALLINN = "Europe/Tallinn"
+ AFRICA_CAIRO = "Africa/Cairo"
+ AFRICA_EL_AAIUN = "Africa/El_Aaiun"
+ AFRICA_ASMARA = "Africa/Asmara"
+ EUROPE_MADRID = "Europe/Madrid"
+ AFRICA_CEUTA = "Africa/Ceuta"
+ ATLANTIC_CANARY = "Atlantic/Canary"
+ AFRICA_ADDIS_ABABA = "Africa/Addis_Ababa"
+ EUROPE_HELSINKI = "Europe/Helsinki"
+ PACIFIC_FIJI = "Pacific/Fiji"
+ ATLANTIC_STANLEY = "Atlantic/Stanley"
+ PACIFIC_CHUUK = "Pacific/Chuuk"
+ PACIFIC_POHNPEI = "Pacific/Pohnpei"
+ PACIFIC_KOSRAE = "Pacific/Kosrae"
+ ATLANTIC_FAROE = "Atlantic/Faroe"
+ EUROPE_PARIS = "Europe/Paris"
+ AFRICA_LIBREVILLE = "Africa/Libreville"
+ EUROPE_LONDON = "Europe/London"
+ AMERICA_GRENADA = "America/Grenada"
+ ASIA_TBILISI = "Asia/Tbilisi"
+ AMERICA_CAYENNE = "America/Cayenne"
+ EUROPE_GUERNSEY = "Europe/Guernsey"
+ AFRICA_ACCRA = "Africa/Accra"
+ EUROPE_GIBRALTAR = "Europe/Gibraltar"
+ AMERICA_GODTHAB = "America/Godthab"
+ AMERICA_DANMARKSHAVN = "America/Danmarkshavn"
+ AMERICA_SCORESBYSUND = "America/Scoresbysund"
+ AMERICA_THULE = "America/Thule"
+ AFRICA_BANJUL = "Africa/Banjul"
+ AFRICA_CONAKRY = "Africa/Conakry"
+ AMERICA_GUADELOUPE = "America/Guadeloupe"
+ AFRICA_MALABO = "Africa/Malabo"
+ EUROPE_ATHENS = "Europe/Athens"
+ ATLANTIC_SOUTH_GEORGIA = "Atlantic/South_Georgia"
+ AMERICA_GUATEMALA = "America/Guatemala"
+ PACIFIC_GUAM = "Pacific/Guam"
+ AFRICA_BISSAU = "Africa/Bissau"
+ AMERICA_GUYANA = "America/Guyana"
+ ASIA_HONG_KONG = "Asia/Hong_Kong"
+ AMERICA_TEGUCIGALPA = "America/Tegucigalpa"
+ EUROPE_ZAGREB = "Europe/Zagreb"
+ AMERICA_PORT_AU_PRINCE = "America/Port-au-Prince"
+ EUROPE_BUDAPEST = "Europe/Budapest"
+ ASIA_JAKARTA = "Asia/Jakarta"
+ ASIA_PONTIANAK = "Asia/Pontianak"
+ ASIA_MAKASSAR = "Asia/Makassar"
+ ASIA_JAYAPURA = "Asia/Jayapura"
+ EUROPE_DUBLIN = "Europe/Dublin"
+ ASIA_JERUSALEM = "Asia/Jerusalem"
+ EUROPE_ISLE_OF_MAN = "Europe/Isle_of_Man"
+ ASIA_KOLKATA = "Asia/Kolkata"
+ INDIAN_CHAGOS = "Indian/Chagos"
+ ASIA_BAGHDAD = "Asia/Baghdad"
+ ASIA_TEHRAN = "Asia/Tehran"
+ ATLANTIC_REYKJAVIK = "Atlantic/Reykjavik"
+ EUROPE_ROME = "Europe/Rome"
+ EUROPE_JERSEY = "Europe/Jersey"
+ AMERICA_JAMAICA = "America/Jamaica"
+ ASIA_AMMAN = "Asia/Amman"
+ ASIA_TOKYO = "Asia/Tokyo"
+ AFRICA_NAIROBI = "Africa/Nairobi"
+ ASIA_BISHKEK = "Asia/Bishkek"
+ ASIA_PHNOM_PENH = "Asia/Phnom_Penh"
+ PACIFIC_TARAWA = "Pacific/Tarawa"
+ PACIFIC_ENDERBURY = "Pacific/Enderbury"
+ PACIFIC_KIRITIMATI = "Pacific/Kiritimati"
+ INDIAN_COMORO = "Indian/Comoro"
+ AMERICA_ST_KITTS = "America/St_Kitts"
+ ASIA_PYONGYANG = "Asia/Pyongyang"
+ ASIA_SEOUL = "Asia/Seoul"
+ ASIA_KUWAIT = "Asia/Kuwait"
+ AMERICA_CAYMAN = "America/Cayman"
+ ASIA_ALMATY = "Asia/Almaty"
+ ASIA_QYZYLORDA = "Asia/Qyzylorda"
+ ASIA_AQTOBE = "Asia/Aqtobe"
+ ASIA_AQTAU = "Asia/Aqtau"
+ ASIA_ORAL = "Asia/Oral"
+ ASIA_VIENTIANE = "Asia/Vientiane"
+ ASIA_BEIRUT = "Asia/Beirut"
+ AMERICA_ST_LUCIA = "America/St_Lucia"
+ EUROPE_VADUZ = "Europe/Vaduz"
+ ASIA_COLOMBO = "Asia/Colombo"
+ AFRICA_MONROVIA = "Africa/Monrovia"
+ AFRICA_MASERU = "Africa/Maseru"
+ EUROPE_VILNIUS = "Europe/Vilnius"
+ EUROPE_LUXEMBOURG = "Europe/Luxembourg"
+ EUROPE_RIGA = "Europe/Riga"
+ AFRICA_TRIPOLI = "Africa/Tripoli"
+ AFRICA_CASABLANCA = "Africa/Casablanca"
+ EUROPE_MONACO = "Europe/Monaco"
+ EUROPE_CHISINAU = "Europe/Chisinau"
+ EUROPE_PODGORICA = "Europe/Podgorica"
+ AMERICA_MARIGOT = "America/Marigot"
+ INDIAN_ANTANANARIVO = "Indian/Antananarivo"
+ PACIFIC_MAJURO = "Pacific/Majuro"
+ PACIFIC_KWAJALEIN = "Pacific/Kwajalein"
+ EUROPE_SKOPJE = "Europe/Skopje"
+ AFRICA_BAMAKO = "Africa/Bamako"
+ ASIA_RANGOON = "Asia/Rangoon"
+ ASIA_ULAANBAATAR = "Asia/Ulaanbaatar"
+ ASIA_HOVD = "Asia/Hovd"
+ ASIA_CHOIBALSAN = "Asia/Choibalsan"
+ ASIA_MACAU = "Asia/Macau"
+ PACIFIC_SAIPAN = "Pacific/Saipan"
+ AMERICA_MARTINIQUE = "America/Martinique"
+ AFRICA_NOUAKCHOTT = "Africa/Nouakchott"
+ AMERICA_MONTSERRAT = "America/Montserrat"
+ EUROPE_MALTA = "Europe/Malta"
+ INDIAN_MAURITIUS = "Indian/Mauritius"
+ INDIAN_MALDIVES = "Indian/Maldives"
+ AFRICA_BLANTYRE = "Africa/Blantyre"
+ AMERICA_MEXICO_CITY = "America/Mexico_City"
+ AMERICA_CANCUN = "America/Cancun"
+ AMERICA_MERIDA = "America/Merida"
+ AMERICA_MONTERREY = "America/Monterrey"
+ AMERICA_MATAMOROS = "America/Matamoros"
+ AMERICA_MAZATLAN = "America/Mazatlan"
+ AMERICA_CHIHUAHUA = "America/Chihuahua"
+ AMERICA_OJINAGA = "America/Ojinaga"
+ AMERICA_HERMOSILLO = "America/Hermosillo"
+ AMERICA_TIJUANA = "America/Tijuana"
+ AMERICA_SANTA_ISABEL = "America/Santa_Isabel"
+ AMERICA_BAHIA_BANDERAS = "America/Bahia_Banderas"
+ ASIA_KUALA_LUMPUR = "Asia/Kuala_Lumpur"
+ ASIA_KUCHING = "Asia/Kuching"
+ AFRICA_MAPUTO = "Africa/Maputo"
+ AFRICA_WINDHOEK = "Africa/Windhoek"
+ PACIFIC_NOUMEA = "Pacific/Noumea"
+ AFRICA_NIAMEY = "Africa/Niamey"
+ PACIFIC_NORFOLK = "Pacific/Norfolk"
+ AFRICA_LAGOS = "Africa/Lagos"
+ AMERICA_MANAGUA = "America/Managua"
+ EUROPE_AMSTERDAM = "Europe/Amsterdam"
+ EUROPE_OSLO = "Europe/Oslo"
+ ASIA_KATHMANDU = "Asia/Kathmandu"
+ PACIFIC_NAURU = "Pacific/Nauru"
+ PACIFIC_NIUE = "Pacific/Niue"
+ PACIFIC_AUCKLAND = "Pacific/Auckland"
+ PACIFIC_CHATHAM = "Pacific/Chatham"
+ ASIA_MUSCAT = "Asia/Muscat"
+ AMERICA_PANAMA = "America/Panama"
+ AMERICA_LIMA = "America/Lima"
+ PACIFIC_TAHITI = "Pacific/Tahiti"
+ PACIFIC_MARQUESAS = "Pacific/Marquesas"
+ PACIFIC_GAMBIER = "Pacific/Gambier"
+ PACIFIC_PORT_MORESBY = "Pacific/Port_Moresby"
+ ASIA_MANILA = "Asia/Manila"
+ ASIA_KARACHI = "Asia/Karachi"
+ EUROPE_WARSAW = "Europe/Warsaw"
+ AMERICA_MIQUELON = "America/Miquelon"
+ PACIFIC_PITCAIRN = "Pacific/Pitcairn"
+ AMERICA_PUERTO_RICO = "America/Puerto_Rico"
+ ASIA_GAZA = "Asia/Gaza"
+ ASIA_HEBRON = "Asia/Hebron"
+ EUROPE_LISBON = "Europe/Lisbon"
+ ATLANTIC_MADEIRA = "Atlantic/Madeira"
+ ATLANTIC_AZORES = "Atlantic/Azores"
+ PACIFIC_PALAU = "Pacific/Palau"
+ AMERICA_ASUNCION = "America/Asuncion"
+ ASIA_QATAR = "Asia/Qatar"
+ INDIAN_REUNION = "Indian/Reunion"
+ EUROPE_BUCHAREST = "Europe/Bucharest"
+ EUROPE_BELGRADE = "Europe/Belgrade"
+ EUROPE_KALININGRAD = "Europe/Kaliningrad"
+ EUROPE_MOSCOW = "Europe/Moscow"
+ EUROPE_VOLGOGRAD = "Europe/Volgograd"
+ EUROPE_SAMARA = "Europe/Samara"
+ ASIA_YEKATERINBURG = "Asia/Yekaterinburg"
+ ASIA_OMSK = "Asia/Omsk"
+ ASIA_NOVOSIBIRSK = "Asia/Novosibirsk"
+ ASIA_NOVOKUZNETSK = "Asia/Novokuznetsk"
+ ASIA_KRASNOYARSK = "Asia/Krasnoyarsk"
+ ASIA_IRKUTSK = "Asia/Irkutsk"
+ ASIA_YAKUTSK = "Asia/Yakutsk"
+ ASIA_KHANDYGA = "Asia/Khandyga"
+ ASIA_VLADIVOSTOK = "Asia/Vladivostok"
+ ASIA_SAKHALIN = "Asia/Sakhalin"
+ ASIA_UST_NERA = "Asia/Ust-Nera"
+ ASIA_MAGADAN = "Asia/Magadan"
+ ASIA_KAMCHATKA = "Asia/Kamchatka"
+ ASIA_ANADYR = "Asia/Anadyr"
+ AFRICA_KIGALI = "Africa/Kigali"
+ ASIA_RIYADH = "Asia/Riyadh"
+ PACIFIC_GUADALCANAL = "Pacific/Guadalcanal"
+ INDIAN_MAHE = "Indian/Mahe"
+ AFRICA_KHARTOUM = "Africa/Khartoum"
+ EUROPE_STOCKHOLM = "Europe/Stockholm"
+ ASIA_SINGAPORE = "Asia/Singapore"
+ ATLANTIC_ST_HELENA = "Atlantic/St_Helena"
+ EUROPE_LJUBLJANA = "Europe/Ljubljana"
+ ARCTIC_LONGYEARBYEN = "Arctic/Longyearbyen"
+ EUROPE_BRATISLAVA = "Europe/Bratislava"
+ AFRICA_FREETOWN = "Africa/Freetown"
+ EUROPE_SAN_MARINO = "Europe/San_Marino"
+ AFRICA_DAKAR = "Africa/Dakar"
+ AFRICA_MOGADISHU = "Africa/Mogadishu"
+ AMERICA_PARAMARIBO = "America/Paramaribo"
+ AFRICA_JUBA = "Africa/Juba"
+ AFRICA_SAO_TOME = "Africa/Sao_Tome"
+ AMERICA_EL_SALVADOR = "America/El_Salvador"
+ AMERICA_LOWER_PRINCES = "America/Lower_Princes"
+ ASIA_DAMASCUS = "Asia/Damascus"
+ AFRICA_MBABANE = "Africa/Mbabane"
+ AMERICA_GRAND_TURK = "America/Grand_Turk"
+ AFRICA_NDJAMENA = "Africa/Ndjamena"
+ INDIAN_KERGUELEN = "Indian/Kerguelen"
+ AFRICA_LOME = "Africa/Lome"
+ ASIA_BANGKOK = "Asia/Bangkok"
+ ASIA_DUSHANBE = "Asia/Dushanbe"
+ PACIFIC_FAKAOFO = "Pacific/Fakaofo"
+ ASIA_DILI = "Asia/Dili"
+ ASIA_ASHGABAT = "Asia/Ashgabat"
+ AFRICA_TUNIS = "Africa/Tunis"
+ PACIFIC_TONGATAPU = "Pacific/Tongatapu"
+ EUROPE_ISTANBUL = "Europe/Istanbul"
+ AMERICA_PORT_OF_SPAIN = "America/Port_of_Spain"
+ PACIFIC_FUNAFUTI = "Pacific/Funafuti"
+ ASIA_TAIPEI = "Asia/Taipei"
+ AFRICA_DAR_ES_SALAAM = "Africa/Dar_es_Salaam"
+ EUROPE_KIEV = "Europe/Kiev"
+ EUROPE_UZHGOROD = "Europe/Uzhgorod"
+ EUROPE_ZAPOROZHYE = "Europe/Zaporozhye"
+ EUROPE_SIMFEROPOL = "Europe/Simferopol"
+ AFRICA_KAMPALA = "Africa/Kampala"
+ PACIFIC_JOHNSTON = "Pacific/Johnston"
+ PACIFIC_MIDWAY = "Pacific/Midway"
+ PACIFIC_WAKE = "Pacific/Wake"
+ AMERICA_NEW_YORK = "America/New_York"
+ AMERICA_DETROIT = "America/Detroit"
+ AMERICA_KENTUCKY_LOUISVILLE = "America/Kentucky/Louisville"
+ AMERICA_KENTUCKY_MONTICELLO = "America/Kentucky/Monticello"
+ AMERICA_INDIANA_INDIANAPOLIS = "America/Indiana/Indianapolis"
+ AMERICA_INDIANA_VINCENNES = "America/Indiana/Vincennes"
+ AMERICA_INDIANA_WINAMAC = "America/Indiana/Winamac"
+ AMERICA_INDIANA_MARENGO = "America/Indiana/Marengo"
+ AMERICA_INDIANA_PETERSBURG = "America/Indiana/Petersburg"
+ AMERICA_INDIANA_VEVAY = "America/Indiana/Vevay"
+ AMERICA_CHICAGO = "America/Chicago"
+ AMERICA_INDIANA_TELL_CITY = "America/Indiana/Tell_City"
+ AMERICA_INDIANA_KNOX = "America/Indiana/Knox"
+ AMERICA_MENOMINEE = "America/Menominee"
+ AMERICA_NORTH_DAKOTA_CENTER = "America/North_Dakota/Center"
+ AMERICA_NORTH_DAKOTA_NEW_SALEM = "America/North_Dakota/New_Salem"
+ AMERICA_NORTH_DAKOTA_BEULAH = "America/North_Dakota/Beulah"
+ AMERICA_DENVER = "America/Denver"
+ AMERICA_BOISE = "America/Boise"
+ AMERICA_PHOENIX = "America/Phoenix"
+ AMERICA_LOS_ANGELES = "America/Los_Angeles"
+ AMERICA_ANCHORAGE = "America/Anchorage"
+ AMERICA_JUNEAU = "America/Juneau"
+ AMERICA_SITKA = "America/Sitka"
+ AMERICA_YAKUTAT = "America/Yakutat"
+ AMERICA_NOME = "America/Nome"
+ AMERICA_ADAK = "America/Adak"
+ AMERICA_METLAKATLA = "America/Metlakatla"
+ PACIFIC_HONOLULU = "Pacific/Honolulu"
+ AMERICA_MONTEVIDEO = "America/Montevideo"
+ ASIA_SAMARKAND = "Asia/Samarkand"
+ ASIA_TASHKENT = "Asia/Tashkent"
+ EUROPE_VATICAN = "Europe/Vatican"
+ AMERICA_ST_VINCENT = "America/St_Vincent"
+ AMERICA_CARACAS = "America/Caracas"
+ AMERICA_TORTOLA = "America/Tortola"
+ AMERICA_ST_THOMAS = "America/St_Thomas"
+ ASIA_HO_CHI_MINH = "Asia/Ho_Chi_Minh"
+ PACIFIC_EFATE = "Pacific/Efate"
+ PACIFIC_WALLIS = "Pacific/Wallis"
+ PACIFIC_APIA = "Pacific/Apia"
+ ASIA_ADEN = "Asia/Aden"
+ INDIAN_MAYOTTE = "Indian/Mayotte"
+ AFRICA_JOHANNESBURG = "Africa/Johannesburg"
+ AFRICA_LUSAKA = "Africa/Lusaka"
+ AFRICA_HARARE = "Africa/Harare"
+ UTC = "UTC"
diff --git a/catalystwan/workflows/backup_restore_device_templates.py b/catalystwan/workflows/backup_restore_device_templates.py
deleted file mode 100644
index 8d3bdd75..00000000
--- a/catalystwan/workflows/backup_restore_device_templates.py
+++ /dev/null
@@ -1,466 +0,0 @@
-# Copyright 2023 Cisco Systems, Inc. and its affiliates
-
-from __future__ import annotations
-
-import json
-import logging
-import shutil
-import tarfile
-from copy import deepcopy
-from enum import Enum
-from pathlib import Path
-from typing import Any, Dict, List, Set, Tuple, Union
-
-from pydantic import BaseModel, ConfigDict, Field
-
-from catalystwan.api.templates.device_template.device_template import DeviceTemplate, GeneralTemplate
-from catalystwan.exceptions import ManagerHTTPError
-from catalystwan.models.templates import DeviceTemplateInformation, FeatureTemplateInformation
-from catalystwan.session import ManagerSession
-from catalystwan.typed_list import DataSequence
-
-logger = logging.getLogger(__name__)
-
-
-# ---------------------- HELPERS ---------------------- #
-
-
-FEATURE_TEMPLATE_KEYS = [
- "templateName",
- "templateDescription",
- "templateType",
- "templateMinVersion",
- "deviceType",
- "factoryDefault",
- "templateDefinition",
-]
-DEVICE_TEMPLATE_KEYS = [
- "templateName",
- "templateDescription",
- "deviceType",
- "configType",
- "factoryDefault",
- "policyId",
- "featureTemplateUidRange",
- "generalTemplates",
-]
-POLICY_KEYS = ["policyName", "policyDescription", "policyDefinition", "policyType"]
-
-
-class TemplatesJsonNames(Enum):
- DEVICE_TEMPLATES = "device_templates.json"
- FEAUTRE_TEMPLATES = "feature_templates.json"
- POLICIES = "policies.json"
- TEMPLATES_ARCHIVE = "templates_archive.tar.gz"
-
-
-class DeviceTemplatesList(BaseModel):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- templates: List[DeviceTemplate]
-
-
-class FeatureTemplatesDict(BaseModel):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- feature_templates_definitions: Dict = Field(default={})
-
-
-class PoiciesDict(BaseModel):
- model_config = ConfigDict(arbitrary_types_allowed=True, populate_by_name=True)
- policies_definitions: Dict = Field(default={})
-
-
-# ---------------------- EXPORT TEMPLATES ---------------------- #
-
-
-def write_json_to_file(data: BaseModel, file_path: Path):
- """Writes JSON representation of a Pydantic model to a file."""
- try:
- with file_path.open("w") as f:
- f.write(data.model_dump_json(indent=4, by_alias=True))
- except IOError as e:
- logger.error(f"Failed to write to {file_path}: {e}")
- raise e
-
-
-def create_tar_archive(source_dir: Path, archive_path: Path):
- """Creates a tar.gz archive of the specified directory."""
- with tarfile.open(archive_path, "w:gz") as tar:
- for file_name in source_dir.glob("*"):
- tar.add(file_name, arcname=file_name.name)
-
-
-def prepare_directory_for_templates(templates_directory: Path, force_existing_dir_removal: bool) -> bool:
- """Prepares a directory for storing templates, optionally removing existing content.
-
- Args:
- templates_directory: The path to the directory to prepare.
- force_existing_dir_removal: If True, any existing directory will be removed.
-
- Returns:
- bool: True if the directory was successfully prepared, False otherwise.
-
- Raises:
- PermissionError, OSError: If there is an error removing or creating the directory.
- """
- if templates_directory.exists():
- logger.info(f"The directory {templates_directory} already exists.")
- if force_existing_dir_removal:
- try:
- for child in templates_directory.iterdir():
- if child.is_file():
- child.unlink()
- elif child.is_dir():
- child.rmdir()
- templates_directory.rmdir()
- logger.info(f"Removed existing directory {templates_directory}.")
- except (PermissionError, OSError) as ex:
- logger.error(f"An error occurred while removing the directory: {ex}")
- raise ex
- else:
- logger.warning(f"Directory with name: {templates_directory} already exists and will not be overwritten.")
- return False
- try:
- templates_directory.mkdir(parents=True, exist_ok=True)
- logger.info(f"Directory created at {templates_directory}")
- return True
- except (PermissionError, OSError) as ex:
- logger.error(f"Exception while creating directory: {ex}")
- raise ex
-
-
-def extract_template_ids(template: GeneralTemplate) -> Set[str]:
- """Recursively extracts template IDs from a GeneralTemplate and its sub-templates."""
- template_ids = {template.template_id}
- for sub_template in getattr(template, "sub_templates", []):
- template_ids.update(extract_template_ids(sub_template))
- return template_ids
-
-
-def export_device_templates(
- session: ManagerSession, device_template_list: DataSequence[DeviceTemplateInformation], templates_directory: Path
-) -> Tuple[Dict[str, Set[str]], Dict[str, str]]:
- """Exports device templates to JSON files and returns related feature and policy IDs.
-
- Args:
- session: The session object to interact with the API.
- device_template_list: A sequence of DeviceTemplateInformation instances to be exported.
- templates_directory: The directory where the JSON files will be written.
-
- Returns:
- Tuple[Dict[str, Set[str]], Dict[str, str]]: A tuple containing two dictionaries,
- one mapping device template names to sets of feature IDs, and the other mapping
- device template names to policy IDs.
- """
- device_templates = DataSequence(DeviceTemplate)
- device_feature_id: Dict[str, Set[str]] = {}
- device_policy_id: Dict[str, str] = {}
-
- for device_template_info in device_template_list:
- device_template: DeviceTemplate = DeviceTemplate.get(name=device_template_info.name, session=session)
-
- if device_template.policy_id:
- device_policy_id[device_template_info.name] = device_template.policy_id
-
- device_feature_id[device_template_info.name] = set()
-
- for feature in device_template.general_templates:
- device_feature_id[device_template_info.name].update(extract_template_ids(feature))
-
- if device_template.feature_template_uid_range:
- for additional_template in device_template.feature_template_uid_range:
- device_feature_id[device_template_info.name].update(additional_template["templateId"])
-
- device_templates.append(device_template)
-
- device_templates_as_pydantic = DeviceTemplatesList(templates=[template for template in device_templates])
-
- file_path = Path(templates_directory / TemplatesJsonNames.DEVICE_TEMPLATES.value)
- write_json_to_file(device_templates_as_pydantic, file_path)
-
- logger.info(f"Successfully written {len(device_templates)} Device Template(s) definitions to files.")
- return device_feature_id, device_policy_id
-
-
-def export_feature_templates(
- session: ManagerSession, device_feature_id: Dict[str, Set[str]], templates_directory: Path
-) -> None:
- """Exports feature templates to a JSON file."""
- feature_template_dict = FeatureTemplatesDict()
- feature_template_json_file = Path(templates_directory / TemplatesJsonNames.FEAUTRE_TEMPLATES.value)
-
- for template_id_list in device_feature_id.values():
- for template_id in template_id_list:
- feature_data: DataSequence[
- FeatureTemplateInformation
- ] = session.endpoints.configuration_general_template.get_template_definition(
- template_id=template_id
- ).single_or_default()
- feature_template_dict.feature_templates_definitions[template_id] = feature_data
-
- write_json_to_file(feature_template_dict, feature_template_json_file)
- number_of_templates = len(feature_template_dict.feature_templates_definitions)
- logger.info(f"Successfully written {number_of_templates} Feature Templates definitions.")
-
-
-def export_policy_templates(
- session: ManagerSession, device_policy_id_dict: Dict[str, str], templates_directory: Path
-) -> None:
- """Exports policy templates to a JSON file."""
- policy_template_json_file = Path(templates_directory / TemplatesJsonNames.POLICIES.value)
-
- existing_policies = session.api.policy.localized._endpoints.generate_policy_template_list()
- policies_dict = PoiciesDict()
-
- for policy_id in device_policy_id_dict.values():
- for policy in existing_policies:
- if policy_id == str(policy.policy_id):
- policies_dict.policies_definitions[policy_id] = policy
- write_json_to_file(policies_dict, policy_template_json_file)
-
-
-def export_templates(
- session: ManagerSession,
- templates_directory: Path = Path.home() / "default_templates",
- force_existing_dir_removal: bool = False,
- filters: dict = {},
-):
- """Main function to export all templates and create an archive.
-
- Args:
- session: The session object to interact with the API.
- templates_directory: The directory where the templates and archive will be stored.
- force_existing_dir_removal: If True, the existing templates directory will be removed.
- filter: A dictionary of filters to apply when retrieving Device Templates
- """
- dir_ready = prepare_directory_for_templates(
- templates_directory=templates_directory, force_existing_dir_removal=force_existing_dir_removal
- )
-
- if dir_ready:
- device_templates_list: DataSequence[
- DeviceTemplateInformation
- ] = session.endpoints.configuration_template_master.get_device_template_list().filter(
- config_type="template", **filters
- )
-
- device_feature_id, device_policy_id = export_device_templates(
- session, device_templates_list, templates_directory
- )
- export_feature_templates(session, device_feature_id, templates_directory)
- export_policy_templates(session, device_policy_id, templates_directory)
-
- templates_archive_path = Path(templates_directory / TemplatesJsonNames.TEMPLATES_ARCHIVE.value)
- create_tar_archive(templates_directory, templates_archive_path)
-
-
-# ---------------------- IMPORT TEMPLATES ---------------------- #
-
-
-def extract_tar_with_templates_to_path(templates_directory: Path, dest_dir_path: Path) -> None:
- if dest_dir_path.exists():
- shutil.rmtree(dest_dir_path)
- dest_dir_path.mkdir(parents=True)
- templates_archive_path = Path(templates_directory / TemplatesJsonNames.TEMPLATES_ARCHIVE.value)
- try:
- with tarfile.open(templates_archive_path) as tar:
- tar.extractall(path=dest_dir_path)
- except tarfile.TarError as e:
- logger.error(f"An error occurred while extracting the tar file: {e}")
- raise
-
-
-def load_json_from_file(file_path: Union[str, Path]):
- with open(file_path, "r") as file:
- return json.load(file)
-
-
-def get_feature_template_name_to_id_map(session: ManagerSession) -> Dict[str, str]:
- """Retrieves a mapping of feature template names to their IDs."""
- feature_data = session.endpoints.configuration_general_template.get_feature_template_list()
- return {feature.name: feature.id for feature in feature_data} if feature_data else {}
-
-
-def check_device_template_exists(session: ManagerSession, device_template_name: str) -> bool:
- device_data: DataSequence[
- DeviceTemplateInformation
- ] = session.endpoints.configuration_template_master.get_device_template_list()
- return any(device_template_name == device.name for device in device_data)
-
-
-def check_policy_exists(session: ManagerSession, policy_name: str) -> Union[str, bool]:
- """Checks if a policy with the given name exists and returns its ID."""
- policy_data = session.endpoints.configuration.policy.vedge_template.generate_policy_template_list()
- policy = next((p for p in policy_data if p.policy_name == policy_name), None)
- return policy.policy_id if policy else False
-
-
-def clean_dict(data: Dict[str, Any], allowed_keys: List[str]) -> Dict[str, Any]:
- """Prepare Dictionary so it can be used as JSON Payload."""
- return {k: v for k, v in data.items() if k in allowed_keys}
-
-
-def update_template_ids(template: Dict[str, Any], template_id_mapping: Dict[str, str]) -> None:
- """Updates the template IDs in a template dictionary."""
- for key in ["generalTemplates", "featureTemplateUidRange"]:
- for item in template.get(key, []):
- item["templateId"] = template_id_mapping.get(item["templateId"], item["templateId"])
- for sub_key in ["subTemplates"]:
- for sub_item in item.get(sub_key, []):
- sub_item["templateId"] = template_id_mapping.get(sub_item["templateId"], sub_item["templateId"])
-
-
-def process_feature_templates(
- session: ManagerSession, feature_template_data, feature_template_name_to_id_map: Dict[str, str]
-) -> Dict[str, str]:
- """Processes feature templates and creates new ones if they do not exist.
-
- Args:
- session: The session object to interact with the API.
- feature_template_data: The feature template data to process.
- feature_template_name_to_id_map: A mapping of feature template names to IDs.
-
- Returns:
- A dictionary mapping existing template IDs to new template IDs.
-
- Raises:
- ManagerHTTPError: If there is an error creating the feature templates.
- """
-
- template_id_mapping = {}
-
- for template_id, feature_data in feature_template_data["feature_templates_definitions"].items():
- template_definition = clean_dict(feature_data, FEATURE_TEMPLATE_KEYS)
- if template_definition["templateName"] in feature_template_name_to_id_map:
- new_template_id = feature_template_name_to_id_map[template_definition["templateName"]]
- logger.info(f"Skipping Feature Template: {template_definition['templateName']}")
- else:
- try:
- endpoint = "/dataservice/template/feature"
- response = session.post(endpoint, json=template_definition)
- new_template_id = response.json()["templateId"] if response else None
- logger.info(f"Created Feature Template: {template_definition['templateName']}")
- except ManagerHTTPError as ex:
- logger.error(
- f"Could not create Feature Template {template_definition['templateName']}."
- "\nManager error: {ex.info}"
- )
- raise ex
- template_id_mapping[template_id] = new_template_id
-
- return template_id_mapping
-
-
-def process_device_template(
- session: ManagerSession, device_template: Dict[str, Any], template_id_mapping: Dict[str, str]
-) -> None:
- """Processes a device template and creates it if it does not exist.
-
- Args:
- session: The session object to interact with the API.
- device_template: The device template data to process.
- template_id_mapping: A dictionary mapping old template IDs to new ones.
-
- Raises:
- ManagerHTTPError: If there is an error creating the device template.
- """
- new_device_template = deepcopy(device_template)
- update_template_ids(new_device_template, template_id_mapping)
-
- new_device_template = clean_dict(new_device_template, DEVICE_TEMPLATE_KEYS)
-
- if not check_device_template_exists(session, new_device_template["templateName"]):
- try:
- response = session.endpoints.configuration_template_master.create_device_template_from_feature_templates(
- payload=new_device_template
- )
- logger.info(f"Created Device Template: {new_device_template['templateName']}, id: {response.template_id}")
- except ManagerHTTPError as ex:
- logger.error(
- f"Could not create Device Template {new_device_template['templateName']}.\nManager error: {ex.info}"
- )
- raise ex
- else:
- print(f"Skipping Device Template: {new_device_template['templateName']}")
-
-
-def process_policy(session: ManagerSession, policy_data, device_template: Dict[str, Any]) -> None:
- """Processes a policy and creates it if it does not exist."""
- if "policyId" in device_template and device_template["policyId"]:
- policy_id = device_template["policyId"]
- if policy_id in policy_data["policies_definitions"]:
- policy_definition = clean_dict(policy_data["policies_definitions"][policy_id], POLICY_KEYS)
- existing_policy_id = check_policy_exists(session, policy_definition["policyName"])
- if not existing_policy_id:
- # session.endpoints.configuration.policy.vedge_template.create_vedge_template
- try:
- endpoint = "/dataservice/template/policy/vedge"
- response = session.post(endpoint, json=policy_definition)
- new_policy_id = response.json()["policyId"] if response else None
- logger.info(f"Created Policy: {policy_definition['policyName']}")
- except ManagerHTTPError as ex:
- logger.error(
- f"Could not create Policy {policy_definition['policyName']}.\nManager error: {ex.info}"
- )
- raise ex
- else:
- new_policy_id = existing_policy_id
- logger.info(f"Skipping Policy: {policy_definition['policyName']}")
- device_template["policyId"] = str(new_policy_id)
- else:
- logger.warning("Policy data missing in backup")
-
-
-def import_templates(session: ManagerSession, templates_directory: Path) -> None:
- """Imports templates from a specified directory into the session.
-
- Extracts the templates from a tar archive, loads the JSON data for device,
- feature, and policy templates, and then processes them to create or update the templates
- in the session.
-
- Args:
- session: The session object to interact with the API.
- templates_directory: The directory containing the tar archive of templates.
-
- Raises:
- FileNotFoundError: If the specified template JSON files are not found in the directory.
- ManagerHTTPError: If there is an error processing the templates through the API.
- """
- dest_dir_path = Path(Path.cwd() / "templates")
- extract_tar_with_templates_to_path(templates_directory, dest_dir_path)
-
- device_template_json_file = dest_dir_path / TemplatesJsonNames.DEVICE_TEMPLATES.value
- feature_template_file = dest_dir_path / TemplatesJsonNames.FEAUTRE_TEMPLATES.value
- policy_json_file = dest_dir_path / TemplatesJsonNames.POLICIES.value
-
- device_template_data = load_json_from_file(device_template_json_file)
- feature_template_data = load_json_from_file(feature_template_file)
- policy_data = load_json_from_file(policy_json_file) if policy_json_file.exists() else None
-
- feature_template_name_to_id_map = get_feature_template_name_to_id_map(session)
-
- template_id_mapping = process_feature_templates(session, feature_template_data, feature_template_name_to_id_map)
-
- for device_template in device_template_data["templates"]:
- if policy_data:
- process_policy(session, policy_data, device_template)
- process_device_template(session, device_template, template_id_mapping)
-
-
-# --- Execution --- #
-
-"""
-
-session = create_manager_session(url="X.X.X.X", port=443, username="admin", password="blabla")
-
-export_templates(
- session=session,
- templates_directory=Path("/Users/acichon/Work/cisco-open/cisco-catalyst-wan-sdk/templates_export"),
- filters={"factory_default": False},
- force_existing_dir_removal=True,
-)
-
-import_templates(
- session=session, templates_directory=Path("/Users/acichon/Work/cisco-open/cisco-catalyst-wan-sdk/templates_export")
-)
-
-"""
diff --git a/catalystwan/workflows/config_migration.py b/catalystwan/workflows/config_migration.py
index ce7f677f..d7d2c82a 100644
--- a/catalystwan/workflows/config_migration.py
+++ b/catalystwan/workflows/config_migration.py
@@ -300,34 +300,34 @@ def transform(ux1: UX1Config, add_suffix: bool = False) -> ConfigTransformResult
for template in templates:
# Those feature templates IDs are real UUIDs and are used to map to the feature profiles
- if template.template_type in VPN_TEMPLATE_TYPES:
+ if template.templateType in VPN_TEMPLATE_TYPES:
copied_feature_templates = resolve_vpn_and_subtemplates_type(template, ux1)
used_feature_templates.update(copied_feature_templates)
else:
- used_feature_templates.add(template.template_id)
- template_uuid = UUID(template.template_id)
- if template.template_type in FEATURE_PROFILE_SYSTEM:
+ used_feature_templates.add(template.templateId)
+ template_uuid = UUID(template.templateId)
+ if template.templateType in FEATURE_PROFILE_SYSTEM:
transformed_fp_system.header.subelements.add(template_uuid)
- elif template.template_type in FEATURE_PROFILE_OTHER:
+ elif template.templateType in FEATURE_PROFILE_OTHER:
transformed_fp_other.header.subelements.add(template_uuid)
- elif template.template_type in FEATURE_PROFILE_SERVICE:
+ elif template.templateType in FEATURE_PROFILE_SERVICE:
transformed_fp_service.header.subelements.add(template_uuid)
- elif template.template_type in FEATURE_PROFILE_TRANSPORT:
+ elif template.templateType in FEATURE_PROFILE_TRANSPORT:
transformed_fp_transport_and_management.header.subelements.add(template_uuid)
- elif template.template_type in FEATURE_PROFILE_CLI:
+ elif template.templateType in FEATURE_PROFILE_CLI:
transformed_fp_cli.header.subelements.add(template_uuid)
# Map subtemplates
- if len(template.sub_templates) > 0:
+ if len(template.subTemplates) > 0:
# Interfaces, BGP, OSPF, etc
- for subtemplate_level_1 in template.sub_templates:
- used_feature_templates.add(subtemplate_level_1.template_id)
- subtemplates_mapping[template_uuid].add(UUID(subtemplate_level_1.template_id))
- if len(subtemplate_level_1.sub_templates) > 0:
+ for subtemplate_level_1 in template.subTemplates:
+ used_feature_templates.add(subtemplate_level_1.templateId)
+ subtemplates_mapping[template_uuid].add(UUID(subtemplate_level_1.templateId))
+ if len(subtemplate_level_1.subTemplates) > 0:
# DHCPs, Trackers
- for subtemplate_level_2 in subtemplate_level_1.sub_templates:
- used_feature_templates.add(subtemplate_level_2.template_id)
- subtemplates_mapping[UUID(subtemplate_level_1.template_id)].add(
- UUID(subtemplate_level_2.template_id)
+ for subtemplate_level_2 in subtemplate_level_1.subTemplates:
+ used_feature_templates.add(subtemplate_level_2.templateId)
+ subtemplates_mapping[UUID(subtemplate_level_1.templateId)].add(
+ UUID(subtemplate_level_2.templateId)
)
policy_id = dt.get_policy_uuid()
transformed_cg = TransformedConfigGroup(