def GetClass(self, *args, **kwargs):
        """Retrieve a CIM class from the local repository of this class.

        For a description of the parameters, see
        :meth:`pywbem.WBEMConnection.GetClass`.
        """

        cname = args[0] if args else kwargs['ClassName']
        try:
            cc = self.classes[self.default_namespace][cname]
        except KeyError:
            if self.conn is None:
                ce = CIMError(CIM_ERR_NOT_FOUND, cname)
                raise ce
            cc = self.conn.GetClass(*args, **kwargs)
            try:
                self.classes[self.default_namespace][cc.classname] = cc
            except KeyError:
                self.classes[self.default_namespace] = \
                    NocaseDict({cc.classname: cc})
        if 'LocalOnly' in kwargs and not kwargs['LocalOnly']:
            if cc.superclass:
                try:
                    del kwargs['ClassName']
                except KeyError:
                    pass
                if args:
                    args = args[1:]
                super_ = self.GetClass(cc.superclass, *args, **kwargs)
                for prop in super_.properties.values():
                    if prop.name not in cc.properties:
                        cc.properties[prop.name] = prop
                for meth in super_.methods.values():
                    if meth.name not in cc.methods:
                        cc.methods[meth.name] = meth
        return cc
def GetClass ( self , * args , ** kwargs ) : cname = args [ 0 ] if args else kwargs [ 'ClassName' ] try : cc = self . classes [ self . default_namespace ] [ cname ] except KeyError : if self . conn is None : ce = CIMError ( CIM_ERR_NOT_FOUND , cname ) raise ce cc = self . conn . GetClass ( * args , ** kwargs ) try : self . classes [ self . default_namespace ] [ cc . classname ] = cc except KeyError : self . classes [ self . default_namespace ] = NocaseDict ( { cc . classname : cc } ) if 'LocalOnly' in kwargs and not kwargs [ 'LocalOnly' ] : if cc . superclass : try : del kwargs [ 'ClassName' ] except KeyError : pass if args : args = args [ 1 : ] super_ = self . GetClass ( cc . superclass , * args , ** kwargs ) for prop in super_ . properties . values ( ) : if prop . name not in cc . properties : cc . properties [ prop . name ] = prop for meth in super_ . methods . values ( ) : if meth . name not in cc . methods : cc . methods [ meth . name ] = meth return cc
Retrieve a CIM class from the local repository of this class.

        For a description of the parameters, see
        :meth:`pywbem.WBEMConnection.GetClass`.