ucscsdk/ucschandle.py
def query_classids(self, class_ids=[], dme="central-mgr"):
        """
        Queries multiple obects from the server based of a comma separated list
        of their class Ids.

        Args:
            class_ids (comma separated strings): Class Ids to be queried for
            dme: DME to post the query to

        Returns:
        Dictionary {class_id1: [objects], class_id2: [objects]}

        Example:
            obj = handle.query_classids(["OrgOrg", "LsServer"])
        """

        from .ucscbasetype import ClassIdSet, ClassId
        from .ucscmeta import MO_CLASS_ID

        if not class_ids:
            raise ValueError("Provide Comma Separated string of Class Ids")

        class_id_list = [class_id.strip() for class_id in class_ids]
        class_id_dict = {}
        class_id_set = ClassIdSet()

        for class_id_ in class_id_list:
            class_id_obj = ClassId()

            meta_class_id = ucscgenutils.word_u(class_id_)
            if meta_class_id in MO_CLASS_ID:
                class_id_dict[meta_class_id] = []
                class_id_obj.value = ucscgenutils.word_l(class_id_)
            else:
                class_id_dict[class_id_] = []
                class_id_obj.value = class_id_

            class_id_set.child_add(class_id_obj)

        elem = config_resolve_classes(cookie=self.cookie, in_ids=class_id_set)
        response = self.post_elem(elem, dme=dme)
        if response.error_code != 0:
            raise UcscException(response.error_code, response.error_descr)

        for out_mo in response.out_configs.child:
            class_id_dict[out_mo.get_class_id()].append(out_mo)

        return class_id_dict

        Queries multiple obects from the server based of a comma separated list
        of their class Ids.

        Args:
            class_ids (comma separated strings): Class Ids to be queried for
            dme: DME to post the query to

        Returns:
        Dictionary {class_id1: [objects], class_id2: [objects]}

        Example:
            obj = handle.query_classids(["OrgOrg", "LsServer"])
        
Queries multiple obects from the server based of a comma separated list
of their class Ids.
Queries multiple obects from the server based of a comma separated list of their class Ids .
def query_classids(self, class_ids=[], dme="central-mgr"):
        from .ucscbasetype import ClassIdSet, ClassId
        from .ucscmeta import MO_CLASS_ID
        if not class_ids:
            raise ValueError("Provide Comma Separated string of Class Ids")
        class_id_list = [class_id.strip() for class_id in class_ids]
        class_id_dict = {}
        class_id_set = ClassIdSet()
        for class_id_ in class_id_list:
            class_id_obj = ClassId()
            meta_class_id = ucscgenutils.word_u(class_id_)
            if meta_class_id in MO_CLASS_ID:
                class_id_dict[meta_class_id] = []
                class_id_obj.value = ucscgenutils.word_l(class_id_)
            else:
                class_id_dict[class_id_] = []
                class_id_obj.value = class_id_
            class_id_set.child_add(class_id_obj)
        elem = config_resolve_classes(cookie=self.cookie, in_ids=class_id_set)
        response = self.post_elem(elem, dme=dme)
        if response.error_code != 0:
            raise UcscException(response.error_code, response.error_descr)
        for out_mo in response.out_configs.child:
            class_id_dict[out_mo.get_class_id()].append(out_mo)
        return class_id_dict
def query_classids ( self , class_ids = [ ] , dme = "central-mgr" ) : from . ucscbasetype import ClassIdSet , ClassId from . ucscmeta import MO_CLASS_ID if not class_ids : raise ValueError ( "Provide Comma Separated string of Class Ids" ) class_id_list = [ class_id . strip ( ) for class_id in class_ids ] class_id_dict = { } class_id_set = ClassIdSet ( ) for class_id_ in class_id_list : class_id_obj = ClassId ( ) meta_class_id = ucscgenutils . word_u ( class_id_ ) if meta_class_id in MO_CLASS_ID : class_id_dict [ meta_class_id ] = [ ] class_id_obj . value = ucscgenutils . word_l ( class_id_ ) else : class_id_dict [ class_id_ ] = [ ] class_id_obj . value = class_id_ class_id_set . child_add ( class_id_obj ) elem = config_resolve_classes ( cookie = self . cookie , in_ids = class_id_set ) response = self . post_elem ( elem , dme = dme ) if response . error_code != 0 : raise UcscException ( response . error_code , response . error_descr ) for out_mo in response . out_configs . child : class_id_dict [ out_mo . get_class_id ( ) ] . append ( out_mo ) return class_id_dict
Queries multiple obects from the server based of a comma separated list
of their class Ids.
Queries multiple obects from the server based of a comma separated list of their class Ids .
"""
        Queries multiple obects from the server based of a comma separated list
        of their class Ids.

        Args:
            class_ids (comma separated strings): Class Ids to be queried for
            dme: DME to post the query to

        Returns:
        Dictionary {class_id1: [objects], class_id2: [objects]}

        Example:
            obj = handle.query_classids(["OrgOrg", "LsServer"])
        """
None
self
class_ids
Class Ids to be queried for
Class Ids to be queried for
dme
DME to post the query to
DME to post the query to
examples
obj = handle.query_classids(["OrgOrg", "LsServer"])
obj = handle . query_classids ( [ " OrgOrg " " LsServer " ] )