Sets up the router with the corresponding chassis
        (create slots and insert default adapters).
175154
def _setup_chassis(self):
        

        # With 1751 and 1760, WICs in WIC slot 1 show up as in slot 1, not 0
        # e.g. s1/0 not s0/2
        if self._chassis in ['1751', '1760']:
            self._create_slots(2)
            self._slots[1] = C1700_MB_WIC1()
        else:
            self._create_slots(1)
        self._slots[0] = C1700_MB_1FE()
35148
def setup(self):
        """"""
        # get all routes from submodules
        for prefix, routes in self.sub_rt:
            routes.prefix = self.prefix + prefix
            routes.setup()

            fn_name_prefixes = {}
            for fn_key, fn in routes.fn_namespace.items():
                self.fn_namespace[routes.name + '.' + fn_key] = fn
                fn_prefix = routes.name
                if '.' in fn_key:
                    fn_prefix += '.' + fn_key.rsplit('.', 1)[0]
                fn_name_prefixes[fn] = fn_prefix

            for key in self:
                funcs = set(rule[1] for rule in self[key])
                for route, route_module, module, fn in routes.get(key, []):
                    if fn not in funcs:
                        new_route = Route(prefix + route.path)
                        fn.rw_route = new_route
                        fn_name_prefix = fn_name_prefixes[fn]
                        data = (new_route, fn_name_prefix, module, fn)
                        self[key].append(data)

        # sort all rules
        for key in self:
            self[key].sort(key=lambda rule: rule[0])
874023
public function setup(){
		if($this->hasOption('autoinit') && $this->options()->autoinit){
			if($this->hasOption('default')){
				$this->setValue($this->options()->default);
			}else{
				$this->setValue('now');
			}
		}
	}
689093
def _setup():
    
    _SOCKET.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
    _SOCKET.bind(('', PORT))
    udp = threading.Thread(target=_listen, daemon=True)
    udp.start()
701578
def setup(self):
        """"""
        super().setup()
        self._start_time = self.clock.time
        self.initialize_simulants()
1261045
protected function initRouter(): void
    {
        $router = new \Bluz\Router\Router();
        $router->setOptions(Config::get('router'));

        Router::setInstance($router);
    }
818653
public function setup()
    {
        $this->di->set('config', $this->config);

        $this->initEnvironment($this->config);
        $this->initErrorHandler($this->config);
        $this->initLoader($this->config);
        $this->initModules($this->config);
        $this->initRoutes($this->config);
        $this->initServices($this->config);
        $this->initDispatcher();

        $this->application->setDI($this->di);
        DI::setDefault($this->di);

        return $this;
    }
407447
private void setUpNetworkDispatchers() {
        if (networkDispatcherFactory == null) {
            networkDispatcherFactory = new NetworkDispatcher.NetworkDispatcherFactory
                    (networkQueue, network,
                            cache, delivery);
        }

        for (int i = 0; i < networkDispatchers.length; i++) {
            networkDispatchers[i] = networkDispatcherFactory.create();
            networkDispatchers[i].start();
            addMarker(EVENT_NETWORK_DISPATCHER_START, networkDispatchers[i]);

        }
    }
1193684
public function _initTheContainer()
    {
        $this->addResource('Session', new Session());
        $this->addResource('Role', 'guest');
        $this->addResource('Cache', new Cache('application/cache'));

        $router = new Router($this->getResource('Packages'));
        $this->addResource('Router', $router);
    }
818744
protected function setup() {
		$this->rs = new \HaveAPI\Client\Resource($this->client, 'token', $this->description->resources->token, array());
		$this->via = isSet($this->opts['via']) ? $this->opts['via'] : self::HTTP_HEADER;
		
		if(isSet($this->opts['token'])) {
			$this->configured = true;
			$this->token = $this->opts['token'];
			return;
		}
		
		$this->requestToken();
	}
667784
def _setup_frontend(self):
        ''' 
        '''
        self.frontends = []
        self.fe_poller = zmq.Poller()
        for actual_frontend_address in self.frontend_address:
            # Subscriber or server socket
            actual_frontend = (actual_frontend_address,
                               self.context.socket(self.frontend_socket_type))
            # Wait 0.5 s before termating socket
            actual_frontend[1].setsockopt(zmq.LINGER, 500)
            # Buffer only 10 meassages, then throw data away
            actual_frontend[1].set_hwm(10)
            # A suscriber has to set to not filter any data
            if self.frontend_socket_type == zmq.SUB:
                actual_frontend[1].setsockopt_string(zmq.SUBSCRIBE, u'')
            actual_frontend[1].connect(actual_frontend_address)
            self.frontends.append(actual_frontend)
            self.fe_poller.register(actual_frontend[1], zmq.POLLIN)
        self.raw_data = queue.Queue()
        self.fe_stop = threading.Event()
98018
protected function configureMasterSocket(): void
    {
        $class = $this->options['socket_master_class'];
        $options = $this->options['socket_master_options'];
        $this->socket = new $class($this->server->getUri(), $options);
    }
513530
def _setup_transport(self):
        
        self._write = self.sock.sendall
        self._read_buffer = bytes()
1031254
public function setupRoutes()
    {
        $routes = $this->config();

        if (PHP_SAPI == 'cli') {
            $scripts = ( isset($routes['scripts']) ? $routes['scripts'] : [] );
            foreach ($scripts as $scriptIdent => $scriptConfig) {
                $this->setupScript($scriptIdent, $scriptConfig);
            }
        } else {
            $templates = ( isset($routes['templates']) ? $routes['templates'] : [] );
            foreach ($templates as $routeIdent => $templateConfig) {
                $this->setupTemplate($routeIdent, $templateConfig);
            }

            $actions = ( isset($routes['actions']) ? $routes['actions'] : [] );
            foreach ($actions as $actionIdent => $actionConfig) {
                $this->setupAction($actionIdent, $actionConfig);
            }
        }
    }
969917
public function start() {
        // Don't load db if we don't want it (redo in the future)
        if($this->config->exists('database')) {
            $this->db = new DB\Connection($this->config);
        }

        $this->router = new Router($this->klein, $this->config);
    }
583243
def setup(self):
        """"""
        for table_spec in self._table_specs:
            with self._conn:
                table_spec.setup(self._conn)
932698
def router_add(self, params):
        """"""
        if self.uses_rs_configdb:
            # Replica set configdb.
            rs_id = self._configsvrs[0]
            config_members = ReplicaSets().members(rs_id)
            configdb = '%s/%s' % (
                rs_id, ','.join(m['host'] for m in config_members))
        else:
            configdb = ','.join(Servers().hostname(item)
                                for item in self._configsvrs)
        server_id = params.pop('server_id', None)
        version = params.pop('version', self._version)
        params.update({'configdb': configdb})

        if self.enable_ipv6:
            common.enable_ipv6_single(params)
        # Remove flags that turn auth on.
        params = self._strip_auth(params)

        self._routers.append(Servers().create(
            'mongos', params, sslParams=self.sslParams, autostart=True,
            version=version, server_id=server_id))
        return {'id': self._routers[-1], 'hostname': Servers().hostname(self._routers[-1])}