summaryrefslogtreecommitdiffstats
path: root/test/vpp_bvi_interface.py
blob: 7039f29ca8d46e5e6525f85280cd6a30576c9e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from vpp_object import VppObject
from vpp_interface import VppInterface


class VppBviInterface(VppInterface, VppObject):
    """VPP bvi interface."""

    def __init__(self, test):
        """ Create VPP BVI interface """
        super(VppBviInterface, self).__init__(test)
        self.add_vpp_config()

    def add_vpp_config(self):
        r = self.test.vapi.bvi_create(user_instance=0xffffffff,
                                      mac="00:00:00:00:00:00")
        self.set_sw_if_index(r.sw_if_index)

    def remove_vpp_config(self):
        self.test.vapi.bvi_delete(sw_if_index=self.sw_if_index)

    def object_id(self):
        return "bvi-%d" % self._sw_if_index
eral.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# DISCLAIMER: BEFORE EDITING THIS FILE!
#
# This file has two closely related consequences.
# The common part is that this file defines
# the content of virtual Python environment
# used when Robot tests are running.
# The difference is in which machine the environment is created on.
# For the Jenkins executor machines,
# editing this file has no surprising consequences.
#
# But the environment is also being created
# on virtual machines created by VIRL, which do have specific restrictions.
# Complete package and setting snapshot (for both VIRL and Physical Testbed),
# with network being limited in case of VIRL to local only.
# This implies pip currently being set to site-packages only
# for both VIRL and Physical Testbed.
# So if the "virl image" applied on the machine
# does not reflect the edits, some installations might fail.
# Even if the failure may not directly impact execution,
# this leads into inconsistency between installed environment
# and the code base which may lead into fatal error or uncaught exceptions.
#
# The "virl image" is built from files such as
# resources/tools/disk-image-builder/ubuntu/lists/ubuntu-16.04.1_2017-10-21_2.0/pip-requirements.txt
# but the build is not automated,
# the new "virl image" has to be built and applied manually
# before your edit can pass.
# This also means, incompatible virl images
# would make existing tests fail until your edit is merged.
#
# TODO: Automate the virtualenv download and distribution
#   on all types of testbeds prior the test execution.
# TODO: Figure out a way to verify edits to this file automatically.

# TODO: Split into directly needed packages and their dependencies.
aenum==2.1.2
docopt==0.6.2  # for pykwalify
ecdsa==0.13
enum34==1.1.2
ipaddress==1.0.16
paramiko==1.16.0
pexpect==4.6.0
pycrypto==2.6.1
pykwalify==1.5.0
pypcap==1.1.5
python-dateutil==2.4.2  # for pykwalify
PyYAML==3.11
requests==2.9.1
robotframework==2.9.2
scapy==2.3.1
scp==0.10.2
six==1.12.0  # for python-dateutil

# The following is only there for PLRsearch.
dill==0.2.8.2
numpy==1.14.5
scipy==1.1.0