Returns the client info of an object
965212
def get_client_info(self, obj):
        
        info = self.get_base_info(obj)

        default_contact_info = {}
        default_contact = self.get_default_contact(client=obj)
        if default_contact:
            default_contact_info = self.get_contact_info(default_contact)

        info.update({
            "default_contact": default_contact_info
        })

        # UID of the client
        uid = api.get_uid(obj)

        # Bika Setup folder
        bika_setup = api.get_bika_setup()

        # bika samplepoints
        bika_samplepoints = bika_setup.bika_samplepoints
        bika_samplepoints_uid = api.get_uid(bika_samplepoints)

        # bika artemplates
        bika_artemplates = bika_setup.bika_artemplates
        bika_artemplates_uid = api.get_uid(bika_artemplates)

        # bika analysisprofiles
        bika_analysisprofiles = bika_setup.bika_analysisprofiles
        bika_analysisprofiles_uid = api.get_uid(bika_analysisprofiles)

        # bika analysisspecs
        bika_analysisspecs = bika_setup.bika_analysisspecs
        bika_analysisspecs_uid = api.get_uid(bika_analysisspecs)

        # catalog queries for UI field filtering
        filter_queries = {
            "contact": {
                "getParentUID": [uid]
            },
            "cc_contact": {
                "getParentUID": [uid]
            },
            "invoice_contact": {
                "getParentUID": [uid]
            },
            "samplepoint": {
                "getClientUID": [uid, bika_samplepoints_uid],
            },
            "artemplates": {
                "getClientUID": [uid, bika_artemplates_uid],
            },
            "analysisprofiles": {
                "getClientUID": [uid, bika_analysisprofiles_uid],
            },
            "analysisspecs": {
                "getClientUID": [uid, bika_analysisspecs_uid],
            },
            "samplinground": {
                "getParentUID": [uid],
            },
            "sample": {
                "getClientUID": [uid],
            },
        }
        info["filter_queries"] = filter_queries

        return info
305352
public static ObjectInfo getObjectInfo(Class c)
	{
		ObjectInfo info = cachedClassInfoMap.get(c);
		if (info == null)
		{
			synchronized (c)
			{

				info = new ObjectInfo(c);
				cachedClassInfoMap.put(c, info);
			}
		}
		return info;
	}
1268519
def info(self, callback=None, **kwargs):
        
        self.client.fetch(
            self.mk_req('', method='GET', **kwargs),
            callback = callback
        )
1030816
private String getObjectInfoFromSerializedObject() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getObjectInfoFromSerializedObject");
        String oscDesc;
        byte[] data = new byte[0];
        try {
            data = objMsg.getSerializedObject();
            oscDesc = SerializedObjectInfoHelper.getObjectInfo(data);
        } catch (ObjectFailedToSerializeException e) {
            oscDesc = String.format("unserializable class: %s", e.getExceptionInserts()[0]);
        }
        final String result = String.format("%s: %d%n%s: %s", HEADER_PAYLOAD_SIZE, data.length, HEADER_PAYLOAD_OBJ, oscDesc);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getObjectInfoFromSerializedObject", result);
        return result;
    }
1328178
def client(self):
        
        if self._client is None:
            self._client = self._get_client()
        return self._client
286228
def get_current_client_name(self, short=False):
        """"""
        client = self.get_current_client()
        if client:
            if short:
                return client.get_short_name()
            else:
                return client.get_filename()
792310
def MultiReadClientFullInfo(self, client_ids, min_last_ping=None):
    """"""
    res = {}
    for client_id in client_ids:
      try:
        md = self.ReadClientMetadata(client_id)
      except db.UnknownClientError:
        continue

      if md and min_last_ping and md.ping < min_last_ping:
        continue
      last_snapshot = self.ReadClientSnapshot(client_id)
      full_info = rdf_objects.ClientFullInfo(
          metadata=md,
          labels=self.ReadClientLabels(client_id),
          last_startup_info=self.ReadClientStartupInfo(client_id))
      if last_snapshot is None:
        full_info.last_snapshot = rdf_objects.ClientSnapshot(
            client_id=client_id)
      else:
        full_info.last_snapshot = last_snapshot
      res[client_id] = full_info
    return res
731690
def client_getname(self, encoding=_NOTSET):
        """"""
        return self.execute(b'CLIENT', b'GETNAME', encoding=encoding)
25241
def get_server_info(self):
        
        response = self.get_proto(path='')
        message = rest_pb2.GetApiOverviewResponse()
        message.ParseFromString(response.content)
        return ServerInfo(message)
919840
def MultiReadClientFullInfo(self, client_ids, min_last_ping=None,
                              cursor=None):
    """"""
    if not client_ids:
      return {}

    query = (
        "SELECT "
        "c.client_id, c.fleetspeak_enabled, c.certificate, "
        "UNIX_TIMESTAMP(c.last_ping), UNIX_TIMESTAMP(c.last_clock), "
        "c.last_ip, UNIX_TIMESTAMP(c.last_foreman), "
        "UNIX_TIMESTAMP(c.first_seen), "
        "UNIX_TIMESTAMP(c.last_snapshot_timestamp), "
        "UNIX_TIMESTAMP(c.last_crash_timestamp), "
        "UNIX_TIMESTAMP(c.last_startup_timestamp), "
        "h.client_snapshot, s.startup_info, s_last.startup_info, "
        "l.owner_username, l.label "
        "FROM clients as c "
        "FORCE INDEX (PRIMARY) "
        "LEFT JOIN client_snapshot_history as h FORCE INDEX (PRIMARY) ON ( "
        "c.client_id = h.client_id AND "
        "h.timestamp = c.last_snapshot_timestamp) "
        "LEFT JOIN client_startup_history as s FORCE INDEX (PRIMARY) ON ( "
        "c.client_id = s.client_id AND "
        "s.timestamp = c.last_snapshot_timestamp) "
        "LEFT JOIN client_startup_history as s_last FORCE INDEX (PRIMARY) ON ( "
        "c.client_id = s_last.client_id "
        "AND s_last.timestamp = c.last_startup_timestamp) "
        "LEFT JOIN client_labels AS l FORCE INDEX (PRIMARY) "
        "ON (c.client_id = l.client_id) ")

    query += "WHERE c.client_id IN (%s) " % ", ".join(["%s"] * len(client_ids))

    values = [db_utils.ClientIDToInt(cid) for cid in client_ids]
    if min_last_ping is not None:
      query += "AND c.last_ping >= FROM_UNIXTIME(%s)"
      values.append(mysql_utils.RDFDatetimeToTimestamp(min_last_ping))

    cursor.execute(query, values)
    return dict(self._ResponseToClientsFullInfo(cursor.fetchall()))
1009046
def client(self):
        """"""
        if isinstance(self._client, six.string_types):
            self._client = Client(self._client, self)

        return self._client
872282
def client_info(self, client):
        
        client = self._client_id(client)
        response = self._get(url.clients_id.format(id=client))
        self._check_response(response, 200)
        return self._create_response(response)
327920
def get_client_info(self):
        
        iq = aioxmpp.IQ(
            to=self.client.local_jid.bare().replace(localpart=None),
            type_=aioxmpp.IQType.GET,
            payload=xso.Query()
        )

        reply = (yield from self.client.send(iq))
        return reply
407599
def get_service_info(self, type, name, timeout=3000):
        """"""
        info = ServiceInfo(type, name)
        if info.request(self, timeout):
            return info
        return None
564633
def _get_client(self, server):
        
        return Client(
            server=server[0],
            authport=server[1],
            secret=server[2],
            dict=self._get_dictionary(),
        )
1237717
def get_soap_object(self, client):
        
        record_data = super().get_soap_object(client)
        record_data.records = [Record(r).get_soap_object(client) for r in record_data.records]
        return record_data
854108
def get_cpu_info(self):
        
        info = snap7.snap7types.S7CpuInfo()
        result = self.library.Cli_GetCpuInfo(self.pointer, byref(info))
        check_error(result, context="client")
        return info