List of available :class:`ClientMechanism` objects.
776785
def client_mechanisms(self):
        """"""
        return [mech for mech in self.mechs.values()
                if isinstance(mech, ClientMechanism)]
279256
def get_actuators(self):
        
        return {i.name: i.status for i in self.system.actuators}
103711
def getMechanismName(self):
        """"""
        if self._server_side:
            mech = self._authenticator.current_mech
            return mech.getMechanismName() if mech else None
        else:
            return getattr(self._authenticator, 'authMech', None)
819896
async def memberships(client: Client, search: str) -> dict:
    
    return await client.get(MODULE + '/memberships/%s' % search, schema=MEMBERSHIPS_SCHEMA)
1344455
def labeled_mechanisms(self):
        """"""
        label = self.subsystem.node_labels.indices2labels
        return tuple(list(label(mechanism)) for mechanism in self.mechanisms)
443674
def get_module_classes(module):
    

    clslst = get_module_members(module, type=inspect.isclass)
    return list(filter(lambda cls: not issubclass(cls, Exception),
                       clslst))
713514
def client_list(self, *args):
        """"""
        if len(self._clients) == 0:
            self.log('No clients connected')
        else:
            self.log(self._clients, pretty=True)
929234
def get_model_classes(self):
        
        self._import_plugins()
        return [plugin.model for plugin in self.plugins.values()]
1007595
def __get_instructions(self):
        ""
        if self.mode == 'c':
            c, m = utils.recv(self.__s)
            inst = [(c, m, self.__s)]
        else:
            inst = []
            with self.__client_list_lock:
                for com in self.clients:
                    c, m = utils.recv(com)
                    if c is not None:
                        inst.append((c, m, com))
        return inst
581591
def MultiReadClientMetadata(self, client_ids):
    """"""
    res = {}
    for client_id in client_ids:
      md = self.metadatas.get(client_id, None)
      if md is None:
        continue

      res[client_id] = rdf_objects.ClientMetadata(
          certificate=md.get("certificate"),
          fleetspeak_enabled=md.get("fleetspeak_enabled"),
          first_seen=md.get("first_seen"),
          ping=md.get("ping"),
          clock=md.get("clock"),
          ip=md.get("ip"),
          last_foreman_time=md.get("last_foreman_time"),
          last_crash_timestamp=md.get("last_crash_timestamp"),
          startup_info_timestamp=md.get("startup_info_timestamp"))

    return res
484166
def get_capabilities(cls):
        """"""
        capabilities = []
        for _cls in cls.mro():
            if issubclass(_cls, Capability) and _cls is not Capability \
              and not issubclass(_cls, Model):
                capabilities.append(_cls)
        return capabilities
140881
def services(self, *args, **kwargs):
        
        return self._client.services(*args, scope=self.id, **kwargs)
49735
def get_related_clients(self, client):
        
        related_clients = []
        for cl in self.get_clients():
            if cl.connection_file == client.connection_file and \
              cl is not client:
                related_clients.append(cl)
        return related_clients
504378
def tolist(self):
        
        return [[x.val for x in theclass.items] for theclass in self.classes]
381332
def get_models(self):
        
        try:
            rels = self.rels_ext.content
        except RequestFailed:
            # if rels-ext can't be retrieved, confirm this object does not have a RELS-EXT
            # (in which case, it does not have any content models)
            if "RELS-EXT" not in self.ds_list.keys():
                return []
            else:
                raise

        return list(rels.objects(self.uriref, modelns.hasModel))
1358472
async def ListKeys(self, entities, mode):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='KeyManager',
                   request='ListKeys',
                   version=1,
                   params=_params)
        _params['entities'] = entities
        _params['mode'] = mode
        reply = await self.rpc(msg)
        return reply
1211936
def list(self):
        
        parent_url = self.client.get_url(self.parent_object._manager._URL_KEY, 'GET', 'single', {'id': self.parent_object.id})
        target_url = parent_url + self.client.get_url_path(self._URL_KEY, 'GET', 'multi')
        return base.Query(self, target_url)