diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-03-28 13:07:00 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-03-29 19:33:33 +0000 |
commit | 95c0ca42f2d02e7562775f7c1e6535a586a26186 (patch) | |
tree | 73d1eaa17af6a1315c36d5985b87b320e055ca1a /test | |
parent | 63d3ac6789740d58884aa4f7c91a96f592ae79d7 (diff) |
tests: test/vpp_l2.py fix missing name.
test/vpp_l2.py:213:26: F821 undefined name 'L2_VTR_OP'
self.itf.set_vtr(L2_VTR_OP.L2_DISABLED)
Move L2_VTR_OP enum to vpp_sub_interface.py where the VTR code is found.
Change-Id: I9eb9a3a2c679813c221ce1d0c4fa8aac6076c443
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/test_acl_plugin_l2l3.py | 2 | ||||
-rw-r--r-- | test/test_acl_plugin_macip.py | 6 | ||||
-rw-r--r-- | test/test_dvr.py | 4 | ||||
-rw-r--r-- | test/test_gbp.py | 3 | ||||
-rw-r--r-- | test/test_gre.py | 3 | ||||
-rw-r--r-- | test/test_ip4_irb.py | 2 | ||||
-rw-r--r-- | test/test_span.py | 3 | ||||
-rw-r--r-- | test/test_vtr.py | 3 | ||||
-rw-r--r-- | test/vpp_l2.py | 1 | ||||
-rw-r--r-- | test/vpp_papi_provider.py | 13 | ||||
-rw-r--r-- | test/vpp_sub_interface.py | 13 |
11 files changed, 24 insertions, 29 deletions
diff --git a/test/test_acl_plugin_l2l3.py b/test/test_acl_plugin_l2l3.py index 0a17ed4b5ff..0c846e7329c 100644 --- a/test/test_acl_plugin_l2l3.py +++ b/test/test_acl_plugin_l2l3.py @@ -37,7 +37,7 @@ from scapy.layers.inet6 import ICMPv6EchoReply, IPv6ExtHdrRouting from scapy.layers.inet6 import IPv6ExtHdrFragment from framework import VppTestCase, VppTestRunner -from vpp_papi_provider import L2_PORT_TYPE +from vpp_l2 import L2_PORT_TYPE import time diff --git a/test/test_acl_plugin_macip.py b/test/test_acl_plugin_macip.py index 7d11c65b60e..22914625297 100644 --- a/test/test_acl_plugin_macip.py +++ b/test/test_acl_plugin_macip.py @@ -18,9 +18,9 @@ from scapy.layers.inet6 import IPv6 from framework import VppTestCase, VppTestRunner, running_extended_tests from vpp_lo_interface import VppLoInterface -from vpp_papi_provider import L2_VTR_OP -from vpp_sub_interface import VppSubInterface, VppDot1QSubint, VppDot1ADSubint -from vpp_papi_provider import L2_PORT_TYPE +from vpp_l2 import L2_PORT_TYPE +from vpp_sub_interface import L2_VTR_OP, VppSubInterface, VppDot1QSubint, \ + VppDot1ADSubint class MethodHolder(VppTestCase): diff --git a/test/test_dvr.py b/test/test_dvr.py index cf411bb0cb1..9760f2f98a2 100644 --- a/test/test_dvr.py +++ b/test/test_dvr.py @@ -2,9 +2,9 @@ import unittest from framework import VppTestCase, VppTestRunner -from vpp_sub_interface import VppDot1QSubint from vpp_ip_route import VppIpRoute, VppRoutePath -from vpp_papi_provider import L2_VTR_OP, L2_PORT_TYPE +from vpp_l2 import L2_PORT_TYPE +from vpp_sub_interface import L2_VTR_OP, VppDot1QSubint from scapy.packet import Raw from scapy.layers.l2 import Ether, Dot1Q diff --git a/test/test_gbp.py b/test/test_gbp.py index c5f5192ea7e..17e9f93e938 100644 --- a/test/test_gbp.py +++ b/test/test_gbp.py @@ -20,10 +20,9 @@ from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable, \ VppIpInterfaceAddress, VppIpInterfaceBind, find_route from vpp_l2 import VppBridgeDomain, VppBridgeDomainPort, \ VppBridgeDomainArpEntry, VppL2FibEntry, find_bridge_domain_port, VppL2Vtr -from vpp_sub_interface import VppDot1QSubint +from vpp_sub_interface import L2_VTR_OP, VppDot1QSubint from vpp_ip import VppIpAddress, VppIpPrefix from vpp_papi import VppEnum, MACAddress -from vpp_papi_provider import L2_VTR_OP from vpp_vxlan_gbp_tunnel import find_vxlan_gbp_tunnel, INDEX_INVALID, \ VppVxlanGbpTunnel from vpp_neighbor import VppNeighbor diff --git a/test/test_gre.py b/test/test_gre.py index 92fc3bc9191..cee7eea120f 100644 --- a/test/test_gre.py +++ b/test/test_gre.py @@ -10,11 +10,10 @@ from scapy.layers.inet6 import IPv6 from scapy.volatile import RandMAC, RandIP from framework import VppTestCase, VppTestRunner -from vpp_sub_interface import VppDot1QSubint +from vpp_sub_interface import L2_VTR_OP, VppDot1QSubint from vpp_gre_interface import VppGreInterface, VppGre6Interface from vpp_ip import DpoProto from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable -from vpp_papi_provider import L2_VTR_OP from util import ppp, ppc diff --git a/test/test_ip4_irb.py b/test/test_ip4_irb.py index ef3dc1caf2b..0894515576e 100644 --- a/test/test_ip4_irb.py +++ b/test/test_ip4_irb.py @@ -32,7 +32,7 @@ from scapy.layers.inet import IP, UDP from framework import VppTestCase, VppTestRunner from vpp_papi import MACAddress -from vpp_papi_provider import L2_PORT_TYPE +from vpp_l2 import L2_PORT_TYPE class TestIpIrb(VppTestCase): diff --git a/test/test_span.py b/test/test_span.py index b6f816e9cf2..b0ea1e5eb90 100644 --- a/test/test_span.py +++ b/test/test_span.py @@ -9,9 +9,8 @@ from scapy.layers.vxlan import VXLAN from framework import VppTestCase, VppTestRunner from util import Host, ppp -from vpp_sub_interface import VppDot1QSubint, VppDot1ADSubint +from vpp_sub_interface import L2_VTR_OP, VppDot1QSubint, VppDot1ADSubint from vpp_gre_interface import VppGreInterface, VppGre6Interface -from vpp_papi_provider import L2_VTR_OP from collections import namedtuple Tag = namedtuple('Tag', ['dot1', 'vlan']) diff --git a/test/test_vtr.py b/test/test_vtr.py index d69dd20dc51..63e1cc7ae05 100644 --- a/test/test_vtr.py +++ b/test/test_vtr.py @@ -9,8 +9,7 @@ from scapy.layers.inet import IP, UDP from util import Host from framework import VppTestCase, VppTestRunner -from vpp_sub_interface import VppDot1QSubint, VppDot1ADSubint -from vpp_papi_provider import L2_VTR_OP +from vpp_sub_interface import L2_VTR_OP, VppDot1QSubint, VppDot1ADSubint from collections import namedtuple Tag = namedtuple('Tag', ['dot1', 'vlan']) diff --git a/test/vpp_l2.py b/test/vpp_l2.py index b606ff0077a..79c72e69051 100644 --- a/test/vpp_l2.py +++ b/test/vpp_l2.py @@ -7,6 +7,7 @@ from vpp_object import VppObject from vpp_ip import VppIpAddress from vpp_lo_interface import VppLoInterface from vpp_papi import MACAddress +from vpp_sub_interface import L2_VTR_OP class L2_PORT_TYPE: diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index ed2eee1dc84..91832b57e4f 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -12,22 +12,9 @@ from collections import deque from six import moves, iteritems from vpp_papi import VPP, mac_pton from hook import Hook -from vpp_l2 import L2_PORT_TYPE from vpp_ip_route import MPLS_IETF_MAX_LABEL, MPLS_LABEL_INVALID -class L2_VTR_OP: - L2_DISABLED = 0 - L2_PUSH_1 = 1 - L2_PUSH_2 = 2 - L2_POP_1 = 3 - L2_POP_2 = 4 - L2_TRANSLATE_1_1 = 5 - L2_TRANSLATE_1_2 = 6 - L2_TRANSLATE_2_1 = 7 - L2_TRANSLATE_2_2 = 8 - - class QOS_SOURCE: EXT = 0 VLAN = 1 diff --git a/test/vpp_sub_interface.py b/test/vpp_sub_interface.py index 15cd6edb8e0..4961ba5ff69 100644 --- a/test/vpp_sub_interface.py +++ b/test/vpp_sub_interface.py @@ -2,10 +2,21 @@ from scapy.layers.l2 import Dot1Q import abc import six from vpp_pg_interface import VppPGInterface -from vpp_papi_provider import L2_VTR_OP from vpp_interface import VppInterface +class L2_VTR_OP: + L2_DISABLED = 0 + L2_PUSH_1 = 1 + L2_PUSH_2 = 2 + L2_POP_1 = 3 + L2_POP_2 = 4 + L2_TRANSLATE_1_1 = 5 + L2_TRANSLATE_1_2 = 6 + L2_TRANSLATE_2_1 = 7 + L2_TRANSLATE_2_2 = 8 + + @six.add_metaclass(abc.ABCMeta) class VppSubInterface(VppPGInterface): |