populates server admin information
973324
def __init(self):
        
        params = {
            "f" : "json"
        }
        json_dict = self._get(url=self._currentURL,
                                 param_dict=params,
                                 securityHandler=self._securityHandler,
                                 proxy_url=self._proxy_url,
                                 proxy_port=self._proxy_port)
        self._json = json.dumps(json_dict)
        self._json_dict = json_dict
        attributes = [attr for attr in dir(self)
                    if not attr.startswith('__') and \
                    not attr.startswith('_')]
        for k,v in json_dict.items():
            if k.lower() == "extensions":
                self._extensions = []
                for ext in v:
                    self._extensions.append(Extension.fromJSON(ext))
                    del ext
            elif k in attributes:
                setattr(self, "_"+ k, json_dict[k])
            else:
                print( k, " - attribute not implemented in manageags.AGSService.")
            del k
            del v
731219
def member_info(self, member_id):
        """"""
        server_id = self._servers.host_to_server_id(
            self.member_id_to_host(member_id))
        server_info = self._servers.info(server_id)
        result = {'_id': member_id, 'server_id': server_id,
                  'mongodb_uri': server_info['mongodb_uri'],
                  'procInfo': server_info['procInfo'],
                  'statuses': server_info['statuses']}
        if self.login:
            result['mongodb_auth_uri'] = self.mongodb_auth_uri(
                self._servers.hostname(server_id))
        result['rsInfo'] = {}
        if server_info['procInfo']['alive']:
            # Can't call serverStatus on arbiter when running with auth enabled.
            # (SERVER-5479)
            if self.login or self.auth_key:
                arbiter_ids = [member['_id'] for member in self.arbiters()]
                if member_id in arbiter_ids:
                    result['rsInfo'] = {
                        'arbiterOnly': True, 'secondary': False, 'primary': False}
                    return result
            repl = self.run_command('serverStatus', arg=None, is_eval=False, member_id=member_id)['repl']
            logger.debug("member {member_id} repl info: {repl}".format(**locals()))
            for key in ('votes', 'tags', 'arbiterOnly', 'buildIndexes', 'hidden', 'priority', 'slaveDelay', 'votes', 'secondary'):
                if key in repl:
                    result['rsInfo'][key] = repl[key]
            result['rsInfo']['primary'] = repl.get('ismaster', False)

        return result
5421
def admin(self, server=None):
        
        with self.lock:
            if not server:
                self.send('ADMIN')
            else:
                self.send('ADMIN %s' % server)
            rvalue = []
            while self.readable():
                admin_ncodes = '257', '258', '259'
                msg = self._recv(expected_replies=('256',) + admin_ncodes)
                if msg[0] == '256':
                    pass
                elif msg[0]  in admin_ncodes:
                    rvalue.append(' '.join(msg[2:])[1:])

            return rvalue
913439
def get_admin_metadata(self):
        """"""
        logger.debug("Getting admin metdata")
        text = self.get_text(self.get_admin_metadata_key())
        return json.loads(text)
806295
def update_admin_object_resource(name, server=None, **kwargs):
    '''
    
    '''
    if 'jndiName' in kwargs:
        del kwargs['jndiName']
    return _update_element(name, 'resources/admin-object-resource', kwargs, server)
1205312
def get_server_info(self, format=None):
        
        parameters = {}
        if format is not None:
            parameters['format'] = format
        url = self.create_request_url(self.interface, 'GetServerInfo', 1,
            parameters)
        data = self.retrieve_request(url)
        return self.return_data(data, format=format)
354481
def populate(self):
        
        server, IPAddresses, storages = self.cloud_manager.get_server_data(self.uuid)
        self._reset(
            server,
            ip_addresses=IPAddresses,
            storage_devices=storages,
            populated=True
        )
        return self
86459
function (userId, doc, fieldNames, modifier) {
			// only admins can update user roles via the client
			return Users.isAdmin(userId) || (doc._id === userId && fieldNames.indexOf("roles") < 0);
		}
1081489
def get_admins_from_django(homedir):
    return ["root@localhost"]
    
    path = homedir + "/settings/basic.py"
    if not os.path.exists(path):
        path = homedir + "/settings.py"

    if not os.path.exists(path):
        return

    mod = compiler.parseFile(path)
    for node in mod.node.nodes:
        try:
            if node.asList()[0].name == "ADMINS":
                # print dir(node.asList()[1].nodes)
                # print node.asList()[1].nodes
                return [it.nodes[1].value for it in node.asList()[1].asList()]
        except:
            pass
1261471
def bind(cls, app, *paths, methods=None, name=None, view=None):
        """"""
        # Register self in admin
        if view is None:
            app.ps.admin.register(cls)
            if not paths:
                paths = ('%s/%s' % (app.ps.admin.cfg.prefix, name or cls.name),)
            cls.url = paths[0]
        return super(AdminHandler, cls).bind(app, *paths, methods=methods, name=name, view=view)
268407
private void populatePermissionOverwrites() {
        if (overwrittenUserPermissions == null) {
            overwrittenUserPermissions = new HashMap<>();
            overwrittenUserPermissions.putAll(((ServerChannelImpl) channel).getInternalOverwrittenUserPermissions());
        }
        if (overwrittenRolePermissions == null) {
            overwrittenRolePermissions = new HashMap<>();
            overwrittenRolePermissions.putAll(((ServerChannelImpl) channel).getInternalOverwrittenRolePermissions());
        }
    }
1139876
def get_admins(self):
        """"""
        # no nickserv support, assume people are who they say they are.
        if not self.config['feature'].getboolean('nickserv'):
            return
        with self.db.session_scope() as session:
            for a in session.query(orm.Permissions).all():
                if not a.registered:
                    self.update_authstatus(a.nick)
1183498
def manage_admins():
    """"""
    build = g.build

    # Do not show cached data
    db.session.add(build)
    db.session.refresh(build)

    add_form = forms.AddAdminForm()
    if add_form.validate_on_submit():

        invitation_user_id = '%s:%s' % (
            models.User.EMAIL_INVITATION, add_form.email_address.data)

        invitation_user = models.User.query.get(invitation_user_id)
        if not invitation_user:
            invitation_user = models.User(
                id=invitation_user_id,
                email_address=add_form.email_address.data)
            db.session.add(invitation_user)

        db.session.add(build)
        db.session.add(invitation_user)
        db.session.refresh(build, lockmode='update')

        build.owners.append(invitation_user)
        save_admin_log(build, invited_new_admin=True,
                       message=invitation_user.email_address)

        db.session.commit()

        logging.info('Added user=%r as owner to build_id=%r',
                     invitation_user.id, build.id)
        return redirect(url_for('manage_admins', build_id=build.id))

    add_form.build_id.data = build.id

    revoke_form_list = []
    for user in build.owners:
        form = forms.RemoveAdminForm()
        form.user_id.data = user.id
        form.build_id.data = build.id
        form.revoke.data = True
        revoke_form_list.append((user, form))

    return render_template(
        'view_admins.html',
        build=build,
        add_form=add_form,
        revoke_form_list=revoke_form_list)
1251461
private void loadServerParameters() {
    serverParser.addArgument("-p", "--port").required(true)
        .help("Port to be assigned to the server.\n");
    serverParser.addArgument("-m", "--model").required(true)
        .help("It is required to provide a model to perform POS tagging.");
    this.serverParser.addArgument("-lm", "--lemmatizerModel")
        .required(true)
        .help("It is required to provide a lemmatizer model.");
    serverParser.addArgument("-l", "--language")
        .choices("de", "en", "es", "eu", "fr", "gl", "it", "nl")
        .required(true)
        .help("Choose a language to perform annotation with ixa-pipe-pos.");

    serverParser.addArgument("--beamSize").required(false)
        .setDefault(DEFAULT_BEAM_SIZE)
        .help("Choose beam size for decoding, it defaults to 3.");
    serverParser.addArgument("-o", "--outputFormat").required(false)
        .choices("naf", "conll")
        .setDefault(Flags.DEFAULT_OUTPUT_FORMAT)
        .help("Choose output format; it defaults to NAF.\n");
    serverParser.addArgument("-mw", "--multiwords")
        .action(Arguments.storeTrue())
        .help("Use to detect and process multiwords.\n");
    serverParser.addArgument("-d", "--dictag")
        .action(Arguments.storeTrue())
        .help("Post process POS tagger output with a monosemic dictionary.\n");
    serverParser.addArgument("-a","--allMorphology")
        .action(Arguments.storeTrue())
        .help("Print all the POS tags and lemmas before disambiguation.\n");
  }
788718
function serverStatus(admin, options, callback) {
  executeDbAdminCommand(admin.s.db, { serverStatus: 1 }, options, callback);
}
866836
def get_couchdb_admins():
    '''
        
    '''
    user_list = []
    req = curl_couchdb('/_config/admins/')

    for user in req.json().keys():
        user_list.append(user)

    return user_list
36898
def server_data
      if name == :origen
        @server_data ||= Origen.client.origen
      else
        @server_data ||= Origen.client.plugins.find { |p| p[:origen_name].downcase == name.to_s.downcase }
      end
    end