From: Claudio-Daniel Freire Date: Fri, 26 Aug 2011 15:57:28 +0000 (+0200) Subject: Ignore MetaAttribute flags for local factories X-Git-Tag: nepi-3.0.0~261 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6b8b1f6b5debff9f52ca7c47645cba4c54359313;p=nepi.git Ignore MetaAttribute flags for local factories --- 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: