'Sets up network on this host.'

def _setup_network_on_host(self, context, network):

    network.dhcp_server = self._get_dhcp_ip(context, network)
    self._initialize_network(network)
    if ((not CONF.fake_network) and network.enable_dhcp):
        dev = self.driver.get_dev(network)
        elevated = context.elevated()
        self.driver.update_dhcp(elevated, dev, network)
        if CONF.use_ipv6:
            self.driver.update_ra(context, dev, network)
            gateway = utils.get_my_linklocal(dev)
            network.gateway_v6 = gateway
            network.save()
