From 6b8b1f6b5debff9f52ca7c47645cba4c54359313 Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Fri, 26 Aug 2011 17:57:28 +0200 Subject: [PATCH] Ignore MetaAttribute flags for local factories --- src/nepi/testbeds/netns/execute.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/nepi/testbeds/netns/execute.py b/src/nepi/testbeds/netns/execute.py index e06295fb..4d3ad052 100644 --- a/src/nepi/testbeds/netns/execute.py +++ b/src/nepi/testbeds/netns/execute.py @@ -11,6 +11,12 @@ import threading class TestbedController(testbed_impl.TestbedController): from nepi.util.tunchannel_impl import TunChannel + LOCAL_FACTORIES = { + 'ns3::Nepi::TunChannel' : TunChannel, + } + + LOCAL_TYPES = tuple(LOCAL_FACTORIES.values()) + class HostLock(object): # This class is used as a lock to prevent concurrency issues with more # than one instance of netns running in the same machine. Both in @@ -86,7 +92,8 @@ class TestbedController(testbed_impl.TestbedController): # TODO: take on account schedule time for the task factory_id = self._create[guid] factory = self._factories[factory_id] - if factory.box_attributes.is_attribute_metadata(name): + if factory_id not in self.LOCAL_FACTORIES and \ + factory.box_attributes.is_attribute_metadata(name): return element = self._elements.get(guid) if element: @@ -97,7 +104,8 @@ class TestbedController(testbed_impl.TestbedController): # TODO: take on account schedule time for the task factory_id = self._create[guid] factory = self._factories[factory_id] - if factory.box_attributes.is_attribute_metadata(name): + if factory_id not in self.LOCAL_FACTORIES and \ + factory.box_attributes.is_attribute_metadata(name): return value element = self._elements.get(guid) try: -- 2.47.0