Sets the network for this channel.

 @param network [String] the name of the network
 @param conf [Hash] the configuration containing all networks
978541
def set_network(network, conf)
      @network = valid! network, valid_network(network, conf), :@network,
                        required: true,
                        required_error: 'channels must have a network',
                        invalid_error: 'invalid channel network %s'
    end
264382
private function setChannel()
    {
        if (!$this->slackConfig->getWebhook()->hasCustomChannel()) {
            return;
        }

        $this->payload['channel'] = $this->slackConfig->getWebhook()->getCustomChannel();
    }
976441
def set_community_set(none, noadv, noexp, add, local, inter, asn)
      str = ''
      # reset first
      set_args_keys(state: 'no', string: str)
      config_set('route_map', 'set_community', @set_args)
      return unless none || noadv || noexp || add ||
                    local || inter || !asn.empty?
      str.concat('internet ') if inter
      asn.each do |elem|
        str.concat(elem + ' ')
      end
      str.concat('no-export ') if noexp
      str.concat('no-advertise ') if noadv
      str.concat('local-AS ') if local
      str.concat('additive ') if add
      str.concat('none') if none
      set_args_keys(state: '', string: str)
      config_set('route_map', 'set_community', @set_args)
    end
870721
def network_configuration
      dns = settings.provider.network.dns
      dns = dns.split(",") if dns.is_a?(String)
      {
        "ip"=>public_ip,
        "netmask"=>settings.provider.network.netmask,
        "gateway"=>settings.provider.network.gateway,
        "dns"=>dns,
        "cloud_properties"=>{
          "name"=>settings.provider.network.name
        }
      }
    end
443083
def build_network_settings(**settings):
    '''
    
    '''
    if __grains__['lsb_distrib_id'] == 'nilrt':
        raise salt.exceptions.CommandExecutionError('Not supported in this version.')
    changes = []
    if 'networking' in settings:
        if settings['networking'] in _CONFIG_TRUE:
            __salt__['service.enable']('connman')
        else:
            __salt__['service.disable']('connman')

    if 'hostname' in settings:
        new_hostname = settings['hostname'].split('.', 1)[0]
        settings['hostname'] = new_hostname
        old_hostname = __salt__['network.get_hostname']
        if new_hostname != old_hostname:
            __salt__['network.mod_hostname'](new_hostname)
            changes.append('hostname={0}'.format(new_hostname))

    return changes
258789
def setup_network_id_or_exit(
        config: Dict[str, Any],
        given_network_id: int,
        web3: Web3,
) -> Tuple[int, bool]:
    
    node_network_id = int(web3.version.network)  # pylint: disable=no-member
    known_given_network_id = given_network_id in ID_TO_NETWORKNAME
    known_node_network_id = node_network_id in ID_TO_NETWORKNAME

    if node_network_id != given_network_id:
        if known_given_network_id and known_node_network_id:
            click.secho(
                f"The chosen ethereum network '{ID_TO_NETWORKNAME[given_network_id]}' "
                f"differs from the ethereum client '{ID_TO_NETWORKNAME[node_network_id]}'. "
                "Please update your settings.",
                fg='red',
            )
        else:
            click.secho(
                f"The chosen ethereum network id '{given_network_id}' differs "
                f"from the ethereum client '{node_network_id}'. "
                "Please update your settings.",
                fg='red',
            )
        sys.exit(1)

    config['chain_id'] = given_network_id
    return given_network_id, known_node_network_id
148570
def conf(self, value):
        

        self._conf = self._toconf(value)

        if self.autoconf:
            self.applyconfiguration()
1169857
def network_create(self, name, **kwargs):
        '''
        
        '''
        nt_ks = self.compute_conn
        kwargs['label'] = name
        kwargs = self._sanatize_network_params(kwargs)
        net = nt_ks.networks.create(**kwargs)
        return net.__dict__
655373
def _set_mtu_to_nics(self, conf):
        
        for dom_name, dom_spec in conf.get('domains', {}).items():
            for idx, nic in enumerate(dom_spec.get('nics', [])):
                net = self._get_net(conf, dom_name, nic)
                mtu = net.get('mtu', 1500)
                if mtu != 1500:
                    nic['mtu'] = mtu
772248
public void setNetworkSourceMac(java.util.Collection<StringFilter> networkSourceMac) {
        if (networkSourceMac == null) {
            this.networkSourceMac = null;
            return;
        }

        this.networkSourceMac = new java.util.ArrayList<StringFilter>(networkSourceMac);
    }
55666
@InterfaceAudience.Public
    public void setChannels(List<String> channels) {
        properties.put(ReplicationField.CHANNELS, channels);
        replicationInternal.setChannels(channels);
    }
1130442
func (s *GetNetworkOutput) SetNetwork(v *Network) *GetNetworkOutput {
	s.Network = v
	return s
}
649435
def reload
      @network_conf = {}
      begin
        ip_output = ip_show
      rescue NetworkInterfaceError
        return false
      end

      parse_ip4(ip_output)
      parse_ip6(ip_output, :global)
      parse_ip6(ip_output, :link)

      @network_conf[:mac] = parse_ip_output(ip_output, %r{link/ether}, 1)

      [4, 6].each do |version|
        @network_conf["gateway#{version}".to_sym] = parse_ip_output(ip_route(version), /^default/, 2)
      end
      true
    end
701533
public void setNetworkInterface(NetworkInterface netIf)
        throws SocketException {

        synchronized (infLock) {
            getImpl().setOption(SocketOptions.IP_MULTICAST_IF2, netIf);
            infAddress = null;
            interfaceSet = true;
        }
    }
1145676
@SuppressWarnings("deprecation")
	private static void checkOldNetworkConfig(final int numNetworkBuffers) {
		ConfigurationParserUtils.checkConfigParameter(numNetworkBuffers > 0, numNetworkBuffers,
			TaskManagerOptions.NETWORK_NUM_BUFFERS.key(),
			"Must have at least one network buffer");
	}
673090
def configure(conf)
      super
      @host = conf['host']
      @port = conf['port']
      @token = conf['token']
      @hostname = conf['hostname'] || Socket.gethostname.split('.').first

      # Determine mapping of record keys to syslog keys
      @mappings = {}
      SYSLOG_HEADERS.each do |key_name|
        conf_key = "#{key_name}_key"
        @mappings[key_name] = conf[conf_key] if conf.key?(conf_key)
      end
    end
401247
def configure_network_adaptor(device, ip, netmask, gateway, nameservers)
      super

      # Setup static IP without restarting network
      unless @boot
        logger.info "Updating in memory network configuration for #{device}"
        runshell("ifconfig #{device} #{ip} netmask #{netmask}")
        add_gateway_route(gateway) if gateway
      end

      # Also write to config file
      write_adaptor_config(device, config_data(device, ip, netmask, gateway, nameservers))

      # return the IP address assigned
      ip
    end