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 \
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)
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
# 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()
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