From 2380bcdbd5be31e552d9259592249b13fa432286 Mon Sep 17 00:00:00 2001 From: Artur Zdolinski Date: Fri, 1 Apr 2022 16:20:24 +0000 Subject: [PATCH] added create SZ with vni_id --- aos/blueprint.py | 6 +++++- tests/test_blueprint.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aos/blueprint.py b/aos/blueprint.py index 8877543..a09b3ea 100644 --- a/aos/blueprint.py +++ b/aos/blueprint.py @@ -1648,6 +1648,7 @@ def create_security_zone( routing_policy: dict = None, import_policy: str = None, vlan_id: int = None, + vni_id: int = None, leaf_loopback_ip_pools: list = None, dhcp_servers: list = None, timeout: int = 60, @@ -1677,6 +1678,8 @@ def create_security_zone( (str) - change the route import policy. Default is "default_only ["default_only", "all", "extra_only"] + vni_id + (int) - VxLAN VNI assosiated with the routing zone vlan_id (int) - VLAN ID use for sub-interface tagging with external system connections. Must be unique across all security zones @@ -1716,6 +1719,7 @@ def create_security_zone( "label": name, "vrf_name": name, "vlan_id": vlan_id, + "vni_id": vni_id } sz_task = self.create_security_zone_from_json( @@ -1732,7 +1736,7 @@ def create_security_zone( # SZ leaf loopback pool if leaf_loopback_ip_pools: group_name = "leaf_loopback_ips" - group_path = requote_uri(f"sz:{sz.id} {group_name}") + group_path = requote_uri(f"sz:{sz.id},{group_name}") self.apply_resource_groups( bp_id=bp_id, resource_type="ip", diff --git a/tests/test_blueprint.py b/tests/test_blueprint.py index 639978e..ea4aa03 100644 --- a/tests/test_blueprint.py +++ b/tests/test_blueprint.py @@ -589,7 +589,7 @@ def test_create_security_zone( sz_id = "78eff7d7-e936-4e6e-a9f7-079b9aa45f98" resource_type = "ip" group_name = "leaf_loopback_ips" - group_path = requote_uri(f"sz:{sz_id} {group_name}") + group_path = requote_uri(f"sz:{sz_id},{group_name}") pool_id = "leaf-loopback-pool-id" aos_session.add_response(