replaced box_get_address for get_address and box_get_route for get_route in testbed_impl
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 1 May 2011 17:30:30 +0000 (19:30 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 1 May 2011 17:30:30 +0000 (19:30 +0200)
src/nepi/core/testbed_impl.py
src/nepi/testbeds/netns/execute.py
src/nepi/testbeds/ns3/execute.py
src/nepi/testbeds/planetlab/execute.py

index 25982db..ed9224a 100644 (file)
@@ -341,7 +341,7 @@ class TestbedController(execute.TestbedController):
             raise AttributeError, "Attribute %s can only be queried during experiment design" % name
         return factory.box_attributes.get_attribute_value(name)
 
-    def box_get_route(self, guid, index, attribute):
+    def get_route(self, guid, index, attribute):
         """
         Helper implementation for get_route, returns information
         given to defer_add_route.
@@ -369,7 +369,7 @@ class TestbedController(execute.TestbedController):
         
         return routes[index][attribute_index]
 
-    def box_get_address(self, guid, index, attribute='Address'):
+    def get_address(self, guid, index, attribute='Address'):
         """
         Helper implementation for get_address, returns information
         given to defer_add_address
index 605d410..cba37f0 100644 (file)
@@ -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
 
index 936d3ba..0424793 100644 (file)
@@ -77,21 +77,6 @@ class TestbedController(testbed_impl.TestbedController):
             return value == "true"
         return value
 
-    def get_route(self, guid, index, attribute):
-        # TODO: fetch real data from ns3
-        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 ns3
-        try:
-            return self.box_get_address(guid, int(index), attribute)
-        except KeyError, AttributeError:
-            return None
-
-
     def action(self, time, guid, action):
         raise NotImplementedError
 
index 0f76fbf..38bea7b 100644 (file)
@@ -132,13 +132,6 @@ class TestbedController(testbed_impl.TestbedController):
         except KeyError, AttributeError:
             return value
 
-    def get_route(self, guid, index, attribute):
-        # TODO: fetch real data from planetlab
-        try:
-            return self.box_get_route(guid, int(index), attribute)
-        except KeyError, AttributeError:
-            return None
-
     def get_address(self, guid, index, attribute='Address'):
         index = int(index)
 
@@ -153,11 +146,7 @@ class TestbedController(testbed_impl.TestbedController):
                 return iface.broadcast
 
         # if all else fails, query box
-        try:
-            return self.box_get_address(guid, index, attribute)
-        except KeyError, AttributeError:
-            return None
-
+        return self.get_address(guid, index, attribute)
 
     def action(self, time, guid, action):
         raise NotImplementedError