def quota_group_report(self): # nfs has no quota support return [] def quota_user_set(self, user, block_softlimit=0, block_hardlimit=0, inode_softlimit=0, inode_hardlimit=0, operator="unknown"): # nfs has no quota support raise StorLeverError("NFS does not support quota", 500) def quota_group_set(self, group, block_softlimit=0, block_hardlimit=0, inode_softlimit=0, inode_hardlimit=0, operator="unknown"): # nfs has no quota support raise StorLeverError("NFS does not support quota", 500) ModuleManager.register_module(**MODULE_INFO) # register to fs manager FileSystemManager.add_fs_type("nfs", Nfs)
line_list = line.split() target = line_list[1] portal, sep, tag = line_list[0].partition(",") result.append({ "portal": portal, "target": target }) return result def system_restore_cb(self): check_output("rm -rf " + os.path.join(ISCSI_INITIATOR_DB_PATH, "nodes/*"), True) check_output("rm -rf " + os.path.join(ISCSI_INITIATOR_DB_PATH, "ifaces/*"), True) IscsiInitiatorManager = IscsiInitiatorManager() # register ftp manager callback functions to basic manager cfg_mgr().register_system_restore_cb(IscsiInitiatorManager.system_restore_cb) cfg_mgr().register_config_file(os.path.join(ISCSI_INITIATOR_DB_PATH, "ifaces/")) cfg_mgr().register_config_file(os.path.join(ISCSI_INITIATOR_DB_PATH, "nodes/")) service_mgr().register_service("iscsid", "iscsid", "iscsid", "iSCSI Initiator daemon") service_mgr().register_service("iscsi", "iscsi", "", "iSCSI Initiator login Script") ModuleManager.register_module(**MODULE_INFO) def iscsi_initiator_mgr(): """return the global block manager instance""" return IscsiInitiatorManager