'Constructor'

def __init__(self, is_cobblerd=False):

    self.__dict__ = CobblerAPI.__shared_state
    self.perms_ok = False
    if (not CobblerAPI.__has_loaded):
        random.seed()
        self.is_cobblerd = is_cobblerd
        try:
            self.logger = clogger.Logger('/var/log/cobbler/cobbler.log')
        except CX:
            return
        self.selinux_enabled = utils.is_selinux_enabled()
        self.dist = utils.check_dist()
        self.os_version = utils.os_release()
        CobblerAPI.__has_loaded = True
        module_loader.load_modules()
        self._collection_mgr = collection_manager.CollectionManager(self)
        self.deserialize()
        try:
            utils.load_signatures(self.settings().signature_path)
        except Exception as e:
            self.log(('Failed    to    load    signatures    from    %s:    %s' % (self.settings().signature_path, e)))
            return
        self.log(('%d    breeds    and    %d    OS    versions    read    from    the    signature    file' % (len(utils.get_valid_breeds()), len(utils.get_valid_os_versions()))))
        self.authn = self.get_module_from_file('authentication', 'module', 'authn_configfile')
        self.authz = self.get_module_from_file('authorization', 'module', 'authz_allowall')
        self.yumgen = yumgen.YumGen(self._collection_mgr)
        self.tftpgen = tftpgen.TFTPGen(self._collection_mgr, logger=self.logger)
        self.power_mgr = power_manager.PowerManager(self, self._collection_mgr)
        self.logger.debug('API    handle    initialized')
        self.perms_ok = True
