2.42. test_gbp module

class test_gbp.TestGBP(methodName='runTest')

Bases: framework.VppTestCase

GBP Test Case

property config_flags
send_and_expect_arp(src, tx, dst)
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_no_arp(src, tx, dst)
send_and_expect_routed(src, tx, dst, src_mac)
send_and_expect_routed6(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_anon_l3_out()

GBP Anonymous L3 Out

test_gbp_bd_arp_flags()

GBP BD arp flags

test_gbp_bd_drop_flags()

GBP BD drop flags

test_gbp_contract()

GBP Contracts

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

test_gbp_redirect_extended()

GBP Endpoint Redirect Extended

wait_for_ep_timeout(sw_if_index=None, ip=None, mac=None, tep=None, n_tries=100, s_time=1)
class test_gbp.VppGbpBridgeDomain(test, bd, rd, bvi, uu_fwd=None, bm_flood=None, learn=True, uu_drop=False, bm_drop=False, ucast_arp=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, scope, 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=None)

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.

property fip4
property fip6
property fips
property ip4
property ip6
property ips
property 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, anon=False)

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, scope, 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, tep=None, sclass=None, flags=None)
test_gbp.find_gbp_vxlan(test, vni)