X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Ftestbeds%2Fnetns%2Fexecute.py;h=67dee91e3b24473c40ba5f43d2e49400b7f711e8;hb=00f2c243566b08387658112d684c31371286ffcc;hp=605d410f4416ca5563842a10b682bf5f196ca3f5;hpb=61cfb0ec0d5a38ff5e08763d12d36bda17c4183f;p=nepi.git diff --git a/src/nepi/testbeds/netns/execute.py b/src/nepi/testbeds/netns/execute.py index 605d410f..67dee91e 100644 --- a/src/nepi/testbeds/netns/execute.py +++ b/src/nepi/testbeds/netns/execute.py @@ -3,7 +3,7 @@ from constants import TESTBED_ID from nepi.core import testbed_impl -from nepi.util.constants import TESTBED_STATUS_CREATED +from nepi.util.constants import TIME_NOW import os class TestbedController(testbed_impl.TestbedController): @@ -27,15 +27,15 @@ class TestbedController(testbed_impl.TestbedController): self._netns = self._load_netns_module() super(TestbedController, self).do_setup() - def set(self, time, guid, name, value): - super(TestbedController, self).set(time, guid, name, value) + def set(self, guid, name, value, time = TIME_NOW): + super(TestbedController, self).set(guid, name, value, time) # TODO: take on account schedule time for the task element = self._elements.get(guid) if element: setattr(element, name, value) - def get(self, time, guid, name): - value = super(TestbedController, self).get(time, guid, name) + def get(self, guid, name, time = TIME_NOW): + value = super(TestbedController, self).get(guid, name, time) # TODO: take on account schedule time for the task factory_id = self._create[guid] factory = self._factories[factory_id] @@ -47,21 +47,6 @@ class TestbedController(testbed_impl.TestbedController): except KeyError, AttributeError: return value - def get_route(self, guid, index, attribute): - # TODO: fetch real data from netns - try: - return self.box_get_route(guid, int(index), attribute) - except KeyError, AttributeError: - return None - - def get_address(self, guid, index, attribute='Address'): - # TODO: fetch real data from netns - try: - return self.box_get_address(guid, int(index), attribute) - except KeyError, AttributeError: - return None - - def action(self, time, guid, action): raise NotImplementedError