Routing Zones (VRFs)
In Apstra 4.0 Security-Zones were renamed Routing-Zones. To conform to backwards-conpatability of the API you will see the security-zone API endpoint used.
Imports
import json
from aos.client import AosClient
from scripts.utils import deserialize_fixture, render_jinja_template
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
You will need to update the connection details below with your specific AOS instance
Login
Find Blueprint by Name
Find IP resource pool to use with the Routing-Zone
leaf_lo_pool = aos.resources.ipv4_pools.find_by_name(name="leaf-loopback").pop()
sz_name = "Finance"
dhcp_rely_addr = "9.0.0.1"
Create Routing-Zone
aos.blueprint.create_security_zone(
bp_id=bp.id,
name=sz_name,
leaf_loopback_ip_pools=[leaf_lo_pool.id],
dhcp_servers=[dhcp_rely_addr],
)