Configure a NameServer registry entry.
342147
def _config_win32_nameservers(self, nameservers):
        """"""
        # we call str() on nameservers to convert it from unicode to ascii
        nameservers = str(nameservers)
        split_char = self._determine_split_char(nameservers)
        ns_list = nameservers.split(split_char)
        for ns in ns_list:
            if not ns in self.nameservers:
                self.nameservers.append(ns)
709532
def set_domain(self, domain='https://api.anaconda.org'):
        """"""
        logger.debug(str((domain)))
        config = binstar_client.utils.get_config()
        config['url'] = domain
        binstar_client.utils.set_config(config)

        self._anaconda_client_api = binstar_client.utils.get_server_api(
            token=None, log_level=logging.NOTSET)

        return self.user()
67423
def register_opts(conf):
    """"""
    conf.register_cli_opts(CLI_OPTS)
    conf.register_opts(EPISODE_OPTS)
    conf.register_opts(FORMAT_OPTS)
    conf.register_opts(CACHE_OPTS, 'cache')
977190
def configure(host=DEFAULT_HOST, port=DEFAULT_PORT, prefix=''):
    
    global _client
    logging.info("Reconfiguring metrics: {}:{}/{}".format(host, port, prefix))
    _client = statsdclient.StatsdClient(host, port, prefix)
1105702
protected function configureId()
    {
        $this->id = sprintf(
            $this->options['id_format'],
            $this->options['server_name'],
            $this->options['pid'],
            implode(',', $this->queues)
        );
    }
55682
def register(self):
        """"""
        group = cfg.OptGroup(
            self.group_name,
            title="HNV (Hyper-V Network Virtualization) Options")
        self._config.register_group(group)
        self._config.register_opts(self._options, group=group)
1281350
def set_ddns_config(self, isenable, hostname, ddnsserver,
                                        user, password, callback=None):
        '''
        
        '''
        params = {'isEnable': isenable,
                  'hostName': hostname,
                  'ddnsServer': ddnsserver,
                  'user': user,
                  'password': password,
                 }
        return self.execute_command('setDDNSConfig', params, callback=callback)
561966
def setup_server(config_path):
    """"""
    # configure the SharQ server
    server = SharQServer(config_path)
    # start the requeue loop
    gevent.spawn(server.requeue)

    return server
145094
def _set_syslog_config_helper(host, username, password, syslog_config, config_value,
                              protocol=None, port=None, reset_service=None, esxi_host=None, credstore=None):
    '''
    
    '''
    cmd = 'system syslog config set --{0} {1}'.format(syslog_config, config_value)
    ret_dict = {}

    valid_resets = ['logdir', 'loghost', 'default-rotate',
                    'default-size', 'default-timeout', 'logdir-unique']
    if syslog_config not in valid_resets:
        ret_dict.update({'success': False,
                         'message': '\'{0}\' is not a valid config variable.'.format(syslog_config)})
        return ret_dict

    response = salt.utils.vmware.esxcli(host, username, password, cmd,
                                        protocol=protocol, port=port,
                                        esxi_host=esxi_host, credstore=credstore)

    # Update the return dictionary for success or error messages.
    if response['retcode'] != 0:
        ret_dict.update({syslog_config: {'success': False,
                                         'message': response['stdout']}})
    else:
        ret_dict.update({syslog_config: {'success': True}})

    # Restart syslog for each host, if desired.
    if reset_service:
        if esxi_host:
            host_name = esxi_host
            esxi_host = [esxi_host]
        else:
            host_name = host
        response = syslog_service_reload(host, username, password,
                                         protocol=protocol, port=port,
                                         esxi_hosts=esxi_host, credstore=credstore).get(host_name)
        ret_dict.update({'syslog_restart': {'success': response['retcode'] == 0}})

    return ret_dict
1325888
def register(self):
        """"""
        log.info('Installing ssh key, %s' % self.name)
        self.consul.create_ssh_pub_key(self.name, self.key)
722457
def set_config(self, data=None, **kwargs):
        """"""
        config = self.bot.config['server_config']
        for opt in data.split(' '):
            if '=' in opt:
                opt, value = opt.split('=', 1)
            else:
                value = True
            if opt.isupper():
                config[opt] = value
831821
protected function initNamespace()
    {
        $namespaces = $this->config->get('namespaces', null);

        if ($namespaces !== null) {
            foreach ($namespaces as $namespace => $path) {
                $this->loader->registerNamespaces([$namespace => $path], true);
            }
            $this->loader->register();
            $this->di->set('loader', $this->loader);
        }
    }
1341202
public void setRegistrationName(String name) {
    NamespaceService[] nsos = namespaceManager.getAllNamenodeThreads();
    for (NamespaceService ns : nsos) {
      ((NSOfferService) ns).setRegistrationName(name);
    }
  }
67688
def UpdateDNS(self, domain, environment):
        """"""
        self.dns_set_conf(domain, self.dns.config,
                          environment, self.dns.token)
1356101
def cli(env, identifier):
    """"""
    mgr = SoftLayer.LoadBalancerManager(env.client)

    _, loadbal_id = loadbal.parse_id(identifier)

    load_balancer = mgr.get_local_lb(loadbal_id)

    table = formatting.KeyValueTable(['name', 'value'])
    table.align['name'] = 'l'
    table.align['value'] = 'l'
    table.add_row(['ID', 'local:%s' % load_balancer['id']])
    table.add_row(['IP Address', load_balancer['ipAddress']['ipAddress']])
    name = load_balancer['loadBalancerHardware'][0]['datacenter']['name']
    table.add_row(['Datacenter', name])
    table.add_row(['Connections limit', load_balancer['connectionLimit']])
    table.add_row(['Dedicated', load_balancer['dedicatedFlag']])
    table.add_row(['HA', load_balancer['highAvailabilityFlag']])
    table.add_row(['SSL Enabled', load_balancer['sslEnabledFlag']])
    table.add_row(['SSL Active', load_balancer['sslActiveFlag']])

    index0 = 1
    for virtual_server in load_balancer['virtualServers']:
        for group in virtual_server['serviceGroups']:
            service_group_table = formatting.KeyValueTable(['name', 'value'])

            table.add_row(['Service Group %s' % index0, service_group_table])
            index0 += 1

            service_group_table.add_row(['Guest ID',
                                         virtual_server['id']])
            service_group_table.add_row(['Port', virtual_server['port']])
            service_group_table.add_row(['Allocation',
                                         '%s %%' %
                                         virtual_server['allocation']])
            service_group_table.add_row(['Routing Type',
                                         '%s:%s' %
                                         (group['routingTypeId'],
                                          group['routingType']['name'])])
            service_group_table.add_row(['Routing Method',
                                         '%s:%s' %
                                         (group['routingMethodId'],
                                          group['routingMethod']['name'])])

            index1 = 1
            for service in group['services']:
                service_table = formatting.KeyValueTable(['name', 'value'])

                service_group_table.add_row(['Service %s' % index1,
                                             service_table])
                index1 += 1

                health_check = service['healthChecks'][0]
                service_table.add_row(['Service ID', service['id']])
                service_table.add_row(['IP Address',
                                       service['ipAddress']['ipAddress']])
                service_table.add_row(['Port', service['port']])
                service_table.add_row(['Health Check',
                                       '%s:%s' %
                                       (health_check['healthCheckTypeId'],
                                        health_check['type']['name'])])
                service_table.add_row(
                    ['Weight', service['groupReferences'][0]['weight']])
                service_table.add_row(['Enabled', service['enabled']])
                service_table.add_row(['Status', service['status']])

    env.fout(table)
826365
def register_namespace(self, namespace, module):
        
        if namespace in self._namespaces:
            raise AlreadyRegisteredError("Namespace '{0}' is already registered on loader.".format(namespace))

        self._namespaces[namespace] = module
342211
def __init_configrs(self, rs_cfg):
        """"""
        # Use 'rs_id' to set the id for consistency, but need to rename
        # to 'id' to use with ReplicaSets.create()
        rs_cfg['id'] = rs_cfg.pop('rs_id', None)
        for member in rs_cfg.setdefault('members', [{}]):
            member['procParams'] = self._strip_auth(
                member.get('procParams', {}))
            member['procParams']['configsvr'] = True
            if self.enable_ipv6:
                common.enable_ipv6_single(member['procParams'])
        rs_cfg['sslParams'] = self.sslParams
        self._configsvrs.append(ReplicaSets().create(rs_cfg))