示例#1
0
    def __init__(self, ptm=None, vtm=None):

        self._ptm = ptm
        if self._ptm is None:
            # Set a default topology manager
            self._ptm = TopologyManager()

        self._vtm = vtm
        self._cleanups = callmany.CallMany()
        self._mappings = {}
示例#2
0
    def __init__(self, ptm, vtm):

        self._ptm = ptm
        if self._ptm is None:
            # Set a default topology manager
            self._ptm = TopologyManager()
            # Define the default tunnel zone
            self._tzone_name = 'tzone-%s' % str(uuid.uuid4())[:4]
        self._vtm = vtm
        self._cleanups = callmany.CallMany()
        self._mappings = {}
示例#3
0
LOG = logging.getLogger(__name__)
"""
This example shows how to execute a test with a predifined physical topology
specified in the topologies/mmm_physical_test_bridge.yaml.

The virtual topology is created inside the test with direct calls to the
Neutron API. It uses the helper method in the NeutronTopologyManager to create
any kind of resources (networks, subnets and ports in this test).
This helper method schedules the deletion of resources created to be executed
during the teardown of the topology (which is executed at the end of the test
or if there's an exception) and ensures that no resources created are left
orphaned after the test.
"""

PTM = TopologyManager()
VTM = NeutronTopologyManager()


def setup_1():
    PTM.build()
    VTM.build()


def destroy_1():
    VTM.destroy()
    PTM.destroy()


@nottest
@with_setup(setup_1, destroy_1)