<gh_stars>0


VRF_CLI_INIT = """vrf definition {name}
    description {description}
    rd {rd}
    address-family ipv4
        export map exp-{name}"""

BDI_NO_POLICY_CLI_INIT = """interface BDI{id}
    description {description}
    mac-address {mac}
    mtu {mtu}
    vrf forwarding {vrf}
    ip address {ip} {netmask}
    ip nat {nat}
    no shutdown"""

BDI_POLICY_CLI_INIT = """interface BDI{id}
    description {description}
    mac-address {mac}
    mtu {mtu}
    vrf forwarding {vrf}
    ip address {ip} {netmask}
    ip nat {nat}
    ip policy route-map {route_map}
    no shutdown"""


PBR_ROUTE_MAP = """route-map pbr-{vrf} permit 10 
    match ip address PBR-{vrf}
    set ip next-hop {gateway} force"""

PBR_ACCESS_LIST = """ip access-list extended PBR-{vrf}
    permit ip any {network} {netmask}"""

VRF_CLI_INIT = """vrf definition {name}
    description {description}
    rd {rd}
    address-family ipv4
        export map exp-{name}"""

BDI_NO_POLICY_CLI_INIT = """interface BDI{id}
    description {description}
    mac-address {mac}
    mtu {mtu}
    vrf forwarding {vrf}
    ip address {ip} {netmask}
    ip nat {nat}
    no shutdown"""

BDI_POLICY_CLI_INIT = """interface BDI{id}
    description {description}
    mac-address {mac}
    mtu {mtu}
    vrf forwarding {vrf}
    ip address {ip} {netmask}
    ip nat {nat}
    ip policy route-map {route_map}
    no shutdown"""


PBR_ROUTE_MAP = """route-map pbr-{vrf} permit 10 
    match ip address PBR-{vrf}
    set ip next-hop {gateway} force"""

PBR_ACCESS_LIST = """ip access-list extended PBR-{vrf}
    permit ip any {network} {netmask}"""
vrf definition {name}     description {description}     rd {rd}     address-family ipv4         export map exp-{name} interface BDI{id}     description {description}     mac-address {mac}     mtu {mtu}     vrf forwarding {vrf}     ip address {ip} {netmask}     ip nat {nat}     no shutdown interface BDI{id}     description {description}     mac-address {mac}     mtu {mtu}     vrf forwarding {vrf}     ip address {ip} {netmask}     ip nat {nat}     ip policy route-map {route_map}     no shutdown route-map pbr-{vrf} permit 10      match ip address PBR-{vrf}     set ip next-hop {gateway} force ip access-list extended PBR-{vrf}     permit ip any {network} {netmask}