def initialize(self): """Initialize network""" LOGGER.debug("Creating miniet...") self.net = mininet_net.Mininet() LOGGER.debug("Adding primary...") self.pri = self.net.addSwitch('pri', dpid='1', cls=self.OVS_CLS) LOGGER.info("Activating faucet topology...") self.topology = topology.FaucetTopology(self.config, self.pri) self.topology.initialize() self.topology.start() target_ip = "127.0.0.1" LOGGER.debug("Adding controller at %s", target_ip) controller = mininet_node.RemoteController self.net.addController('controller', controller=controller, ip=target_ip, port=self.ext_ofpt) LOGGER.debug("Adding secondary...") self._create_secondary() LOGGER.info("Starting mininet...") self.net.start() if 'ext_loip' in self.config: self._attach_switch_interface(self._CTRL_PRI_IFACE)
def initialize(self): """Initialize network""" LOGGER.debug("Creating miniet...") self.net = mininet_net.Mininet(ipBase=str(self._mininet_subnet)) LOGGER.debug("Adding primary...") self.pri = self.net.addSwitch('pri', dpid='1', cls=self.OVS_CLS) LOGGER.info("Activating faucet topology...") self.topology.initialize(self.pri) self.topology.start() LOGGER.info("Initializing faucitizer...") self._generate_behavioral_config() target_ip = "127.0.0.1" LOGGER.debug("Adding controller at %s", target_ip) controller = mininet_node.RemoteController self.net.addController('controller', controller=controller, ip=target_ip, port=self.ext_ofpt) LOGGER.debug("Adding secondary...") self._create_secondary() LOGGER.info("Starting mininet...") self.net.start() if self.ext_loip: self._attach_switch_interface(self._CTRL_PRI_IFACE) self.tap_intf = self._configure_tap_intf()
def initialize(self): """Initialize network""" LOGGER.debug("Creating miniet...") self.net = mininet_net.Mininet(ipBase=str(self._mininet_subnet)) LOGGER.debug("Adding primary...") self.pri = self.net.addSwitch('pri', dpid='1', cls=self.OVS_CLS) LOGGER.info("Initializing topology and faucitizer...") self.topology.initialize(self.pri) self._generate_behavioral_config() LOGGER.info("Activating faucet topology...") self.topology.start() target_ip = "127.0.0.1" LOGGER.debug("Adding controller at %s", target_ip) controller = mininet_node.RemoteController self.net.addController('faucet', controller=controller, ip=target_ip, port=self.ext_faucet_ofpt) self.net.addController('gauge', controller=controller, ip=target_ip, port=self.ext_gauge_ofpt)
def initialize(self): """Initialize network""" LOGGER.debug("Creating miniet...") self.net = mininet_net.Mininet(ipBase='10.20.0.0/16') LOGGER.debug("Adding primary...") self.pri = self.net.addSwitch('pri', dpid='1', cls=self.OVS_CLS) LOGGER.info("Activating faucet topology...") self.topology.initialize(self.pri) self.topology.start() LOGGER.info("Initializing faucitizer...") self.faucitizer.process_faucet_config( self.topology.get_network_topology()) faucetizer.write_behavioral_config(self.faucitizer, self.OUTPUT_FAUCET_FILE) target_ip = "127.0.0.1" LOGGER.debug("Adding controller at %s", target_ip) controller = mininet_node.RemoteController self.net.addController('controller', controller=controller, ip=target_ip, port=self.ext_ofpt) LOGGER.debug("Adding secondary...") self._create_secondary() LOGGER.info("Starting mininet...") self.net.start() if 'ext_loip' in self.config: self._attach_switch_interface(self._CTRL_PRI_IFACE)
def initialize(self): """Initialize network""" LOGGER.debug("Creating miniet...") self.net = mininet_net.Mininet() LOGGER.debug("Adding switches...") self.pri = self.net.addSwitch('pri', dpid='1', cls=self.OVS_CLS) self._create_secondary() target_ip = "127.0.0.1" LOGGER.debug("Adding controller at %s", target_ip) controller = mininet_node.RemoteController self.net.addController('controller', controller=controller, ip=target_ip, port=6633) LOGGER.info("Starting mininet...") self.net.start() if self.sec: self.device_intfs = self._make_device_intfs() for device_intf in self.device_intfs: LOGGER.info("Attaching device interface %s on port %d.", device_intf.name, device_intf.port) self.sec.addIntf(device_intf, port=device_intf.port) self._switch_attach(self.sec, device_intf)