def _setup_network(self, context, network_ref):
        network_ref['dhcp_server'] = self._get_dhcp_ip(context, network_ref)

        mac_address = self.generate_mac_address()
        dev = self.driver.plug(network_ref, mac_address)
        self.driver.initialize_gateway_device(dev, network_ref)

        if not FLAGS.fake_network:
            self.driver.update_dhcp(context, dev, network_ref)
            if(FLAGS.use_ipv6):
                self.driver.update_ra(context, dev, network_ref)
                gateway = utils.get_my_linklocal(dev)
                self.db.network_update(context, network_ref['id'],
                                       {'gateway_v6': gateway})
Takes plain text data
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/network/manager.py/FlatDHCPManager._setup_network--crossover with--dataset/ETHPy150Open timothycrosley/hug/hug/input_format.py/text