:py:mod:`dissect.cim.utils` =========================== .. py:module:: dissect.cim.utils Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.cim.utils.ObjectPath Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.cim.utils.is_xp_mapping dissect.cim.utils.find_current_mapping dissect.cim.utils.parse_object_path .. py:class:: ObjectPath Bases: :py:obj:`NamedTuple` .. py:attribute:: hostname :type: str .. py:attribute:: namespace :type: str .. py:attribute:: class_ :type: str .. py:attribute:: instance :type: dict[str, str] .. py:function:: is_xp_mapping(h: dissect.cim.c_cim.c_cim.mapping_header | dissect.cim.c_cim.c_cim.mapping_header_xp) -> bool .. py:function:: find_current_mapping(mappings: list[BinaryIO]) -> tuple[bool, BinaryIO] .. py:function:: parse_object_path(object_path: str, ns: dissect.cim.cim.Namespace | None = None) -> ObjectPath Given a textual query string, parse it into an object path that we can query. Supported schemas:: cimv2 --> namespace //./root/cimv2 --> namespace //HOSTNAME/root/cimv2 --> namespace winmgmts://./root/cimv2 --> namespace Win32_Service --> class //./root/cimv2:Win32_Service --> class Win32_Service.Name='Beep' --> instance //./root/cimv2:Win32_Service.Name="Beep" --> instance We'd like to support this, but can't differentiate this:: from a class: //./root/cimv2/Win32_Service --> class :param object_path: the textual query string. :type object_path: str :param ns: :returns: a path we can use to query. :rtype: ObjectPath