still making both branches closer
[nepi.git] / src / nepi / resources / ns3 / ns3wrapper.py
index f6cc247..9251006 100644 (file)
@@ -154,7 +154,7 @@ class NS3Wrapper(object):
             tid_count = type_id.GetRegisteredN()
             base = type_id.LookupByName("ns3::Object")
 
-            for i in xrange(tid_count):
+            for i in range(tid_count):
                 tid = type_id.GetRegistered(i)
                 
                 if tid.MustHideFromDocumentation() or \
@@ -213,7 +213,7 @@ class NS3Wrapper(object):
         factory = self.ns3.ObjectFactory()
         factory.SetTypeId(type_name)
 
-        for name, value in kwargs.iteritems():
+        for name, value in kwargs.items():
             ns3_value = self._attr_from_string_to_ns3_value(type_name, name, value)
             factory.Set(name, ns3_value)
 
@@ -575,11 +575,11 @@ class NS3Wrapper(object):
     def replace_kwargs(self, kwargs):
         realkwargs = dict([(k, self.get_object(v) \
                 if str(v).startswith("uuid") else v) \
-                for k,v in kwargs.iteritems()])
+                for k,v in kwargs.items()])
  
         realkwargs = dict([(k, self._singleton(v) \
                 if str(v).startswith(SINGLETON) else v )\
-                for k, v in realkwargs.iteritems()])
+                for k, v in realkwargs.items()])
 
         return realkwargs
 
@@ -645,10 +645,10 @@ class NS3Wrapper(object):
         # For all the interfaces registered with the ipv4 object, find
         # the one that matches the network of the nexthop
         nifaces = ipv4.GetNInterfaces()
-        for ifidx in xrange(nifaces):
+        for ifidx in range(nifaces):
             iface = ipv4.GetInterface(ifidx)
             naddress = iface.GetNAddresses()
-            for addridx in xrange(naddress):
+            for addridx in range(naddress):
                 ifaddr = iface.GetAddress(addridx)
                 ifmask = ifaddr.GetMask()
                 
@@ -668,7 +668,7 @@ class NS3Wrapper(object):
         newuuid = None
         if search:
             # search object
-            for ouuid, oobj in self._objects.iteritems():
+            for ouuid, oobj in self._objects.items():
                 if nobj == oobj:
                     newuuid = ouuid
                     break