From a77ee7fa49c5d0541e6c101b327cdb51e68984e8 Mon Sep 17 00:00:00 2001 From: Alina Quereilhac Date: Mon, 21 Mar 2011 17:29:05 +0100 Subject: [PATCH] ns3 metadata and design test in progress --- setup.py | 2 +- src/nepi/core/metadata.py | 13 +- src/nepi/core/testbed_impl.py | 4 - src/nepi/testbeds/netns/metadata_v01.py | 4 +- .../ns3/attributes_metadata_v3_9_RC3.py | 387 +++++++++- src/nepi/testbeds/ns3/execute.py | 114 ++- .../ns3/factories_metadata_v3_9_RC3.py | 681 +++++++++--------- src/nepi/testbeds/ns3/metadata_v3_9_RC3.py | 36 +- src/nepi/testbeds/ns3/validation.py | 9 + src/nepi/util/validation.py | 2 +- test/lib/mock/metadata_v01.py | 10 +- test/testbeds/netns/design.py | 18 +- test/testbeds/ns3/design.py | 73 ++ 13 files changed, 937 insertions(+), 416 deletions(-) create mode 100644 src/nepi/testbeds/ns3/validation.py create mode 100755 test/testbeds/ns3/design.py diff --git a/setup.py b/setup.py index 0fea3730..95388249 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,6 @@ setup( name = "nepi", version = "0.1", description = "High-level abstraction for running network experiments", -# long_description = longdesc, author = "Alina Quereilhac and Martín Ferrari", url = "http://yans.pl.sophia.inria.fr/code/hgwebdir.cgi/nepi/", license = "GPLv2", @@ -15,6 +14,7 @@ setup( "nepi", "nepi.testbeds", "nepi.testbeds.netns", + "nepi.testbeds.ns3", "nepi.core", "nepi.util.parser", "nepi.util" ], diff --git a/src/nepi/core/metadata.py b/src/nepi/core/metadata.py index 88529f70..953a3d82 100644 --- a/src/nepi/core/metadata.py +++ b/src/nepi/core/metadata.py @@ -6,7 +6,7 @@ import sys class VersionedMetadataInfo(object): @property - def connections_types(self): + def connector_types(self): """ dictionary of dictionaries with allowed connection information. connector_id: dict({ "help": help text, @@ -104,7 +104,8 @@ class Metadata(object): def __init__(self, testbed_id, version): self._version = version self._testbed_id = testbed_id - self._metadata = self._load_versioned_metadata_info() + metadata_module = self._load_versioned_metadata_module() + self._metadata = metadata_module.VersionedMetadataInfo() @property def factories_order(self): @@ -167,7 +168,7 @@ class Metadata(object): factories.append(factory) return factories - def _load_versioned_metadata_info(self): + def _load_versioned_metadata_module(self): mod_name = "nepi.testbeds.%s.metadata_v%s" % (self._testbed_id.lower(), self._version) if not mod_name in sys.modules: @@ -178,7 +179,11 @@ class Metadata(object): box_attributes = False): if attributes_key in info: for attribute_id in info[attributes_key]: - attribute_info = self._metadata.attributes[attribute_id] + try: + attribute_info = self._metadata.attributes[attribute_id] + except: + print "\"%s\"," % attribute_id + continue name = attribute_info["name"] help = attribute_info["help"] type = attribute_info["type"] diff --git a/src/nepi/core/testbed_impl.py b/src/nepi/core/testbed_impl.py index bac628d3..26b70ef9 100644 --- a/src/nepi/core/testbed_impl.py +++ b/src/nepi/core/testbed_impl.py @@ -316,7 +316,3 @@ class TestbedInstance(execute.TestbedInstance): return dict() if guid not in self._create_set else \ self._create_set[guid] - def _get_factory_parameters(self, guid): - return dict() if guid not in self._factory_set else \ - self._factory_set[guid] - diff --git a/src/nepi/testbeds/netns/metadata_v01.py b/src/nepi/testbeds/netns/metadata_v01.py index ee9a44f6..0f39b9ea 100644 --- a/src/nepi/testbeds/netns/metadata_v01.py +++ b/src/nepi/testbeds/netns/metadata_v01.py @@ -466,8 +466,8 @@ testbed_attributes = dict({ class VersionedMetadataInfo(metadata.VersionedMetadataInfo): @property - def connections_types(self): - return connection_types + def connector_types(self): + return connector_types @property def connections(self): diff --git a/src/nepi/testbeds/ns3/attributes_metadata_v3_9_RC3.py b/src/nepi/testbeds/ns3/attributes_metadata_v3_9_RC3.py index 8d0c6a4d..77489042 100644 --- a/src/nepi/testbeds/ns3/attributes_metadata_v3_9_RC3.py +++ b/src/nepi/testbeds/ns3/attributes_metadata_v3_9_RC3.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import validation as ns3_validation +from nepi.core.attributes import Attribute from nepi.util import validation attributes = dict({ @@ -412,7 +414,7 @@ attributes = dict({ "flags": None, "allowed": None, "type": Attribute.INTEGER, - "help": "The minimum value for the "timer" threshold in the AARF algorithm." + "help": "The minimum value for the 'timer' threshold in the AARF algorithm." }), "TimerThreshold": dict({ "name": "TimerThreshold", @@ -422,7 +424,7 @@ attributes = dict({ "flags": None, "allowed": None, "type": Attribute.INTEGER, - "help": "The "timer" threshold in the ARF algorithm." + "help": "The 'timer' threshold in the ARF algorithm." }), "poriFor36mbps": dict({ "name": "poriFor36mbps", @@ -809,7 +811,7 @@ attributes = dict({ }), "IpAddress": dict({ "name": "IpAddress", - "validation_function": validation.is_ip4address, + "validation_function": validation.is_ip4_address, "value": None, "range": None, "flags": None, @@ -1282,7 +1284,7 @@ attributes = dict({ "validation_function": validation.is_integer, "value": 0, "range": None, - "flags": None, + "flags": Attribute.DesignOnly, "allowed": None, "type": Attribute.INTEGER, "help": "The number of waypoints remaining." @@ -1639,7 +1641,7 @@ attributes = dict({ }), "Local": dict({ "name": "Local", - "validation_function": validation.is_address, + "validation_function": ns3_validation.is_address, "value": None, "range": None, "flags": None, @@ -1719,7 +1721,7 @@ attributes = dict({ }), "Gateway": dict({ "name": "Gateway", - "validation_function": validation.is_ip4address, + "validation_function": validation.is_ip4_address, "value": None, "range": None, "flags": None, @@ -1889,7 +1891,7 @@ attributes = dict({ }), "Remote": dict({ "name": "Remote", - "validation_function": validation.is_address, + "validation_function": ns3_validation.is_address, "value": None, "range": None, "flags": None, @@ -2149,8 +2151,7 @@ attributes = dict({ "flags": None, "allowed": None, "type": Attribute.INTEGER, - "help": "If number of packets in this queue reaches this value, block ack mechanism is used. If this value is 0, - block ack is never used." + "help": "If number of packets in this queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used." }), "TimerK": dict({ "name": "TimerK", @@ -2177,7 +2178,7 @@ attributes = dict({ "validation_function": validation.is_string, "value": "liblinux2.6.26.so", "range": None, - "flags": None, + "flags": Attribute.DesignOnly, "allowed": None, "type": Attribute.STRING, "help": "Set the linux library to be used to create the stack" @@ -2654,7 +2655,7 @@ attributes = dict({ }), "RemoteAddress": dict({ "name": "RemoteAddress", - "validation_function": validation.is_ip4address, + "validation_function": validation.is_ip4_address, "value": None, "range": None, "flags": None, @@ -3022,5 +3023,365 @@ attributes = dict({ "allowed": None, "type": Attribute.INTEGER, "help": "Attempt to raise the rate if we hit that threshold" - }) - }) + }), + "ProtocolNumber": dict({ + "name": "ProtocolNumber", + "validation_function": validation.is_integer, + "value": 0, + "range": None, + "flags": Attribute.ReadOnly, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The Ipv4 protocol number." + }), + "Position": dict({ + "name": "Position", + "validation_function": validation.is_string, + "value": "0:0:0", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The current position of the mobility model." + }), + "Velocity": dict({ + "name": "Velocity", + "validation_function": validation.is_string, + "value": "0:0:0", + "range": None, + "flags": Attribute.DesignOnly, + "allowed": None, + "type": Attribute.STRING, + "help": "The current velocity of the mobility model." + }), + "StartTime": dict({ + "name": "StartTime", + "validation_function": validation.is_string, + "value": "0ns", + "range": None, + "flags": Attribute.DesignOnly, + "allowed": None, + "type": Attribute.STRING, + "help": "Time at which the application will start" + }), + "StopTime": dict({ + "name": "StopTime", + "validation_function": validation.is_string, + "value": "0ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "Time at which the application will stop" + }), + "IsLowLatency": dict({ + "name": "IsLowLatency", + "validation_function": validation.is_bool, + "value": True, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.BOOL, + "help": "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission." + }), + "MaxSsrc": dict({ + "name": "MaxSsrc", + "validation_function": validation.is_integer, + "value": 7, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms." + }), + "MaxSlrc": dict({ + "name": "MaxSlrc", + "validation_function": validation.is_integer, + "value": 7, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms." + }), + "NonUnicastMode": dict({ + "name": "NonUnicastMode", + "validation_function": validation.is_string, + "value": "Invalid-WifiMode", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "Wifi mode used for non-unicast transmissions." + }), + "RtsCtsThreshold": dict({ + "name": "RtsCtsThreshold", + "validation_function": validation.is_integer, + "value": 2346, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms." + }), + "FragmentationThreshold": dict({ + "name": "FragmentationThreshold", + "validation_function": validation.is_integer, + "value": 2346, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms." + }), + "Ssid": dict({ + "name": "Ssid", + "validation_function": validation.is_string, + "value": "default", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The ssid we want to belong to." + }), + "AckTimeout": dict({ + "name": "AckTimeout", + "validation_function": validation.is_time, + "value": "75000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "When this timeout expires, the DATA/ACK handshake has failed." + }), + "Sifs": dict({ + "name": "Sifs", + "validation_function": validation.is_time, + "value": "16000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The value of the SIFS constant." + }), + "MinCw": dict({ + "name": "MinCw", + "validation_function": validation.is_integer, + "value": 15, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The minimum value of the contention window." + }), + "IsEnabled": dict({ + "name": "IsEnabled", + "validation_function": validation.is_bool, + "value": True, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.BOOL, + "help": "Whether this ErrorModel is enabled or not." + }), + "CompressedBlockAckTimeout": dict({ + "name": "CompressedBlockAckTimeout", + "validation_function": validation.is_time, + "value": "99000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed." + }), + "MaxCw": dict({ + "name": "MaxCw", + "validation_function": validation.is_integer, + "value": 1023, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The maximum value of the contention window." + }), + "RTG": dict({ + "name": "RTG", + "validation_function": validation.is_integer, + "value": 0, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "receive/transmit transition gap." + }), + "TTG": dict({ + "name": "TTG", + "validation_function": validation.is_integer, + "value": 0, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "transmit/receive transition gap." + }), + "MinRTO": dict({ + "name": "MinRTO", + "validation_function": validation.is_time, + "value": "200000000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "Minimum retransmit timeout value" + }), + "Pifs": dict({ + "name": "Pifs", + "validation_function": validation.is_time, + "value": "25000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The value of the PIFS constant." + }), + "InitialEstimation": dict({ + "name": "InitialEstimation", + "validation_function": validation.is_time, + "value": "1000000000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "XXX" + }), + "BasicBlockAckTimeout": dict({ + "name": "BasicBlockAckTimeout", + "validation_function": validation.is_time, + "value": "281000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed." + }), + "MaxMultiplier": dict({ + "name": "MaxMultiplier", + "validation_function": validation.is_double, + "value": 64.0, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.DOUBLE, + "help": "XXX" + }), + "Aifsn": dict({ + "name": "Aifsn", + "validation_function": validation.is_integer, + "value": 2, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The AIFSN: the default value conforms to simple DCA." + }), + "OptionNumber": dict({ + "name": "OptionNumber", + "validation_function": validation.is_integer, + "value": 0, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The IPv6 option number." + }), + "Slot": dict({ + "name": "Slot", + "validation_function": validation.is_time, + "value": "9000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The duration of a Slot." + }), + "IpForward": dict({ + "name": "IpForward", + "validation_function": validation.is_bool, + "value": True, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.BOOL, + "help": "Globally enable or disable IP forwarding for all current and future Ipv4 devices." + }), + "WeakEsModel": dict({ + "name": "WeakEsModel", + "validation_function": validation.is_bool, + "value": True, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.BOOL, + "help": "RFC1122 term for whether host accepts datagram with a dest. address on another interface" + }), + "MaxPropagationDelay": dict({ + "name": "MaxPropagationDelay", + "validation_function": validation.is_time, + "value": "3333ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The maximum propagation delay. Unused for now." + }), + "ExtensionNumber": dict({ + "name": "ExtensionNumber", + "validation_function": validation.is_integer, + "value": 0, + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.INTEGER, + "help": "The IPv6 extension number." + }), + "EifsNoDifs": dict({ + "name": "EifsNoDifs", + "validation_function": validation.is_time, + "value": "60000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "The value of EIFS-DIFS" + }), + "CtsTimeout": dict({ + "name": "CtsTimeout", + "validation_function": validation.is_time, + "value": "75000ns", + "range": None, + "flags": None, + "allowed": None, + "type": Attribute.STRING, + "help": "When this timeout expires, the RTS/CTS handshake has failed." + }), + "max_addresses": dict({ + "name": "MaxAddresses", + "help": "Maximum number of addresses allowed by the device", + "type": Attribute.INTEGER, + "value": None, + "range": None, + "allowed": None, + "flags": Attribute.Invisible, + "validation_function": validation.is_integer + }), + "family": dict({ + "name": "Family", + "help": "IP address family", + "type": Attribute.INTEGER, + "value": AF_INET, + "range": None, + "allowed": None, + "flags": Attribute.Invisible, + "validation_function": validation.is_integer + }), +}) diff --git a/src/nepi/testbeds/ns3/execute.py b/src/nepi/testbeds/ns3/execute.py index 4d7d6e96..6bb58dc9 100644 --- a/src/nepi/testbeds/ns3/execute.py +++ b/src/nepi/testbeds/ns3/execute.py @@ -3,6 +3,7 @@ from constants import TESTBED_ID from nepi.core import testbed_impl +from nepi.core.attributes import Attribute from nepi.util.constants import AF_INET, AF_INET6 import os @@ -27,33 +28,100 @@ class TestbedInstance(testbed_impl.TestbedInstance): self._ns3 = self._load_ns3_module() def do_configure(self): - # TODO: add traces! # configure addressess for guid, addresses in self._add_address.iteritems(): element = self._elements[guid] for address in addresses: (family, address, netprefix, broadcast) = address if family == AF_INET: - element.add_v4_address(address, netprefix) + pass + # TODO!!! # configure routes for guid, routes in self._add_route.iteritems(): element = self._elements[guid] for route in routes: (destination, netprefix, nexthop) = route - element.add_route(prefix = destination, prefix_len = netprefix, - nexthop = nexthop) + # TODO!! + """ + context = self.server.modules.ns3 + ipv4 = self._object + for interface in self._interface2addr: + ifindex = ipv4.AddInterface(interface._object) + for addr in self._interface2addr[interface]: + inaddr = context.Ipv4InterfaceAddress( + context.Ipv4Address( + addr.get_attribute("Address").value), + context.Ipv4Mask( + addr.get_attribute("NetPrefix").value)) + ipv4.AddAddress(ifindex, inaddr) + ipv4.SetMetric(ifindex, 1) + ipv4.SetUp(ifindex) + self._interface_addrs[addr] = inaddr + self._interfaces[interface] = ifindex + for entry in self.get_node().routing_table.get_entries(self._af): + self._rt_add(entry) + + def _rt_add(self, entry): + # Called both at install-time (by NS3Ipv4Stack.post_install) and at + # run-time (by RoutingTable.add_entry). + context = self.server.modules.ns3 + ifindex = self._interfaces[entry.interface] + prefixlen = entry.prefixlen + # print "rt_add %s %s %s %d"% (prefix, prefixlen, entry.nexthop, ifindex) + if entry.nexthop: + self._static_routing.AddNetworkRouteTo( + context.Ipv4Address(entry.prefix.address), + context.Ipv4Mask(entry.mask.address), + context.Ipv4Address(entry.nexthop.address), + ifindex) + else: + self._static_routing.AddNetworkRouteTo( + context.Ipv4Address(entry.prefix.address), + context.Ipv4Mask(entry.mask.address), + ifindex) + """ def set(self, time, guid, name, value): super(TestbedInstance, self).set(time, guid, name, value) + # TODO: take on account schedule time for the task factory_id = self._crerate[guid] element = self._elements[guid] - self._set(element, factory_id, name, value) + TypeId = self.ns3.TypeId() + typeid = TypeId.LookupByName(factory_id) + info = TypeId.AttributeInfo() + if not typeid.LookupAttributeByName(name, info): + raise RuntimeError("Attribute %s doesn't belong to element %s" \ + % (name, factory_id)) + value = str(value) + if isinstance(value, bool): + value = value.lower() + ns3_value = info.checker.Create() + ns3_value.DeserializeFromString(value, checker) + element.SetAttribute(name, ns3_value) def get(self, time, guid, name): - raise NotImplementedError # TODO: take on account schedule time for the task - #element = self._elements[guid] - #return getattr(element, name) + TypeId = self.ns3.TypeId() + typeid = TypeId.LookupByName(factory_id) + info = TypeId.AttributeInfo() + if not typeid.LookupAttributeByName(name, info): + raise RuntimeError("Attribute %s doesn't belong to element %s" \ + % (name, factory_id)) + checker = info.checker + ns3_value = checker.Create() + element = self._elements[guid] + element.GetAttribute(name, ns3_value) + value = ns3_value.SerializeToString(checker) + factory_id = self._create[guid] + factory = self._factories[factory_id] + attr_type = factory.box_attributes.get_attribute_type(name) + if attr_type == Attribute.INTEGER: + return int(value) + if attr_type == Attribute.DOUBLE: + return float(value) + if attr_type == Attribute.BOOL: + return value == "true" + return value def action(self, time, guid, action): raise NotImplementedError @@ -78,23 +146,6 @@ class TestbedInstance(testbed_impl.TestbedInstance): self._traces[guid] = dict() self._traces[guid][trace_id] = filename - def _set(self, element, factory_id, name, value): - TypeId = self.ns3.TypeId() - typeId = TypeId.LookupByName(factory_id) - index = None - attr_count = typeId.GetAttributeN() - for idx in range(attr_count): - if name == typeId.GetAttributeName(idx) - index = idx - break - checker = typeid.GetAttributeChecker(index) - ns3_value = attribute_checker.Create() - value = str(value) - if isinstance(value, bool): - value = value.lower() - ns3_value.DeserializeFromString(value, checker) - element.Set(name, ns3_value) - def _load_ns3_module(self): import ctypes import imp @@ -123,3 +174,16 @@ class TestbedInstance(testbed_impl.TestbedInstance): mod.GlobalValue.Bind ("ChecksumEnabled", value) return mod + def _get_construct_parameters(self, guid): + params = self._get_parameters(guid) + construct_params = dict() + factory_id = self._create[guid] + TypeId = self.ns3.TypeId() + typeid = TypeId.LookupByName(factory_id) + for name, value in params: + info = self.ns3.TypeId.AttributeInfo() + typeid.LookupAttributeByName(name, info) + if info.flags & TypeId.ATTR_CONSTRUCT == TypeId.ATTR_CONSTRUCT: + construct_params[name] = value + return construct_params + diff --git a/src/nepi/testbeds/ns3/factories_metadata_v3_9_RC3.py b/src/nepi/testbeds/ns3/factories_metadata_v3_9_RC3.py index 05cb1647..c954bb19 100644 --- a/src/nepi/testbeds/ns3/factories_metadata_v3_9_RC3.py +++ b/src/nepi/testbeds/ns3/factories_metadata_v3_9_RC3.py @@ -2,14 +2,15 @@ # -*- coding: utf-8 -*- from metadata_v3_9_RC3 import create_device, create_element, create_ipv4stack, \ - create_node, create_wifi_standard_model + create_node, create_wifi_standard_model, start_application, \ + stop_application, status_application -factories_info = dict{( - "ns3::Ping6": dict{( +factories_info = dict({ + "ns3::Ping6": dict({ "category": "Application", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": stop_application, @@ -24,8 +25,8 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::UdpL4Protocol": dict{( + }), + "ns3::UdpL4Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", @@ -38,8 +39,8 @@ factories_info = dict{( "box_attributes": ["ProtocolNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomDiscPositionAllocator": dict{( + }), + "ns3::RandomDiscPositionAllocator": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -55,8 +56,8 @@ factories_info = dict{( "Y"], "factory_attributes": [], "traces": [] - )}, - "ns3::Node": dict{( + }), + "ns3::Node": dict({ "category": "Topology", "create_function": create_node, "help": "", @@ -68,8 +69,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::GridPositionAllocator": dict{( + }), + "ns3::GridPositionAllocator": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -87,12 +88,12 @@ factories_info = dict{( "LayoutType"], "factory_attributes": [], "traces": [] - )}, - "ns3::TapBridge": dict{( - "category": "Device" + }), + "ns3::TapBridge": dict({ + "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -108,8 +109,8 @@ factories_info = dict{( "Stop"], "factory_attributes": [], "traces": [] - )}, - "ns3::FlowMonitor": dict{( + }), + "ns3::FlowMonitor": dict({ "category": "", "create_function": create_element, "help": "", @@ -127,8 +128,8 @@ factories_info = dict{( "FlowInterruptionsMinTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::ConstantVelocityMobilityModel": dict{( + }), + "ns3::ConstantVelocityMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -142,8 +143,8 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::V4Ping": dict{( + }), + "ns3::V4Ping": dict({ "category": "Application", "create_function": create_element, "help": "", @@ -161,8 +162,8 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::dot11s::PeerLink": dict{( + }), + "ns3::dot11s::PeerLink": dict({ "category": "", "create_function": create_element, "help": "", @@ -180,8 +181,8 @@ factories_info = dict{( "MaxPacketFailure"], "factory_attributes": [], "traces": [] - )}, - "ns3::PointToPointNetDevice": dict{( + }), + "ns3::PointToPointNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", @@ -197,8 +198,8 @@ factories_info = dict{( "InterframeGap"], "factory_attributes": [], "traces": ["p2ppcap"] - )}, - "ns3::NakagamiPropagationLossModel": dict{( + }), + "ns3::NakagamiPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -215,12 +216,12 @@ factories_info = dict{( "m2"], "factory_attributes": [], "traces": [] - )}, - "ns3::AarfWifiManager": dict{( + }), + "ns3::AarfWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -239,8 +240,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6OptionJumbogram": dict{( + }), + "ns3::Ipv6OptionJumbogram": dict({ "category": "", "create_function": create_element, "help": "", @@ -253,8 +254,8 @@ factories_info = dict{( "box_attributes": ["OptionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::TwoRayGroundPropagationLossModel": dict{( + }), + "ns3::TwoRayGroundPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -270,8 +271,8 @@ factories_info = dict{( "HeightAboveZ"], "factory_attributes": [], "traces": [] - )}, - "ns3::OnOffApplication": dict{( + }), + "ns3::OnOffApplication": dict({ "category": "Application", "create_function": create_element, "help": "", @@ -292,8 +293,8 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::AdhocWifiMac": dict{( + }), + "ns3::AdhocWifiMac": dict({ "category": "Mac", "create_function": create_element, "help": "", @@ -315,8 +316,8 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::ConstantAccelerationMobilityModel": dict{( + }), + "ns3::ConstantAccelerationMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -330,12 +331,12 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::GaussMarkovMobilityModel": dict{( + }), + "ns3::GaussMarkovMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -354,12 +355,12 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::dot11s::HwmpProtocol": dict{( + }), + "ns3::dot11s::HwmpProtocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"] + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -383,12 +384,12 @@ factories_info = dict{( "RfFlag"], "factory_attributes": [], "traces": [] - )}, - "ns3::NscTcpL4Protocol": dict{( + }), + "ns3::NscTcpL4Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -398,8 +399,8 @@ factories_info = dict{( "ProtocolNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::dot11s::AirtimeLinkMetricCalculator": dict{( + }), + "ns3::dot11s::AirtimeLinkMetricCalculator": dict({ "category": "", "create_function": create_element, "help": "", @@ -412,8 +413,8 @@ factories_info = dict{( "box_attributes": ["Dot11sMeshHeaderLength"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanMacCw": dict{( + }), + "ns3::UanMacCw": dict({ "category": "", "create_function": create_element, "help": "", @@ -427,8 +428,8 @@ factories_info = dict{( "SlotTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::AthstatsWifiTraceSink": dict{( + }), + "ns3::AthstatsWifiTraceSink": dict({ "category": "", "create_function": create_element, "help": "", @@ -441,8 +442,8 @@ factories_info = dict{( "box_attributes": ["Interval"], "factory_attributes": [], "traces": [] - )}, - "ns3::FlameStack": dict{( + }), + "ns3::FlameStack": dict({ "category": "", "create_function": create_element, "help": "", @@ -455,8 +456,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::UanMacRc": dict{( + }), + "ns3::UanMacRc": dict({ "category": "", "create_function": create_element, "help": "", @@ -477,12 +478,12 @@ factories_info = dict{( "MaxPropDelay"], "factory_attributes": [], "traces": [] - )}, - "ns3::WaypointMobilityModel": dict{( + }), + "ns3::WaypointMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -493,12 +494,12 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::FileDescriptorNetDevice": dict{( + }), + "ns3::FileDescriptorNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "Network interface associated to a file descriptor", - "connector_types": ["node", "fd", "err"], + "connector_types": ["node", "fd"], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -507,8 +508,8 @@ factories_info = dict{( "box_attributes": ["Address"], "factory_attributes": [], "traces": ["fdpcap"] - )}, - "ns3::CsmaNetDevice": dict{( + }), + "ns3::CsmaNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "CSMA (carrier sense, multiple access) interface", @@ -524,8 +525,8 @@ factories_info = dict{( "ReceiveEnable"], "factory_attributes": [], "traces": ["csmapcap", "csmapcap_promisc"] - )}, - "ns3::UanPropModelThorp": dict{( + }), + "ns3::UanPropModelThorp": dict({ "category": "", "create_function": create_element, "help": "", @@ -538,8 +539,8 @@ factories_info = dict{( "box_attributes": ["SpreadCoef"], "factory_attributes": [], "traces": [] - )}, - "ns3::NqstaWifiMac": dict{( + }), + "ns3::NqstaWifiMac": dict({ "category": "Mac", "create_function": create_element, "help": "", @@ -564,12 +565,12 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::Icmpv6L4Protocol": dict{( + }), + "ns3::Icmpv6L4Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -579,8 +580,8 @@ factories_info = dict{( "ProtocolNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::SimpleNetDevice": dict{( + }), + "ns3::SimpleNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", @@ -593,8 +594,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::FriisPropagationLossModel": dict{( + }), + "ns3::FriisPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -609,8 +610,8 @@ factories_info = dict{( "MinDistance"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6OptionRouterAlert": dict{( + }), + "ns3::Ipv6OptionRouterAlert": dict({ "category": "", "create_function": create_element, "help": "", @@ -623,8 +624,8 @@ factories_info = dict{( "box_attributes": ["OptionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::UniformDiscPositionAllocator": dict{( + }), + "ns3::UniformDiscPositionAllocator": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -639,12 +640,12 @@ factories_info = dict{( "Y"], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomBoxPositionAllocator": dict{( + }), + "ns3::RandomBoxPositionAllocator": dict({ "category": "Mobility", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -655,8 +656,8 @@ factories_info = dict{( "Z"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionDestination": dict{( + }), + "ns3::Ipv6ExtensionDestination": dict({ "category": "", "create_function": create_element, "help": "", @@ -669,12 +670,12 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::LoopbackNetDevice": dict{( + }), + "ns3::LoopbackNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -683,8 +684,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::ConstantSpeedPropagationDelayModel": dict{( + }), + "ns3::ConstantSpeedPropagationDelayModel": dict({ "category": "Delay", "create_function": create_element, "help": "", @@ -697,8 +698,8 @@ factories_info = dict{( "box_attributes": ["Speed"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionHopByHop": dict{( + }), + "ns3::Ipv6ExtensionHopByHop": dict({ "category": "", "create_function": create_element, "help": "", @@ -711,12 +712,12 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::BridgeChannel": dict{( + }), + "ns3::BridgeChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", - "connector_types": ["devs"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -725,8 +726,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::Radvd": dict{( + }), + "ns3::Radvd": dict({ "category": "", "create_function": create_element, "help": "", @@ -740,8 +741,8 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::PacketSocket": dict{( + }), + "ns3::PacketSocket": dict({ "category": "", "create_function": create_element, "help": "", @@ -754,12 +755,12 @@ factories_info = dict{( "box_attributes": ["RcvBufSize"], "factory_attributes": [], "traces": [] - )}, - "ns3::flame::FlameProtocol": dict{( + }), + "ns3::flame::FlameProtocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -769,8 +770,8 @@ factories_info = dict{( "MaxCost"], "factory_attributes": [], "traces": [] - )}, - "ns3::Cost231PropagationLossModel": dict{( + }), + "ns3::Cost231PropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -787,8 +788,8 @@ factories_info = dict{( "MinDistance"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionESP": dict{( + }), + "ns3::Ipv6ExtensionESP": dict({ "category": "", "create_function": create_element, "help": "", @@ -801,12 +802,12 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::CaraWifiManager": dict{( + }), + "ns3::CaraWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -824,8 +825,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::RttMeanDeviation": dict{( + }), + "ns3::RttMeanDeviation": dict({ "category": "", "create_function": create_element, "help": "", @@ -841,8 +842,8 @@ factories_info = dict{( "MinRTO"], "factory_attributes": [], "traces": [] - )}, - "ns3::Icmpv4L4Protocol": dict{( + }), + "ns3::Icmpv4L4Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", @@ -855,8 +856,8 @@ factories_info = dict{( "box_attributes": ["ProtocolNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::WaveformGenerator": dict{( + }), + "ns3::WaveformGenerator": dict({ "category": "", "create_function": create_element, "help": "", @@ -870,8 +871,8 @@ factories_info = dict{( "DutyCycle"], "factory_attributes": [], "traces": [] - )}, - "ns3::YansWifiChannel": dict{( + }), + "ns3::YansWifiChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -884,8 +885,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::SimpleChannel": dict{( + }), + "ns3::SimpleChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -898,8 +899,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionFragment": dict{( + }), + "ns3::Ipv6ExtensionFragment": dict({ "category": "", "create_function": create_element, "help": "", @@ -912,8 +913,8 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::Dot11sStack": dict{( + }), + "ns3::Dot11sStack": dict({ "category": "", "create_function": create_element, "help": "", @@ -926,8 +927,8 @@ factories_info = dict{( "box_attributes": ["Root"], "factory_attributes": [], "traces": [] - )}, - "ns3::FriisSpectrumPropagationLossModel": dict{( + }), + "ns3::FriisSpectrumPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -940,8 +941,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomRectanglePositionAllocator": dict{( + }), + "ns3::RandomRectanglePositionAllocator": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -955,8 +956,8 @@ factories_info = dict{( "Y"], "factory_attributes": [], "traces": [] - )}, - "ns3::NqapWifiMac": dict{( + }), + "ns3::NqapWifiMac": dict({ "category": "", "create_function": create_element, "help": "", @@ -980,8 +981,8 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::HierarchicalMobilityModel": dict{( + }), + "ns3::HierarchicalMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -995,12 +996,12 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::ThreeLogDistancePropagationLossModel": dict{( + }), + "ns3::ThreeLogDistancePropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", - "connector_types": ["prev", "next"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1015,8 +1016,8 @@ factories_info = dict{( "ReferenceLoss"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanNoiseModelDefault": dict{( + }), + "ns3::UanNoiseModelDefault": dict({ "category": "", "create_function": create_element, "help": "", @@ -1030,8 +1031,8 @@ factories_info = dict{( "Shipping"], "factory_attributes": [], "traces": [] - )}, - "ns3::dot11s::HwmpRtable": dict{( + }), + "ns3::dot11s::HwmpRtable": dict({ "category": "", "create_function": create_element, "help": "", @@ -1044,8 +1045,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::PacketBurst": dict{( + }), + "ns3::PacketBurst": dict({ "category": "", "create_function": create_element, "help": "", @@ -1058,12 +1059,12 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomPropagationDelayModel": dict{( + }), + "ns3::RandomPropagationDelayModel": dict({ "category": "Delay", "create_function": create_element, "help": "", - "connector_types": ["chan"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1072,8 +1073,8 @@ factories_info = dict{( "box_attributes": ["Variable"], "factory_attributes": [], "traces": [] - )}, - "ns3::ArpL3Protocol": dict{( + }), + "ns3::ArpL3Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", @@ -1086,12 +1087,12 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::SteadyStateRandomWaypointMobilityModel": dict{( + }), + "ns3::SteadyStateRandomWaypointMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1109,12 +1110,12 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::BaseStationNetDevice": dict{( + }), + "ns3::BaseStationNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -1132,12 +1133,12 @@ factories_info = dict{( "TTG"], "factory_attributes": [], "traces": [] - )}, - "ns3::UdpServer": dict{( + }), + "ns3::UdpServer": dict({ "category": "Application", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": stop_application, @@ -1149,12 +1150,12 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::AarfcdWifiManager": dict{( + }), + "ns3::AarfcdWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1177,8 +1178,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanTransducerHd": dict{( + }), + "ns3::UanTransducerHd": dict({ "category": "", "create_function": create_element, "help": "", @@ -1191,8 +1192,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::LogDistancePropagationLossModel": dict{( + }), + "ns3::LogDistancePropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -1207,8 +1208,8 @@ factories_info = dict{( "ReferenceLoss"], "factory_attributes": [], "traces": [] - )}, - "ns3::EmuNetDevice": dict{( + }), + "ns3::EmuNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", @@ -1226,8 +1227,8 @@ factories_info = dict{( "RxQueueSize"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionLooseRouting": dict{( + }), + "ns3::Ipv6ExtensionLooseRouting": dict({ "category": "", "create_function": create_element, "help": "", @@ -1240,8 +1241,8 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomWaypointMobilityModel": dict{( + }), + "ns3::RandomWaypointMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -1257,8 +1258,8 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::RangePropagationLossModel": dict{( + }), + "ns3::RangePropagationLossModel": dict({ "category": "", "create_function": create_element, "help": "", @@ -1271,12 +1272,12 @@ factories_info = dict{( "box_attributes": ["MaxRange"], "factory_attributes": [], "traces": [] - )}, - "ns3::AlohaNoackNetDevice": dict{( + }), + "ns3::AlohaNoackNetDevice": dict({ "category": "Device", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -1286,8 +1287,8 @@ factories_info = dict{( "Mtu"], "factory_attributes": [], "traces": [] - )}, - "ns3::MatrixPropagationLossModel": dict{( + }), + "ns3::MatrixPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -1300,8 +1301,8 @@ factories_info = dict{( "box_attributes": ["DefaultLoss"], "factory_attributes": [], "traces": [] - )}, - "ns3::WifiNetDevice": dict{( + }), + "ns3::WifiNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", @@ -1314,8 +1315,8 @@ factories_info = dict{( "box_attributes": ["Mtu"], "factory_attributes": [], "traces": [] - )}, - "ns3::CsmaChannel": dict{( + }), + "ns3::CsmaChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -1329,8 +1330,8 @@ factories_info = dict{( "Delay"], "factory_attributes": [], "traces": [] - )}, - "ns3::BridgeNetDevice": dict{( + }), + "ns3::BridgeNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", @@ -1345,8 +1346,8 @@ factories_info = dict{( "ExpirationTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionRouting": dict{( + }), + "ns3::Ipv6ExtensionRouting": dict({ "category": "", "create_function": create_element, "help": "", @@ -1359,8 +1360,8 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::QstaWifiMac": dict{( + }), + "ns3::QstaWifiMac": dict({ "category": "Mac", "create_function": create_wifi_standard_model, "help": "Station Wifi MAC Model", @@ -1385,8 +1386,8 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::UdpEchoClient": dict{( + }), + "ns3::UdpEchoClient": dict({ "category": "Application", "create_function": create_element, "help": "", @@ -1405,12 +1406,12 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::UdpClient": dict{( + }), + "ns3::UdpClient": dict({ "category": "Application", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": stop_application, @@ -1425,8 +1426,8 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::PointToPointChannel": dict{( + }), + "ns3::PointToPointChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -1439,8 +1440,8 @@ factories_info = dict{( "box_attributes": ["Delay"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6StaticRouting": dict{( + }), + "ns3::Ipv6StaticRouting": dict({ "category": "", "create_function": create_element, "help": "", @@ -1453,8 +1454,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::DropTailQueue": dict{( + }), + "ns3::DropTailQueue": dict({ "category": "Device", "create_function": create_element, "help": "", @@ -1468,8 +1469,8 @@ factories_info = dict{( "MaxBytes"], "factory_attributes": [], "traces": [] - )}, - "ns3::ConstantPositionMobilityModel": dict{( + }), + "ns3::ConstantPositionMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -1483,8 +1484,8 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::FixedRssLossModel": dict{( + }), + "ns3::FixedRssLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -1497,8 +1498,8 @@ factories_info = dict{( "box_attributes": ["Rss"], "factory_attributes": [], "traces": [] - )}, - "ns3::EnergySourceContainer": dict{( + }), + "ns3::EnergySourceContainer": dict({ "category": "", "create_function": create_element, "help": "", @@ -1511,8 +1512,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomWalk2dMobilityModel": dict{( + }), + "ns3::RandomWalk2dMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -1532,8 +1533,8 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::ListPositionAllocator": dict{( + }), + "ns3::ListPositionAllocator": dict({ "category": "", "create_function": create_element, "help": "", @@ -1546,12 +1547,12 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::dot11s::PeerManagementProtocol": dict{( + }), + "ns3::dot11s::PeerManagementProtocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1562,12 +1563,12 @@ factories_info = dict{( "EnableBeaconCollisionAvoidance"], "factory_attributes": [], "traces": [] - )}, - "ns3::MeshPointDevice": dict{( + }), + "ns3::MeshPointDevice": dict({ "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -1576,8 +1577,8 @@ factories_info = dict{( "box_attributes": ["Mtu"], "factory_attributes": [], "traces": [] - )}, - "ns3::BasicEnergySource": dict{( + }), + "ns3::BasicEnergySource": dict({ "category": "", "create_function": create_element, "help": "", @@ -1592,8 +1593,8 @@ factories_info = dict{( "PeriodicEnergyUpdateInterval"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6OptionPadn": dict{( + }), + "ns3::Ipv6OptionPadn": dict({ "category": "", "create_function": create_element, "help": "", @@ -1606,8 +1607,8 @@ factories_info = dict{( "box_attributes": ["OptionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::QapWifiMac": dict{( + }), + "ns3::QapWifiMac": dict({ "category": "Mac", "create_function": create_wifi_standard_model, "help": "Access point Wifi MAC Model", @@ -1631,8 +1632,8 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::YansErrorRateModel": dict{( + }), + "ns3::YansErrorRateModel": dict({ "category": "Error", "create_function": create_element, "help": "", @@ -1645,8 +1646,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::WifiMacQueue": dict{( + }), + "ns3::WifiMacQueue": dict({ "category": "", "create_function": create_element, "help": "", @@ -1660,12 +1661,12 @@ factories_info = dict{( "MaxDelay"], "factory_attributes": [], "traces": [] - )}, - "ns3::NonCommunicatingNetDevice": dict{( + }), + "ns3::NonCommunicatingNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -1674,8 +1675,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::RateErrorModel": dict{( + }), + "ns3::RateErrorModel": dict({ "category": "Error", "create_function": create_element, "help": "", @@ -1691,8 +1692,8 @@ factories_info = dict{( "IsEnabled"], "factory_attributes": [], "traces": [] - )}, - "ns3::MeshWifiInterfaceMac": dict{( + }), + "ns3::MeshWifiInterfaceMac": dict({ "category": "", "create_function": create_element, "help": "", @@ -1717,8 +1718,8 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyCalcSinrDual": dict{( + }), + "ns3::UanPhyCalcSinrDual": dict({ "category": "", "create_function": create_element, "help": "", @@ -1731,8 +1732,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6ExtensionAH": dict{( + }), + "ns3::Ipv6ExtensionAH": dict({ "category": "", "create_function": create_element, "help": "", @@ -1745,8 +1746,8 @@ factories_info = dict{( "box_attributes": ["ExtensionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::SingleModelSpectrumChannel": dict{( + }), + "ns3::SingleModelSpectrumChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -1759,8 +1760,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::YansWifiPhy": dict{( + }), + "ns3::YansWifiPhy": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -1782,8 +1783,8 @@ factories_info = dict{( "ChannelNumber"], "factory_attributes": [], "traces": ["yanswifipcap"] - )}, - "ns3::WifiRadioEnergyModel": dict{( + }), + "ns3::WifiRadioEnergyModel": dict({ "category": "", "create_function": create_element, "help": "", @@ -1799,8 +1800,8 @@ factories_info = dict{( "SleepCurrentA"], "factory_attributes": [], "traces": [] - )}, - "ns3::EdcaTxopN": dict{( + }), + "ns3::EdcaTxopN": dict({ "category": "", "create_function": create_element, "help": "", @@ -1816,8 +1817,8 @@ factories_info = dict{( "Aifsn"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyPerGenDefault": dict{( + }), + "ns3::UanPhyPerGenDefault": dict({ "category": "", "create_function": create_element, "help": "", @@ -1830,12 +1831,12 @@ factories_info = dict{( "box_attributes": ["Threshold"], "factory_attributes": [], "traces": [] - )}, - "ns3::IdealWifiManager": dict{( + }), + "ns3::IdealWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1850,8 +1851,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::MultiModelSpectrumChannel": dict{( + }), + "ns3::MultiModelSpectrumChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -1864,8 +1865,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::HalfDuplexIdealPhy": dict{( + }), + "ns3::HalfDuplexIdealPhy": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -1878,8 +1879,8 @@ factories_info = dict{( "box_attributes": ["Rate"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyCalcSinrDefault": dict{( + }), + "ns3::UanPhyCalcSinrDefault": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -1892,12 +1893,12 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::ReceiveListErrorModel": dict{( + }), + "ns3::ReceiveListErrorModel": dict({ "category": "Error", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -1906,8 +1907,8 @@ factories_info = dict{( "box_attributes": ["IsEnabled"], "factory_attributes": [], "traces": [] - )}, - "ns3::SpectrumAnalyzer": dict{( + }), + "ns3::SpectrumAnalyzer": dict({ "category": "", "create_function": create_element, "help": "", @@ -1921,8 +1922,8 @@ factories_info = dict{( "NoisePowerSpectralDensity"], "factory_attributes": [], "traces": [] - )}, - "ns3::ConstantRateWifiManager": dict{( + }), + "ns3::ConstantRateWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", @@ -1942,8 +1943,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6OptionPad1": dict{( + }), + "ns3::Ipv6OptionPad1": dict({ "category": "", "create_function": create_element, "help": "", @@ -1956,8 +1957,8 @@ factories_info = dict{( "box_attributes": ["OptionNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::UdpTraceClient": dict{( + }), + "ns3::UdpTraceClient": dict({ "category": "", "create_function": create_element, "help": "", @@ -1974,12 +1975,12 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::RraaWifiManager": dict{( + }), + "ns3::RraaWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2017,8 +2018,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomPropagationLossModel": dict{( + }), + "ns3::RandomPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -2031,8 +2032,8 @@ factories_info = dict{( "box_attributes": ["Variable"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanChannel": dict{( + }), + "ns3::UanChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -2045,12 +2046,12 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::MinstrelWifiManager": dict{( + }), + "ns3::MinstrelWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2070,8 +2071,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyDual": dict{( + }), + "ns3::UanPhyDual": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -2091,8 +2092,8 @@ factories_info = dict{( "SupportedModesPhy2"], "factory_attributes": [], "traces": [] - )}, - "ns3::ListErrorModel": dict{( + }), + "ns3::ListErrorModel": dict({ "category": "Error", "create_function": create_element, "help": "", @@ -2105,12 +2106,12 @@ factories_info = dict{( "box_attributes": ["IsEnabled"], "factory_attributes": [], "traces": [] - )}, - "ns3::VirtualNetDevice": dict{( + }), + "ns3::VirtualNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -2119,8 +2120,8 @@ factories_info = dict{( "box_attributes": ["Mtu"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyGen": dict{( + }), + "ns3::UanPhyGen": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -2137,12 +2138,12 @@ factories_info = dict{( "SupportedModes"], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv6L3Protocol": dict{( + }), + "ns3::Ipv6L3Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2152,8 +2153,8 @@ factories_info = dict{( "IpForward"], "factory_attributes": [], "traces": [] - )}, - "ns3::PointToPointRemoteChannel": dict{( + }), + "ns3::PointToPointRemoteChannel": dict({ "category": "Channel", "create_function": create_element, "help": "", @@ -2166,8 +2167,8 @@ factories_info = dict{( "box_attributes": ["Delay"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyPerUmodem": dict{( + }), + "ns3::UanPhyPerUmodem": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -2180,12 +2181,12 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::OnoeWifiManager": dict{( + }), + "ns3::OnoeWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2202,8 +2203,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::QadhocWifiMac": dict{( + }), + "ns3::QadhocWifiMac": dict({ "category": "Mac", "create_function": create_element, "help": "", @@ -2225,8 +2226,8 @@ factories_info = dict{( "Ssid"], "factory_attributes": [], "traces": [] - )}, - "ns3::JakesPropagationLossModel": dict{( + }), + "ns3::JakesPropagationLossModel": dict({ "category": "Loss", "create_function": create_element, "help": "", @@ -2242,8 +2243,8 @@ factories_info = dict{( "Distribution"], "factory_attributes": [], "traces": [] - )}, - "ns3::PacketSink": dict{( + }), + "ns3::PacketSink": dict({ "category": "Application", "create_function": create_element, "help": "", @@ -2259,8 +2260,8 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::RandomDirection2dMobilityModel": dict{( + }), + "ns3::RandomDirection2dMobilityModel": dict({ "category": "Mobility", "create_function": create_element, "help": "", @@ -2277,8 +2278,8 @@ factories_info = dict{( "Velocity"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanMacAloha": dict{( + }), + "ns3::UanMacAloha": dict({ "category": "", "create_function": create_element, "help": "", @@ -2291,8 +2292,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::MsduStandardAggregator": dict{( + }), + "ns3::MsduStandardAggregator": dict({ "category": "", "create_function": create_element, "help": "", @@ -2305,8 +2306,8 @@ factories_info = dict{( "box_attributes": ["MaxAmsduSize"], "factory_attributes": [], "traces": [] - )}, - "ns3::DcaTxop": dict{( + }), + "ns3::DcaTxop": dict({ "category": "", "create_function": create_element, "help": "", @@ -2321,8 +2322,8 @@ factories_info = dict{( "Aifsn"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPhyCalcSinrFhFsk": dict{( + }), + "ns3::UanPhyCalcSinrFhFsk": dict({ "category": "Phy", "create_function": create_element, "help": "", @@ -2335,8 +2336,8 @@ factories_info = dict{( "box_attributes": ["NumberOfHops"], "factory_attributes": [], "traces": [] - )}, - "ns3::UanPropModelIdeal": dict{( + }), + "ns3::UanPropModelIdeal": dict({ "category": "", "create_function": create_element, "help": "", @@ -2349,8 +2350,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::UanMacRcGw": dict{( + }), + "ns3::UanMacRcGw": dict({ "category": "", "create_function": create_element, "help": "", @@ -2374,8 +2375,8 @@ factories_info = dict{( "FrameSize"], "factory_attributes": [], "traces": [] - )}, - "ns3::NistErrorRateModel": dict{( + }), + "ns3::NistErrorRateModel": dict({ "category": "Error", "create_function": create_element, "help": "", @@ -2388,8 +2389,8 @@ factories_info = dict{( "box_attributes": [], "factory_attributes": [], "traces": [] - )}, - "ns3::Ipv4L3Protocol": dict{( + }), + "ns3::Ipv4L3Protocol": dict({ "category": "Protocol", "create_function": create_ipv4stack, "help": "", @@ -2404,12 +2405,12 @@ factories_info = dict{( "WeakEsModel"], "factory_attributes": [], "traces": [] - )}, - "ns3::aodv::RoutingProtocol": dict{( + }), + "ns3::aodv::RoutingProtocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2437,8 +2438,8 @@ factories_info = dict{( "EnableBroadcast"], "factory_attributes": [], "traces": [] - )}, - "ns3::TcpL4Protocol": dict{( + }), + "ns3::TcpL4Protocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", @@ -2452,12 +2453,12 @@ factories_info = dict{( "ProtocolNumber"], "factory_attributes": [], "traces": [] - )}, - "ns3::olsr::RoutingProtocol": dict{( + }), + "ns3::olsr::RoutingProtocol": dict({ "category": "Protocol", "create_function": create_element, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2470,8 +2471,8 @@ factories_info = dict{( "Willingness"], "factory_attributes": [], "traces": [] - )}, - "ns3::UdpEchoServer": dict{( + }), + "ns3::UdpEchoServer": dict({ "category": "Application", "create_function": create_element, "help": "", @@ -2486,12 +2487,12 @@ factories_info = dict{( "StopTime"], "factory_attributes": [], "traces": [] - )}, - "ns3::AmrrWifiManager": dict{( + }), + "ns3::AmrrWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", - "connector_types": ["dev"], + "connector_types": [], "allow_routes": False, "allow_addresses": False, "stop_function": None, @@ -2510,8 +2511,8 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::ArfWifiManager": dict{( + }), + "ns3::ArfWifiManager": dict({ "category": "Manager", "create_function": create_element, "help": "", @@ -2531,12 +2532,12 @@ factories_info = dict{( "NonUnicastMode"], "factory_attributes": [], "traces": [] - )}, - "ns3::SubscriberStationNetDevice": dict{( + }), + "ns3::SubscriberStationNetDevice": dict({ "category": "Device", "create_function": create_device, "help": "", - "connector_types": ["node"], + "connector_types": [], "allow_routes": False, "allow_addresses": True, "stop_function": None, @@ -2559,8 +2560,8 @@ factories_info = dict{( "TTG"], "factory_attributes": [], "traces": [] - )}, - "ns3::flame::FlameRtable": dict{( + }), + "ns3::flame::FlameRtable": dict({ "category": "", "create_function": create_element, "help": "", @@ -2573,5 +2574,5 @@ factories_info = dict{( "box_attributes": ["Lifetime"], "factory_attributes": [], "traces": [] - )}, -)} + }), +}) diff --git a/src/nepi/testbeds/ns3/metadata_v3_9_RC3.py b/src/nepi/testbeds/ns3/metadata_v3_9_RC3.py index 5b1bca72..57780b05 100644 --- a/src/nepi/testbeds/ns3/metadata_v3_9_RC3.py +++ b/src/nepi/testbeds/ns3/metadata_v3_9_RC3.py @@ -4,6 +4,7 @@ from constants import TESTBED_ID from nepi.core import metadata from nepi.core.attributes import Attribute +from nepi.util import validation from nepi.util.constants import AF_INET, STATUS_NOT_STARTED, STATUS_RUNNING, \ STATUS_FINISHED @@ -73,7 +74,11 @@ def connect_node_application(testbed_instance, node, application): def connect_node_other(tesbed_instance, node, other): node.AggregateObject(other) - + +def connect_fd_tap(tesbed_instance, fd, tap): + # TODO! + pass + ### create traces functions ### def get_node_guid(testbed_instance, guid): @@ -89,14 +94,14 @@ def get_dev_number(testbed_instance, guid): inteface_number += 1 return interface_number -def p2pcap_trace(testbed_instance, guid): +def p2ppcap_trace(testbed_instance, guid): trace_id = "p2ppcap" node_guid = get_node_guid(testbed_instance, guid) interface_number = get_dev_number(testbed_instance, guid) element = testbed_instance._elements[guid] filename = "trace-p2p-node-%d-dev-%d.pcap" % (node_name, interface_number) testbed_instance.follow_trace(guid, trace_id, filename) - filepath = testbed_instance.trace_filename(self, guid, trace_id): + filepath = testbed_instance.trace_filename(self, guid, trace_id) helper = testbed_instance.ns3.PointToPointHelper() helper.EnablePcap(filepath, element, explicitFilename = True) @@ -106,7 +111,7 @@ def _csmapcap_trace(testbed_instance, guid, trace_id, promisc): element = testbed_instance._elements[guid] filename = "trace-csma-node-%d-dev-%d.pcap" % (node_name, interface_number) testbed_instance.follow_trace(guid, trace_id, filename) - filepath = testbed_instance.trace_filename(self, guid, trace_id): + filepath = testbed_instance.trace_filename(self, guid, trace_id) helper = testbed_instance.ns3.CsmaHelper() helper.EnablePcap(filepath, element, promiscuous = promisc, explicitFilename = True) @@ -128,7 +133,7 @@ def fdpcap_trace(testbed_instance, guid): element = testbed_instance._elements[guid] filename = "trace-fd-node-%d-dev-%d.pcap" % (node_name, interface_number) testbed_instance.follow_trace(guid, trace_id, filename) - filepath = testbed_instance.trace_filename(self, guid, trace_id): + filepath = testbed_instance.trace_filename(self, guid, trace_id) helper = testbed_instance.ns3.FileDescriptorHelper() helper.EnablePcap(filepath, element, explicitFilename = True) @@ -140,7 +145,7 @@ def yanswifipcap_trace(testbed_instance, guid): element = testbed_instance._elements[dev_guid] filename = "trace-yanswifi-node-%d-dev-%d.pcap" % (node_name, interface_number) testbed_instance.follow_trace(guid, trace_id, filename) - filepath = testbed_instance.trace_filename(self, guid, trace_id): + filepath = testbed_instance.trace_filename(self, guid, trace_id) helper = testbed_instance.ns3.YansWifiPhyHelper() helper.EnablePcap(filepath, element, explicitFilename = True) @@ -158,9 +163,10 @@ def create_element(testbed_instance, guid): element_factory = testbed_instance.ns3.ObjectFactory() factory_id = testbed_instance._create[guid] element_factory.SetTypeId(factory_id) - factory_parameters = testbed_instance._get_factory_parameters(guid) - for name, value in factory_parameters.iteritems(): - testbed_instance._set(element_factory, factory_id, name, value) + construct_parameters = testbed_instance._get_construct_parameters(guid) + for name, value in construct_parameters.iteritems(): + ns3_value = testbed_instance._to_ns3_value(factory_id, name, value) + element_factory.Set(name, ns3_value) element = element_factory.Create() testbed_instance._elements[guid] = element traces = testbed_instance._get_traces(guid) @@ -609,7 +615,13 @@ connections = [ "to": ( "ns3", "ns3::RandomWaypointMobilityModel", "node" ), "code": connect_node_other, "can_cross": False - }) + }), + dict({ + "from": ( "ns3", "ns3::FileDescriptorNetDevice", "fd" ), + "to": ( "netns", "TapNodeInterface", "fd" ), + "code": connect_fd_tap, + "can_cross": False + }), ] traces = dict({ @@ -831,8 +843,8 @@ testbed_attributes = dict({ class VersionedMetadataInfo(metadata.VersionedMetadataInfo): @property - def connections_types(self): - return connection_types + def connector_types(self): + return connector_types @property def connections(self): diff --git a/src/nepi/testbeds/ns3/validation.py b/src/nepi/testbeds/ns3/validation.py new file mode 100644 index 00000000..80831f68 --- /dev/null +++ b/src/nepi/testbeds/ns3/validation.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# TODO: Allow netrefs! +def is_address(attribute, value): + if not isinstance(value, str): + return False + return True + diff --git a/src/nepi/util/validation.py b/src/nepi/util/validation.py index 1c899ee5..485d5da0 100644 --- a/src/nepi/util/validation.py +++ b/src/nepi/util/validation.py @@ -10,7 +10,7 @@ def is_enum(attribute, value): def is_bool(attribute, value): return isinstance(value, bool) -def is_float(attribute, value): +def is_double(attribute, value): return isinstance(value, float) def is_integer(attribute, value): diff --git a/test/lib/mock/metadata_v01.py b/test/lib/mock/metadata_v01.py index 17a5657b..bb175cb3 100644 --- a/test/lib/mock/metadata_v01.py +++ b/test/lib/mock/metadata_v01.py @@ -15,15 +15,15 @@ APP = "Application" ### Creation functions ### -def create_node(testbed_instance, guid, parameters, factory_parameters): +def create_node(testbed_instance, guid): element = NODE testbed_instance.elements[guid] = element -def create_iface(testbed_instance, guid, parameters, factory_parameters): +def create_iface(testbed_instance, guid): element = IFACE testbed_instance.elements[guid] = element -def create_application(testbed_instance, guid, parameters, factory_parameters): +def create_application(testbed_instance, guid): element = APP testbed_instance.elements[guid] = element @@ -154,8 +154,8 @@ testbed_attributes = dict({ class VersionedMetadataInfo(metadata.VersionedMetadataInfo): @property - def connections_types(self): - return connection_types + def connector_types(self): + return connector_types @property def connections(self): diff --git a/test/testbeds/netns/design.py b/test/testbeds/netns/design.py index 472cd935..b4e6c697 100755 --- a/test/testbeds/netns/design.py +++ b/test/testbeds/netns/design.py @@ -15,26 +15,26 @@ class NetnsDesignTestCase(unittest.TestCase): exp_desc = ExperimentDescription() testbed_version = "01" testbed_id = "netns" - netns_provider = FactoriesProvider(testbed_id, testbed_version) - netns_desc = exp_desc.add_testbed_description(netns_provider) - netns_desc.set_attribute_value("enableDebug", True) - node1 = netns_desc.create("Node") - node2 = netns_desc.create("Node") - iface1 = netns_desc.create("NodeInterface") + provider = FactoriesProvider(testbed_id, testbed_version) + tstbd_desc = exp_desc.add_testbed_description(provider) + tstbd_desc.set_attribute_value("enableDebug", True) + node1 = tstbd_desc.create("Node") + node2 = tstbd_desc.create("Node") + iface1 = tstbd_desc.create("NodeInterface") iface1.set_attribute_value("up", True) node1.connector("devs").connect(iface1.connector("node")) ip1 = iface1.add_address() ip1.set_attribute_value("Address", "10.0.0.1") - iface2 = netns_desc.create("NodeInterface") + iface2 = tstbd_desc.create("NodeInterface") iface2.set_attribute_value("up", True) node2.connector("devs").connect(iface2.connector("node")) ip2 = iface2.add_address() ip2.set_attribute_value("Address", "10.0.0.2") - switch = netns_desc.create("Switch") + switch = tstbd_desc.create("Switch") switch.set_attribute_value("up", True) iface1.connector("switch").connect(switch.connector("devs")) iface2.connector("switch").connect(switch.connector("devs")) - app = netns_desc.create("Application") + app = tstbd_desc.create("Application") app.set_attribute_value("command", "ping -qc10 10.0.0.2") app.connector("node").connect(node1.connector("apps")) xml = exp_desc.to_xml() diff --git a/test/testbeds/ns3/design.py b/test/testbeds/ns3/design.py new file mode 100755 index 00000000..6635c75f --- /dev/null +++ b/test/testbeds/ns3/design.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from nepi.core.design import ExperimentDescription, FactoriesProvider +from nepi.core.design import AF_INET +import os +import shutil +import test_util +import unittest +import uuid + +class Ns3DesignTestCase(unittest.TestCase): + def test_design_if(self): + exp_desc = ExperimentDescription() + testbed_version = "3_9_RC3" + testbed_id = "ns3" + provider = FactoriesProvider(testbed_id, testbed_version) + tstbd_desc = exp_desc.add_testbed_description(provider) + + node1 = tstbd_desc.create("ns3::Node") + ipv41 = tstbd_desc.create("ns3::Ipv4L3Protocol") + arp1 = tstbd_desc.create("ns3::ArpL3Protocol") + icmp1 = tstbd_desc.create("ns3::Icmpv4L4Protocol") + udp1 = tstbd_desc.create("ns3::UdpL4Protocol") + node1.connector("protos").connect(ipv41.connector("node")) + node1.connector("protos").connect(arp1.connector("node")) + node1.connector("protos").connect(icmp1.connector("node")) + node1.connector("protos").connect(udp1.connector("node")) + iface1 = tstbd_desc.create("ns3::PointToPointNetDevice") + queue1 = tstbd_desc.create("ns3::DropTailQueue") + node1.connector("devs").connect(iface1.connector("node")) + iface1.connector("queue").connect(queue1.connector("dev")) + trace1 = iface1.enable_trace("P2PPcapTrace") + ip1 = iface1.add_address() + ip1.set_attribute_value("Address", "10.0.0.1") + + node2 = tstbd_desc.create("ns3::Node") + ipv42 = tstbd_desc.create("ns3::Ipv4L3Protocol") + arp2 = tstbd_desc.create("ns3::ArpL3Protocol") + icmp2 = tstbd_desc.create("ns3::Icmpv4L4Protocol") + udp2 = tstbd_desc.create("ns3::UdpL4Protocol") + node2.connector("protos").connect(ipv42.connector("node")) + node2.connector("protos").connect(arp2.connector("node")) + node2.connector("protos").connect(icmp2.connector("node")) + node2.connector("protos").connect(udp2.connector("node")) + iface2 = tstbd_desc.create("ns3::PointToPointNetDevice") + queue2 = tstbd_desc.create("ns3::DropTailQueue") + node2.connector("devs").connect(iface2.connector("node")) + iface2.connector("queue").connect(queue2.connector("dev")) + trace2 = iface2.enable_trace("P2PPcapTrace") + ip2 = iface1.add_address() + ip2.set_attribute_value("Address", "10.0.0.2") + + chan = tstbd_desc.create("ns3::PointToPointChannel") + iface1.connector("chan").connect(chan.connector("dev2")) + iface2.connector("chan").connect(chan.connector("dev2")) + + app = tstbd_desc.create("ns3::V4Ping") + app.set_attribute_value("Remote", "10.0.0.2") + app.set_attribute_value("StartTime", "0s") + app.set_attribute_value("StopTime", "20s") + app.set_attribute_value("Verbose", False) + app.connector("node").connect(node1.connector("apps")) + + xml = exp_desc.to_xml() + exp_desc2 = ExperimentDescription() + exp_desc2.from_xml(xml) + xml2 = exp_desc2.to_xml() + self.assertTrue(xml == xml2) + +if __name__ == '__main__': + unittest.main() + -- 2.43.0