2.36. test_gbp module

class test_gbp.TestGBP(methodName='runTest')

Bases: framework.VppTestCase

GBP Test Case

send_and_expect_bridged(src, tx, dst)
send_and_expect_bridged6(src, tx, dst)
send_and_expect_double_natted(src, tx, dst, src_ip, dst_ip)
send_and_expect_double_natted6(src, tx, dst, src_ip, dst_ip)
send_and_expect_natted(src, tx, dst, src_ip)
send_and_expect_natted6(src, tx, dst, src_ip)
send_and_expect_routed(src, tx, dst, src_mac)
send_and_expect_unnatted(src, tx, dst, dst_ip)
send_and_expect_unnatted6(src, tx, dst, dst_ip)
setUp()

Clear trace before running each test

classmethod setUpClass()

Perform class setup before running the testcase Remove shared memory files, start vpp and connect the vpp-api

tearDown()

Show various debug prints after each test

classmethod tearDownClass()

Perform final cleanup after running all tests in this test-case

test_gbp()

Group Based Policy

test_gbp_bd_flags()

GBP BD FLAGS

test_gbp_l3_out()

GBP L3 Out

test_gbp_learn_l2()

GBP L2 Endpoint Learning

test_gbp_learn_l3()

GBP L3 Endpoint Learning

test_gbp_learn_vlan_l2()

GBP L2 Endpoint w/ VLANs

test_gbp_redirect()

GBP Endpoint Redirect

wait_for_ep_timeout(sw_if_index=None, ip=None, mac=None, n_tries=100, s_time=1)
class test_gbp.VppGbpAcl(test)

Bases: vpp_object.VppObject

GBP Acl

add_vpp_config(rules)

Add the configuration for this object to vpp.

create_rule(is_ipv6=0, permit_deny=0, proto=-1, s_prefix=0, s_ip=b'\x00\x00\x00\x00', sport_from=0, sport_to=65535, d_prefix=0, d_ip=b'\x00\x00\x00\x00', dport_from=0, dport_to=65535)
object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpBridgeDomain(test, bd, bvi, uu_fwd=None, bm_flood=None, learn=True, uu_drop=False, bm_drop=False)

Bases: vpp_object.VppObject

GBP Bridge Domain

add_vpp_config()

Add the configuration for this object to vpp.

object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpContract(test, sclass, dclass, acl_index, rules, allowed_ethertypes)

Bases: vpp_object.VppObject

GBP Contract

add_vpp_config()

Add the configuration for this object to vpp.

get_drop_stats()
get_permit_stats()
object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpContractNextHop(mac, bd, ip, rd)

Bases: object

encode()
class test_gbp.VppGbpContractRule(action, hash_mode, nhs=[])

Bases: object

encode()
class test_gbp.VppGbpEndpoint(test, itf, epg, recirc, ip4, fip4, ip6, fip6, flags=0, tun_src='0.0.0.0', tun_dst='0.0.0.0', mac=True)

Bases: vpp_object.VppObject

GBP Endpoint

add_vpp_config()

Add the configuration for this object to vpp.

fip4
fip6
fips
ip4
ip6
ips
mac
object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpEndpointGroup(test, vnid, sclass, rd, bd, uplink, bvi, bvi_ip4, bvi_ip6=None, retention=<test_gbp.VppGbpEndpointRetention object>)

Bases: vpp_object.VppObject

GBP Endpoint Group

add_vpp_config()

Add the configuration for this object to vpp.

object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpEndpointRetention(remote_ep_timeout=4294967295)

Bases: object

encode()
class test_gbp.VppGbpExtItf(test, itf, bd, rd)

Bases: vpp_object.VppObject

GBP ExtItfulation Interface

add_vpp_config()

Add the configuration for this object to vpp.

object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpRecirc(test, epg, recirc, is_ext=False)

Bases: vpp_object.VppObject

GBP Recirculation Interface

add_vpp_config()

Add the configuration for this object to vpp.

object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpRouteDomain(test, rd_id, t4, t6, ip4_uu=None, ip6_uu=None)

Bases: vpp_object.VppObject

GBP Route Domain

add_vpp_config()

Add the configuration for this object to vpp.

object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpSubnet(test, rd, address, address_len, type, sw_if_index=None, sclass=None)

Bases: vpp_object.VppObject

GBP Subnet

add_vpp_config()

Add the configuration for this object to vpp.

object_id()

Return a unique string representing this object.

query_vpp_config()

Query the vpp configuration.

Returns

True if the object is configured

remove_vpp_config()

Remove the configuration for this object from vpp.

class test_gbp.VppGbpVxlanTunnel(test, vni, bd_rd_id, mode, src)

Bases: vpp_interface.VppInterface

GBP VXLAN tunnel

add_vpp_config()
object_id()
query_vpp_config()
remove_vpp_config()
test_gbp.find_gbp_endpoint(test, sw_if_index=None, ip=None, mac=None)
test_gbp.find_gbp_vxlan(test, vni)