aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Expand)AuthorFilesLines
2021-01-09l2: fix tests for learn_limitJerome Tollet3-58/+236
2021-01-08l2: Separating scan-delay and learn-limit into a separate API from want_l2_ma...Jerome Tollet2-0/+53
2021-01-08tests: move bond tests to src/vnet/bonding/testDave Wallace2-373/+0
2021-01-08l2: fix l2 bd_learnlimitJerome Tollet1-6/+1
2021-01-08tests: Use soft links for the test file stagingNeale Ranns1-2/+3
2021-01-08vhost: Add event index for interrupt notification to driverSteven Luong1-15/+18
2021-01-07ipip: Support MPLS over IPNeale Ranns1-1/+149
2021-01-07ipsec: Deprecated the old IPsec Tunnel interfaceNeale Ranns5-431/+288
2021-01-06l2: add per bridge domain learn limitJerome Tollet1-6/+47
2020-12-23tests: move bier tests to src/vnet/bier/testDave Wallace2-1155/+0
2020-12-22tests: move bfd tests to src/vnet/bfd/testDave Wallace2-3201/+0
2020-12-22tests: fix gathering of test src filesDave Wallace1-1/+1
2020-12-18misc: deprecate old perfmonDamjan Marion1-1/+0
2020-12-16tests: move fib tests to src/vnet/fib/testDave Wallace2-456/+0
2020-12-16ip: fix possible missing trace indexesKlement Sekera1-0/+101
2020-12-16l2: add l2 learn limit testsJerome Tollet1-0/+119
2020-12-10tests: check ethernet type in arp test caseElias Rudberg1-0/+4
2020-12-08tests: restore vapi C++ test under Centos-8Paul Vinciguerra2-9/+1
2020-12-08fib: Source Address SelectionNeale Ranns2-25/+144
2020-12-07tests: py2 cleanup - remove subclassing of objectPaul Vinciguerra8-18/+18
2020-12-06tests: remove the dependency on subprocess32Paul Vinciguerra2-14/+1
2020-12-06tests: refactor ForeignAddressFactoryPaul Vinciguerra1-13/+0
2020-12-03tests: remove py2/py3 six compatability libraryPaul Vinciguerra9-37/+18
2020-12-03tests: fix typo in numbered list in documentationElias Rudberg1-5/+6
2020-12-03tests: remove aenum libraryPaul Vinciguerra2-5/+1
2020-12-02tests: add type annotations to the vpp object abstract classPaul Vinciguerra1-12/+12
2020-12-01tests: remove ip_punt from vpp_papi_provider and add ip_punt object modelsJakub Grajciar5-91/+103
2020-11-30tests: Fix unversioned python shebang linesDave Wallace3-3/+3
2020-11-30tests: IPv6 multicast over GRENeale Ranns1-0/+76
2020-11-26vlib: clean up event-logger CLIDave Barach1-7/+7
2020-11-26fib: Only track cover if activatedNeale Ranns1-5/+9
2020-11-25ipsec: A P2MP ipsec interface is NBMANeale Ranns1-0/+2
2020-11-25ip-neighbor: Send API event when neighbor is removedNeale Ranns1-0/+35
2020-11-24tests: remove bond, pipe, session and api_namespace from vpp_papi_providerJakub Grajciar5-61/+12
2020-11-24tests: remove svs, proxy_arp and gso from vpp_papi_providerOle Troan3-85/+13
2020-11-24tests: [re]enable an ARP test form incompleteNeale Ranns1-8/+3
2020-11-20ip-neighbor: Use ip_address_t rather than ip46_address_tNeale Ranns2-1/+8
2020-11-17tests: move crypto tests to src/vnet/crypto/testDave Wallace1-28/+0
2020-11-17tests: move classifier tests to src/vnet/classify/testDave Wallace2-1059/+0
2020-11-17tests: move vpp-api tests to src/vpe-api/testDave Wallace3-174/+0
2020-11-17tests: move gre tests to src/vnet/gre/testDave Wallace1-1275/+0
2020-11-17tests: move GSO/GRO tests to src/vnet/gso/testDave Wallace2-855/+0
2020-11-16tests: move cli tests to src/vlib/testDave Wallace1-89/+0
2020-11-16tests: move buffer tests to src/vlib/testDave Wallace1-29/+0
2020-11-16tests: move bihash tests to src/vppinfra/testDave Wallace1-71/+0
2020-11-10classify: fix classify filter trace del cli processingJon Loeliger2-7/+5
2020-11-02ipsec: Tunnel SA DSCP behaviourNeale Ranns6-25/+230
2020-10-21ipsec: support for multipoint on ipsec interfacesNeale Ranns2-4/+128
2020-10-21ip: convert u32 entry_flags to vl_api_mfib_entry_flags_t on mroute APINeale Ranns6-140/+185
2020-10-16misc: deprecate VOMDamjan Marion3-2378/+3
="sa">u"utf-8"), cir=int(cir), eir=int(eir), cb=int(cbs), eb=int(ebs), rate_type=getattr(PolicerRateType, rate_type.upper()).value, round_type=getattr( PolicerRoundType, f"ROUND_TO_{round_type.upper()}" ).value, type=getattr(PolicerType, f"TYPE_{policer_type.upper()}").value, conform_action_type=getattr( PolicerAction, conform_action_type.upper() ).value, conform_dscp=getattr(DSCP, f"D_{conform_dscp.upper()}").value if conform_action_type.upper() == PolicerAction.MARK_AND_TRANSMIT.name else 0, exceed_action_type=getattr( PolicerAction, exceed_action_type.upper() ).value, exceed_dscp=getattr(DSCP, f"D_{exceed_dscp.upper()}").value if exceed_action_type.upper() == PolicerAction.MARK_AND_TRANSMIT.name else 0, violate_action_type=getattr( PolicerAction, violate_action_type.upper() ).value, violate_dscp=getattr(DSCP, f"D_{violate_dscp.upper()}").value if violate_action_type.upper() == PolicerAction.MARK_AND_TRANSMIT.name else 0, color_aware=1 if color_aware == u"'ca'" else 0 ) err_msg = f"Failed to configure policer {policer_name} " \ f"on host {node['host']}" with PapiSocketExecutor(node) as papi_exec: reply = papi_exec.add(cmd, **args).get_reply(err_msg) return reply[u"policer_index"] @staticmethod def policer_classify_set_interface( node, interface, ip4_table_index=Constants.BITWISE_NON_ZERO, ip6_table_index=Constants.BITWISE_NON_ZERO, l2_table_index=Constants.BITWISE_NON_ZERO, is_add=True): """Set/unset policer classify interface. :param node: VPP node. :param interface: Interface name or sw_if_index to set/unset policer classify. :param ip4_table_index: IP4 classify table index (~0 to skip). (Default value = ~0) :param ip6_table_index: IP6 classify table index (~0 to skip). (Default value = ~0) :param l2_table_index: L2 classify table index (~0 to skip). (Default value = ~0) :param is_add: Set if True, else unset. :type node: dict :type interface: str or int :type ip4_table_index: int :type ip6_table_index: int :type l2_table_index: int :type is_add: bool """ if isinstance(interface, str): sw_if_index = Topology.get_interface_sw_index(node, interface) else: sw_if_index = interface cmd = u"policer_classify_set_interface" args = dict( is_add=is_add, sw_if_index=int(sw_if_index), ip4_table_index=int(ip4_table_index), ip6_table_index=int(ip6_table_index), l2_table_index=int(l2_table_index) ) err_msg = f"Failed to set/unset policer classify interface " \ f"{interface} on host {node[u'host']}" with PapiSocketExecutor(node) as papi_exec: papi_exec.add(cmd, **args).get_reply(err_msg) @staticmethod def policer_classify_get_precolor(precolor): """Return policer pre-color numeric value. :param precolor: Policer pre-color name. :type precolor: str :returns: Policer pre-color numeric value. :rtype: int """ return getattr(PolicerPreColor, precolor.upper()).value @staticmethod def get_dscp_num_value(dscp): """Return DSCP numeric value. :param dscp: DSCP name. :type dscp: str :returns: DSCP numeric value. :rtype: int """ return getattr(DSCP, f"D_{dscp.upper()}").value