2.33. 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

tearDown()

Show various debug prints after each test

test_gbp()

Group Based Policy

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='\x00\x00\x00\x00', sport_from=0, sport_to=65535, d_prefix=0, d_ip='\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.VppGbpContract(test, src_epg, dst_epg, acl_index)

Bases: vpp_object.VppObject

GBP Contract

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.VppGbpEndpoint(test, itf, epg, recirc, ip, fip, is_ip6=False)

Bases: vpp_object.VppObject

GBP Endpoint

add_vpp_config()

Add the configuration for this object to vpp.

bin_mac
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, epg, rd, bd, uplink, bvi, bvi_ip4, bvi_ip6=None)

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.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.VppGbpSubnet(test, table_id, address, address_len, is_internal=True, is_ip6=False, sw_if_index=None, epg=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.