23 #ifndef STORAGE_INTERFACE_H
24 #define STORAGE_INTERFACE_H
38 #include "storage/StorageVersion.h"
39 #include "storage/StorageSwig.h"
141 enum FsType { FSUNKNOWN, REISERFS, EXT2, EXT3, EXT4, BTRFS, VFAT, XFS, JFS, HFS, NTFS,
142 SWAP, HFSPLUS, NFS, NFS4, TMPFS, FSNONE };
144 enum PartitionType { PRIMARY, EXTENDED, LOGICAL, PTYPE_ANY };
146 enum MountByType { MOUNTBY_DEVICE, MOUNTBY_UUID, MOUNTBY_LABEL, MOUNTBY_ID, MOUNTBY_PATH };
148 enum EncryptType { ENC_NONE, ENC_TWOFISH, ENC_TWOFISH_OLD,
149 ENC_TWOFISH256_OLD, ENC_LUKS, ENC_UNKNOWN };
151 enum MdType { RAID_UNK, RAID0, RAID1, RAID5, RAID6, RAID10, MULTIPATH };
153 enum MdParity { PAR_DEFAULT, LEFT_ASYMMETRIC, LEFT_SYMMETRIC,
154 RIGHT_ASYMMETRIC, RIGHT_SYMMETRIC, PAR_FIRST, PAR_LAST,
155 LEFT_ASYMMETRIC_6, LEFT_SYMMETRIC_6, RIGHT_ASYMMETRIC_6,
156 RIGHT_SYMMETRIC_6, PAR_FIRST_6,
157 PAR_NEAR_2, PAR_OFFSET_2, PAR_FAR_2,
158 PAR_NEAR_3, PAR_OFFSET_3, PAR_FAR_3 };
160 enum MdArrayState { UNKNOWN, CLEAR, INACTIVE, SUSPENDED, READONLY, READ_AUTO,
161 CLEAN, ACTIVE, WRITE_PENDING, ACTIVE_IDLE };
163 enum UsedByType { UB_NONE, UB_LVM, UB_MD, UB_MDPART, UB_DM, UB_DMRAID, UB_DMMULTIPATH, UB_BTRFS };
165 enum CType { CUNKNOWN, DISK, MD, LOOP, LVM, DM, DMRAID, NFSC, DMMULTIPATH, MDPART, BTRFSC, TMPFSC };
167 enum Transport { TUNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE };
169 enum MultipathAutostart { MPAS_UNDECIDED, MPAS_ON, MPAS_OFF };
171 enum PartAlign { ALIGN_OPTIMAL, ALIGN_CYLINDER };
178 typedef void (*CallbackProgressBar)(
const string& id,
unsigned cur,
unsigned max);
184 typedef void (*CallbackShowInstallInfo)(
const string& id);
190 typedef void (*CallbackInfoPopup)(
const string& text);
198 typedef bool (*CallbackYesNoPopup)(
const string& text);
205 typedef bool (*CallbackCommitErrorPopup)(
int error,
const string& last_action,
206 const string& extended_message);
213 typedef bool (*CallbackPasswordPopup)(
const string& device,
int attempts,
string& password);
223 bool isExtendableWhileMounted;
225 bool isReduceableWhileMounted;
228 bool labelWhileMounted;
229 unsigned int labelLength;
230 unsigned long long minimalFsSizeK;
240 bool extendedPossible;
242 unsigned long long maxSectors;
249 UsedByInfo(UsedByType type,
const string& device) : type(type), device(device) {}
257 SubvolInfo(
const string& path) : path(path) {}
264 ResizeInfo() : df_freeK(0), resize_freeK(0), usedK(0), resize_ok(
false) {}
265 unsigned long long df_freeK;
266 unsigned long long resize_freeK;
267 unsigned long long usedK;
274 ContentInfo() : windows(
false), efi(
false), homes(0) {}
291 list<UsedByInfo> usedBy;
293 map<string, string> userdata;
313 unsigned long long sizeK;
314 unsigned long long cylSize;
317 unsigned long sectors;
318 unsigned int sectorSize;
320 string orig_disklabel;
322 bool extendedPossible;
326 bool has_fake_partition;
335 unsigned long long sizeK;
336 unsigned long long peSizeK;
337 unsigned long peCount;
338 unsigned long peFree;
342 list<string> devices;
343 list<string> devices_add;
344 list<string> devices_rem;
354 list<string> devices;
378 unsigned long long sizeK;
383 MountByType mount_by;
385 string fstab_options;
389 string tunefs_options;
392 EncryptType encryption;
401 unsigned long long origSizeK;
408 unsigned long cylStart;
409 unsigned long cylSize;
410 PartitionType partitionType;
424 unsigned long cylStart;
425 unsigned long cylSize;
426 PartitionType partitionType;
439 unsigned stripeSizeK;
472 unsigned long chunkSizeK;
473 list<string> devices;
500 unsigned long chunkSizeK;
501 list<string> devices;
550 list<string> devices;
551 list<string> devices_add;
552 list<string> devices_rem;
554 list<string> subvol_add;
555 list<string> subvol_rem;
630 unsigned long cylStart;
631 unsigned long cylSize;
633 bool primaryPossible;
635 bool extendedPossible;
637 bool logicalPossible;
656 STORAGE_NO_ERROR = 0,
658 DISK_PARTITION_OVERLAPS_EXISTING = -1000,
659 DISK_PARTITION_EXCEEDS_DISK = -1001,
660 DISK_CREATE_PARTITION_EXT_ONLY_ONCE = -1002,
661 DISK_CREATE_PARTITION_EXT_IMPOSSIBLE = -1003,
662 DISK_PARTITION_NO_FREE_NUMBER = -1004,
663 DISK_CREATE_PARTITION_INVALID_VOLUME = -1005,
664 DISK_CREATE_PARTITION_INVALID_TYPE = -1006,
665 DISK_CREATE_PARTITION_PARTED_FAILED = -1007,
666 DISK_PARTITION_NOT_FOUND = -1008,
667 DISK_CREATE_PARTITION_LOGICAL_NO_EXT = -1009,
668 DISK_PARTITION_LOGICAL_OUTSIDE_EXT = -1010,
669 DISK_SET_TYPE_INVALID_VOLUME = -1011,
670 DISK_SET_TYPE_PARTED_FAILED = -1012,
671 DISK_SET_LABEL_PARTED_FAILED = -1013,
672 DISK_REMOVE_PARTITION_PARTED_FAILED = -1014,
673 DISK_REMOVE_PARTITION_INVALID_VOLUME = -1015,
674 DISK_REMOVE_PARTITION_LIST_ERASE = -1016,
675 DISK_DESTROY_TABLE_INVALID_LABEL = -1017,
676 DISK_PARTITION_ZERO_SIZE = -1018,
677 DISK_CHANGE_READONLY = -1019,
678 DISK_RESIZE_PARTITION_INVALID_VOLUME = -1020,
679 DISK_RESIZE_PARTITION_PARTED_FAILED = -1021,
680 DISK_RESIZE_NO_SPACE = -1022,
681 DISK_CHECK_RESIZE_INVALID_VOLUME = -1023,
682 DISK_REMOVE_PARTITION_CREATE_NOT_FOUND = -1024,
683 DISK_COMMIT_NOTHING_TODO = -1025,
684 DISK_CREATE_PARTITION_NO_SPACE = -1026,
685 DISK_REMOVE_USED_BY = -1027,
686 DISK_INIT_NOT_POSSIBLE = -1028,
687 DISK_INVALID_PARTITION_ID = -1029,
689 STORAGE_DISK_NOT_FOUND = -2000,
690 STORAGE_VOLUME_NOT_FOUND = -2001,
691 STORAGE_REMOVE_PARTITION_INVALID_CONTAINER = -2002,
692 STORAGE_CHANGE_PARTITION_ID_INVALID_CONTAINER = -2003,
693 STORAGE_CHANGE_READONLY = -2004,
694 STORAGE_DISK_USED_BY = -2005,
695 STORAGE_LVM_VG_EXISTS = -2006,
696 STORAGE_LVM_VG_NOT_FOUND = -2007,
697 STORAGE_LVM_INVALID_DEVICE = -2008,
698 STORAGE_CONTAINER_NOT_FOUND = -2009,
699 STORAGE_VG_INVALID_NAME = -2010,
700 STORAGE_REMOVE_USED_VOLUME = -2011,
701 STORAGE_REMOVE_USING_UNKNOWN_TYPE = -2012,
702 STORAGE_NOT_YET_IMPLEMENTED = -2013,
703 STORAGE_MD_INVALID_NAME = -2014,
704 STORAGE_MD_NOT_FOUND = -2015,
705 STORAGE_MEMORY_EXHAUSTED = -2016,
706 STORAGE_LOOP_NOT_FOUND = -2017,
707 STORAGE_CREATED_LOOP_NOT_FOUND = -2018,
708 STORAGE_CHANGE_AREA_INVALID_CONTAINER = -2023,
709 STORAGE_BACKUP_STATE_NOT_FOUND = -2024,
710 STORAGE_INVALID_FSTAB_VALUE = -2025,
711 STORAGE_NO_FSTAB_PTR = -2026,
712 STORAGE_DEVICE_NODE_NOT_FOUND = -2027,
713 STORAGE_DMRAID_CO_NOT_FOUND = -2028,
714 STORAGE_RESIZE_INVALID_CONTAINER = -2029,
715 STORAGE_DMMULTIPATH_CO_NOT_FOUND = -2030,
716 STORAGE_ZERO_DEVICE_FAILED = -2031,
717 STORAGE_INVALID_BACKUP_STATE_NAME = -2032,
718 STORAGE_MDPART_CO_NOT_FOUND = -2033,
719 STORAGE_DEVICE_NOT_FOUND = -2034,
720 STORAGE_BTRFS_CO_NOT_FOUND = -2035,
721 STORAGE_TMPFS_CO_NOT_FOUND = -2036,
722 STORAGE_VOLUME_NOT_ENCRYPTED = -2037,
723 STORAGE_DM_RENAME_FAILED = -2038,
725 VOLUME_COMMIT_UNKNOWN_STAGE = -3000,
726 VOLUME_FSTAB_EMPTY_MOUNT = -3001,
727 VOLUME_UMOUNT_FAILED = -3002,
728 VOLUME_MOUNT_FAILED = -3003,
729 VOLUME_FORMAT_UNKNOWN_FS = -3005,
730 VOLUME_FORMAT_FS_UNDETECTED = -3006,
731 VOLUME_FORMAT_FS_TOO_SMALL = -3007,
732 VOLUME_FORMAT_FAILED = -3008,
733 VOLUME_TUNE2FS_FAILED = -3009,
734 VOLUME_MKLABEL_FS_UNABLE = -3010,
735 VOLUME_MKLABEL_FAILED = -3011,
736 VOLUME_LOSETUP_NO_LOOP = -3012,
737 VOLUME_LOSETUP_FAILED = -3013,
738 VOLUME_CRYPT_NO_PWD = -3014,
739 VOLUME_CRYPT_PWD_TOO_SHORT = -3015,
740 VOLUME_CRYPT_NOT_DETECTED = -3016,
741 VOLUME_FORMAT_EXTENDED_UNSUPPORTED = -3017,
742 VOLUME_MOUNT_EXTENDED_UNSUPPORTED = -3018,
743 VOLUME_MOUNT_POINT_INVALID = -3019,
744 VOLUME_MOUNTBY_NOT_ENCRYPTED = -3020,
745 VOLUME_MOUNTBY_UNSUPPORTED_BY_FS = -3021,
746 VOLUME_LABEL_NOT_SUPPORTED = -3022,
747 VOLUME_LABEL_TOO_LONG = -3023,
748 VOLUME_LABEL_WHILE_MOUNTED = -3024,
749 VOLUME_RESIZE_UNSUPPORTED_BY_FS = -3025,
750 VOLUME_RESIZE_UNSUPPORTED_BY_CONTAINER = -3026,
751 VOLUME_RESIZE_FAILED = -3027,
752 VOLUME_ALREADY_IN_USE = -3028,
753 VOLUME_LOUNSETUP_FAILED = -3029,
754 VOLUME_DEVICE_NOT_PRESENT = -3030,
755 VOLUME_DEVICE_NOT_BLOCK = -3031,
756 VOLUME_MOUNTBY_UNSUPPORTED_BY_VOLUME = -3032,
757 VOLUME_CRYPTFORMAT_FAILED = -3033,
758 VOLUME_CRYPTSETUP_FAILED = -3034,
759 VOLUME_CRYPTUNSETUP_FAILED = -3035,
760 VOLUME_FORMAT_NOT_IMPLEMENTED = -3036,
761 VOLUME_FORMAT_IMPOSSIBLE = -3037,
762 VOLUME_CRYPT_NFS_IMPOSSIBLE = -3038,
763 VOLUME_REMOUNT_FAILED = -3039,
764 VOLUME_TUNEREISERFS_FAILED = -3040,
765 VOLUME_UMOUNT_NOT_MOUNTED = -3041,
766 VOLUME_BTRFS_ADD_FAILED = -3042,
767 VOLUME_CANNOT_TMP_MOUNT = -3043,
768 VOLUME_CANNOT_TMP_UMOUNT = -3044,
769 VOLUME_BTRFS_SUBVOL_INIT_FAILED = -3045,
770 VOLUME_BTRFS_SUBVOL_SETDEFAULT = -3046,
772 LVM_CREATE_PV_FAILED = -4000,
773 LVM_PV_ALREADY_CONTAINED = -4001,
774 LVM_PV_DEVICE_UNKNOWN = -4002,
775 LVM_PV_DEVICE_USED = -4003,
776 LVM_VG_HAS_NONE_PV = -4004,
777 LVM_LV_INVALID_NAME = -4005,
778 LVM_LV_DUPLICATE_NAME = -4006,
779 LVM_LV_NO_SPACE = -4007,
780 LVM_LV_UNKNOWN_NAME = -4008,
781 LVM_LV_NOT_IN_LIST = -4009,
782 LVM_VG_CREATE_FAILED = -4010,
783 LVM_VG_EXTEND_FAILED = -4011,
784 LVM_VG_REDUCE_FAILED = -4012,
785 LVM_VG_REMOVE_FAILED = -4013,
786 LVM_LV_CREATE_FAILED = -4014,
787 LVM_LV_REMOVE_FAILED = -4015,
788 LVM_LV_RESIZE_FAILED = -4016,
789 LVM_PV_STILL_ADDED = -4017,
790 LVM_PV_REMOVE_NOT_FOUND = -4018,
791 LVM_CREATE_LV_INVALID_VOLUME = -4019,
792 LVM_REMOVE_LV_INVALID_VOLUME = -4020,
793 LVM_RESIZE_LV_INVALID_VOLUME = -4021,
794 LVM_CHANGE_READONLY = -4022,
795 LVM_CHECK_RESIZE_INVALID_VOLUME = -4023,
796 LVM_COMMIT_NOTHING_TODO = -4024,
797 LVM_LV_REMOVE_USED_BY = -4025,
798 LVM_LV_ALREADY_ON_DISK = -4026,
799 LVM_LV_NO_STRIPE_SIZE = -4027,
800 LVM_LV_UNKNOWN_ORIGIN = -4028,
801 LVM_LV_NOT_ON_DISK = -4029,
802 LVM_LV_NOT_SNAPSHOT = -4030,
803 LVM_LV_HAS_SNAPSHOTS = -4031,
804 LVM_LV_IS_SNAPSHOT = -4032,
805 LVM_LIST_EMPTY = -4033,
806 LVM_LV_NO_POOL_OR_SNAP = -4034,
807 LVM_LV_NO_POOL = -4035,
808 LVM_LV_UNKNOWN_POOL = -4036,
809 LVM_LV_INVALID_CHUNK_SIZE = -4037,
810 LVM_LV_POOL_NO_FORMAT = -4038,
811 LVM_LV_POOL_NO_MOUNT = -4039,
813 FSTAB_ENTRY_NOT_FOUND = -5000,
814 FSTAB_CHANGE_PREFIX_IMPOSSIBLE = -5001,
815 FSTAB_REMOVE_ENTRY_NOT_FOUND = -5002,
816 FSTAB_UPDATE_ENTRY_NOT_FOUND = -5003,
817 FSTAB_ADD_ENTRY_FOUND = -5004,
819 MD_CHANGE_READONLY = -6000,
820 MD_DUPLICATE_NUMBER = -6001,
821 MD_TOO_FEW_DEVICES = -6002,
822 MD_DEVICE_UNKNOWN = -6003,
823 MD_DEVICE_USED = -6004,
824 MD_CREATE_INVALID_VOLUME = -6005,
825 MD_REMOVE_FAILED = -6006,
826 MD_NOT_IN_LIST = -6007,
827 MD_CREATE_FAILED = -6008,
828 MD_UNKNOWN_NUMBER = -6009,
829 MD_REMOVE_USED_BY = -6010,
830 MD_NUMBER_TOO_LARGE = -6011,
831 MD_REMOVE_INVALID_VOLUME = -6012,
832 MD_REMOVE_CREATE_NOT_FOUND = -6013,
833 MD_NO_RESIZE_ON_DISK = -6014,
834 MD_ADD_DUPLICATE = -6015,
835 MD_REMOVE_NONEXISTENT = -6016,
836 MD_NO_CHANGE_ON_DISK = -6017,
837 MD_NO_CREATE_UNKNOWN = -6018,
838 MD_STATE_NOT_ON_DISK = -6019,
839 MD_PARTITION_NOT_FOUND = -6020,
840 MD_INVALID_PARITY = -6021,
841 MD_TOO_MANY_SPARES = -6022,
842 MD_GET_STATE_FAILED = -6023,
843 MD_DUPLICATE_NAME = -6024,
845 MDPART_CHANGE_READONLY = -6100,
846 MDPART_INTERNAL_ERR = -6101,
847 MDPART_INVALID_VOLUME = -6012,
848 MDPART_PARTITION_NOT_FOUND = -6103,
849 MDPART_REMOVE_PARTITION_LIST_ERASE = -6104,
850 MDPART_COMMIT_NOTHING_TODO = -6105,
851 MDPART_NO_REMOVE = -6106,
852 MDPART_DEVICE_NOT_FOUND = -6107,
854 LOOP_CHANGE_READONLY = -7000,
855 LOOP_DUPLICATE_FILE = -7001,
856 LOOP_UNKNOWN_FILE = -7002,
857 LOOP_REMOVE_USED_BY = -7003,
858 LOOP_FILE_CREATE_FAILED = -7004,
859 LOOP_CREATE_INVALID_VOLUME = -7005,
860 LOOP_REMOVE_FILE_FAILED = -7006,
861 LOOP_REMOVE_INVALID_VOLUME = -7007,
862 LOOP_NOT_IN_LIST = -7008,
863 LOOP_REMOVE_CREATE_NOT_FOUND = -7009,
864 LOOP_MODIFY_EXISTING = -7010,
866 PEC_PE_SIZE_INVALID = -9000,
867 PEC_PV_NOT_FOUND = -9001,
868 PEC_REMOVE_PV_IN_USE = -9002,
869 PEC_REMOVE_PV_SIZE_NEEDED = -9003,
870 PEC_LV_NO_SPACE_STRIPED = -9004,
871 PEC_LV_NO_SPACE_SINGLE = -9005,
872 PEC_LV_PE_DEV_NOT_FOUND = -9006,
874 DM_CHANGE_READONLY = -10000,
875 DM_UNKNOWN_TABLE = -10001,
876 DM_REMOVE_USED_BY = -10002,
877 DM_REMOVE_CREATE_NOT_FOUND = -10003,
878 DM_REMOVE_INVALID_VOLUME = -10004,
879 DM_REMOVE_FAILED = -10005,
880 DM_NOT_IN_LIST = -10006,
882 DASD_NOT_POSSIBLE = -11000,
883 DASD_FDASD_FAILED = -11001,
884 DASD_DASDFMT_FAILED = -11002,
886 DMPART_CHANGE_READONLY = -12001,
887 DMPART_INTERNAL_ERR = -12002,
888 DMPART_INVALID_VOLUME = -12003,
889 DMPART_PARTITION_NOT_FOUND = -12004,
890 DMPART_REMOVE_PARTITION_LIST_ERASE = -12005,
891 DMPART_COMMIT_NOTHING_TODO = -12006,
892 DMPART_NO_REMOVE = -12007,
894 DMRAID_REMOVE_FAILED = -13001,
896 NFS_VOLUME_NOT_FOUND = -14001,
897 NFS_CHANGE_READONLY = -14002,
898 NFS_REMOVE_VOLUME_CREATE_NOT_FOUND = -14003,
899 NFS_REMOVE_VOLUME_LIST_ERASE = -14004,
900 NFS_REMOVE_INVALID_VOLUME = -14005,
902 BTRFS_COMMIT_INVALID_VOLUME = -15001,
903 BTRFS_CANNOT_TMP_MOUNT = -15002,
904 BTRFS_CANNOT_TMP_UMOUNT = -15003,
905 BTRFS_DELETE_SUBVOL_FAIL = -15004,
906 BTRFS_CREATE_SUBVOL_FAIL = -15005,
907 BTRFS_VOLUME_NOT_FOUND = -15006,
908 BTRFS_SUBVOL_EXISTS = -15007,
909 BTRFS_SUBVOL_NON_EXISTS = -15008,
910 BTRFS_REMOVE_NOT_FOUND = -15009,
911 BTRFS_REMOVE_NO_BTRFS = -15010,
912 BTRFS_REMOVE_INVALID_VOLUME = -15011,
913 BTRFS_CHANGE_READONLY = -15012,
914 BTRFS_DEV_ALREADY_CONTAINED = -15013,
915 BTRFS_DEVICE_UNKNOWN = -15014,
916 BTRFS_DEVICE_USED = -15015,
917 BTRFS_HAS_NONE_DEV = -15016,
918 BTRFS_DEV_NOT_FOUND = -15017,
919 BTRFS_EXTEND_FAIL = -15018,
920 BTRFS_REDUCE_FAIL = -15019,
921 BTRFS_LIST_EMPTY = -15020,
922 BTRFS_RESIZE_INVALID_VOLUME = -15021,
923 BTRFS_MULTIDEV_SHRINK_UNSUPPORTED = -15022,
925 TMPFS_REMOVE_INVALID_VOLUME = -16001,
926 TMPFS_REMOVE_NO_TMPFS = -16002,
927 TMPFS_REMOVE_NOT_FOUND = -16003,
929 CONTAINER_INTERNAL_ERROR = -99000,
930 CONTAINER_INVALID_VIRTUAL_CALL = -99001,
948 virtual void getContainers( deque<ContainerInfo>& infos) = 0;
1070 virtual void getVolumes( deque<VolumeInfo>& infos) = 0;
1089 deque<PartitionInfo>& plist ) = 0;
1099 deque<LvmLvInfo>& plist ) = 0;
1107 virtual int getMdInfo( deque<MdInfo>& plist ) = 0;
1117 deque<MdPartInfo>& plist ) = 0;
1125 virtual int getNfsInfo( deque<NfsInfo>& plist ) = 0;
1133 virtual int getLoopInfo( deque<LoopInfo>& plist ) = 0;
1141 virtual int getDmInfo( deque<DmInfo>& plist ) = 0;
1149 virtual int getBtrfsInfo( deque<BtrfsInfo>& plist ) = 0;
1157 virtual int getTmpfsInfo( deque<TmpfsInfo>& plist ) = 0;
1167 deque<DmraidInfo>& plist ) = 0;
1177 deque<DmmultipathInfo>& plist ) = 0;
1208 unsigned long startCyl,
1209 unsigned long sizeCyl,
1210 string& SWIG_OUTPUT(device) ) = 0;
1221 unsigned long sizeCyl ) = 0;
1232 unsigned long sizeCyl ) = 0;
1245 unsigned long startCyl,
1246 unsigned long sizeCyl ) = 0;
1257 unsigned long& SWIG_OUTPUT(freeCylsBefore),
1258 unsigned long& SWIG_OUTPUT(freeCylsAfter)) = 0;
1270 unsigned & SWIG_OUTPUT(nr),
1271 string& SWIG_OUTPUT(device) ) = 0;
1286 unsigned long long startK,
1287 unsigned long long sizeK,
1288 string& SWIG_OUTPUT(device) ) = 0;
1301 unsigned long long sizeK,
1302 string& SWIG_OUTPUT(device) ) = 0;
1315 string& SWIG_OUTPUT(device) ) = 0;
1324 virtual unsigned long long cylinderToKb(
const string& disk,
1325 unsigned long sizeCyl) = 0;
1334 virtual unsigned long kbToCylinder(
const string& disk,
1335 unsigned long long sizeK) = 0;
1410 virtual int initializeDisk(
const string& disk,
bool value ) = 0;
1467 virtual int changeMountPoint(
const string& device,
const string& mount ) = 0;
1477 string& SWIG_OUTPUT(mount) ) = 0;
1486 virtual int changeMountBy(
const string& device, MountByType mby ) = 0;
1495 virtual int getMountBy(
const string& device,
1496 MountByType& SWIG_OUTPUT(mby) ) = 0;
1518 string& SWIG_OUTPUT(options) ) = 0;
1529 virtual int addFstabOptions(
const string& device,
const string& options ) = 0;
1549 virtual int setCryptPassword(
const string& device,
const string& pwd ) = 0;
1567 string& SWIG_OUTPUT(pwd) ) = 0;
1578 const string& pwd,
bool erase ) = 0;
1595 virtual int setCrypt(
const string& device,
bool val ) = 0;
1605 virtual int setCryptType(
const string& device,
bool val, EncryptType typ ) = 0;
1614 virtual int getCrypt(
const string& device,
bool& SWIG_OUTPUT(val) ) = 0;
1625 virtual int setIgnoreFstab(
const string& device,
bool val ) = 0;
1634 virtual int getIgnoreFstab(
const string& device,
bool& SWIG_OUTPUT(val) ) = 0;
1645 virtual int changeDescText(
const string& device,
const string& txt ) = 0;
1661 virtual int addFstabEntry(
const string& device,
const string& mount,
1662 const string& vfs,
const string& options,
1663 unsigned freq,
unsigned passno ) = 0;
1673 virtual int resizeVolume(
const string& device,
unsigned long long newSizeK) = 0;
1682 virtual int resizeVolumeNoFs(
const string& device,
unsigned long long newSizeK) = 0;
1725 list<string>& using_devices) = 0;
1737 list<string>& usedby_devices) = 0;
1883 unsigned long long peSizeK,
bool lvm1,
1884 const deque<string>& devs ) = 0;
1893 virtual int removeLvmVg(
const string& name ) = 0;
1903 const deque<string>& devs ) = 0;
1913 const deque<string>& devs ) = 0;
1926 virtual int createLvmLv(
const string& vg,
const string& name,
1927 unsigned long long sizeK,
unsigned stripes,
1928 string& SWIG_OUTPUT(device) ) = 0;
1945 virtual int removeLvmLv(
const string& vg,
const string& name ) = 0;
1957 unsigned long stripes ) = 0;
1969 unsigned long long stripeSizeK) = 0;
1982 const string& name,
unsigned long long cowSizeK,
1983 string& SWIG_OUTPUT(device) ) = 0;
2017 unsigned long long sizeK,
2018 string& SWIG_OUTPUT(device) ) = 0;
2032 unsigned long long sizeK,
2033 string& SWIG_OUTPUT(device) ) = 0;
2045 unsigned long long chunkSizeK) = 0;
2054 virtual int nextFreeMd(
unsigned& SWIG_OUTPUT(nr),
2055 string& SWIG_OUTPUT(device)) = 0;
2066 virtual int createMd(
const string& name, MdType md_type,
const list<string>& devices,
2067 const list<string>& spares) = 0;
2078 virtual int createMdAny(MdType md_type,
const list<string>& devices,
2079 const list<string>& spares,
2080 string& SWIG_OUTPUT(device) ) = 0;
2090 virtual int removeMd(
const string& name,
bool destroySb ) = 0;
2101 virtual int extendMd(
const string& name,
const list<string>& devices,
2102 const list<string>& spares) = 0;
2113 virtual int updateMd(
const string& name,
const list<string>& devices,
2114 const list<string>& spares) = 0;
2125 virtual int shrinkMd(
const string& name,
const list<string>& devices,
2126 const list<string>& spares) = 0;
2136 virtual int changeMdType(
const string& name, MdType md_type) = 0;
2146 virtual int changeMdChunk(
const string& name,
unsigned long chunkSizeK) = 0;
2156 virtual int changeMdParity(
const string& name, MdParity ptype ) = 0;
2164 virtual int checkMd(
const string& name ) = 0;
2201 virtual int computeMdSize(MdType md_type,
const list<string>& devices,
2202 const list<string>& spares,
unsigned long long& SWIG_OUTPUT(sizeK)) = 0;
2223 virtual int removeMdPartCo(
const string& name,
bool destroySb ) = 0;
2235 virtual int addNfsDevice(
const string& nfsDev,
const string& opts,
2236 unsigned long long sizeK,
const string& mp,
2248 virtual int checkNfsDevice(
const string& nfsDev,
const string& opts,
2249 bool nfs4,
unsigned long long& SWIG_OUTPUT(sizeK)) = 0;
2267 virtual int createFileLoop(
const string& lname,
bool reuseExisting,
2268 unsigned long long sizeK,
2269 const string& mp,
const string& pwd,
2270 string& SWIG_OUTPUT(device) ) = 0;
2289 virtual int modifyFileLoop(
const string& device,
const string& lname,
2291 unsigned long long sizeK ) = 0;
2301 virtual int removeFileLoop(
const string& lname,
bool removeFile ) = 0;
2318 virtual bool existSubvolume(
const string& device,
const string& name ) = 0;
2327 virtual int createSubvolume(
const string& device,
const string& name ) = 0;
2336 virtual int removeSubvolume(
const string& device,
const string& name ) = 0;
2347 const deque<string>& devs ) = 0;
2358 const deque<string>& devs ) = 0;
2367 virtual int addTmpfsMount(
const string& mp,
const string& opts ) = 0;
2514 virtual int commit() = 0;
2554 bool verbose_log)
const = 0;
2598 virtual bool umountDeviceUns(
const string& device,
bool unsetup ) = 0;
2610 virtual bool mountDevice(
const string& device,
const string& mp ) = 0;
2636 const string& opts ) = 0;
2649 virtual bool mountDeviceRo(
const string& device,
const string& mp,
2650 const string& opts ) = 0;
2676 const string& new_name ) = 0;
2690 bool get_content,
ContentInfo& content_info,
bool use_cache) = 0;
2699 virtual bool readFstab(
const string& dir, deque<VolumeInfo>& infos) = 0;
2771 virtual int setUserdata(
const string& device,
const map<string, string>& userdata) = 0;
2780 virtual int getUserdata(
const string& device, map<string, string>& userdata) = 0;
2788 void initDefaultLogger(
const string& logdir );
2794 typedef void (*CallbackLogDo)(
int level,
const string& component,
const char* file,
2795 int line,
const char*
function,
const string& content );
2801 typedef bool (*CallbackLogQuery)(
int level,
const string& component );
2806 void setLogDoCallback( CallbackLogDo pfc );
2811 CallbackLogDo getLogDoCallback();
2816 void setLogQueryCallback( CallbackLogQuery pfc );
2821 CallbackLogQuery getLogQueryCallback();
2828 Environment(
bool readonly,
const string& logdir =
"/var/log/YaST2")
2829 : readonly(readonly), testmode(
false), autodetect(
true),
2830 instsys(
false), logdir(logdir), testdir(
"tmp")
2832 storage::initDefaultLogger( logdir );
virtual void activateMultipath(bool val)=0
virtual int nextFreeMd(unsigned &SWIG_OUTPUT(nr), string &SWIG_OUTPUT(device))=0
virtual int addFstabEntry(const string &device, const string &mount, const string &vfs, const string &options, unsigned freq, unsigned passno)=0
virtual int createMd(const string &name, MdType md_type, const list< string > &devices, const list< string > &spares)=0
virtual int extendMd(const string &name, const list< string > &devices, const list< string > &spares)=0
Definition: StorageInterface.h:604
virtual int resizePartition(const string &device, unsigned long sizeCyl)=0
Definition: StorageInterface.h:627
virtual int createMdAny(MdType md_type, const list< string > &devices, const list< string > &spares, string &SWIG_OUTPUT(device))=0
virtual bool checkDeviceMounted(const string &device, list< string > &mps)=0
virtual int addTmpfsMount(const string &mp, const string &opts)=0
virtual int removeLvmVg(const string &name)=0
virtual void getVolumes(deque< VolumeInfo > &infos)=0
virtual int getNfsInfo(deque< NfsInfo > &plist)=0
virtual int removeMdPartCo(const string &name, bool destroySb)=0
virtual int updatePartitionArea(const string &device, unsigned long startCyl, unsigned long sizeCyl)=0
Definition: StorageInterface.h:219
virtual void setCallbackShowInstallInfo(CallbackShowInstallInfo pfnc)=0
virtual int getLoopInfo(deque< LoopInfo > &plist)=0
virtual int removeBackupState(const string &name)=0
virtual int forgetResizeVolume(const string &device)=0
virtual bool checkBackupState(const string &name) const =0
virtual int getLvmLvInfo(const string &name, deque< LvmLvInfo > &plist)=0
virtual int setCryptPassword(const string &device, const string &pwd)=0
virtual int changeMountBy(const string &device, MountByType mby)=0
virtual PartAlign getPartitionAlignment() const =0
Definition: StorageInterface.h:272
virtual int createBackupState(const string &name)=0
virtual int checkMd(const string &name)=0
virtual void setCallbackCommitErrorPopup(CallbackCommitErrorPopup pfnc)=0
Definition: StorageInterface.h:525
virtual int getDmInfo(deque< DmInfo > &plist)=0
virtual const string & getLastAction() const =0
virtual bool readFstab(const string &dir, deque< VolumeInfo > &infos)=0
virtual int changeFormatVolume(const string &device, bool format, FsType fs)=0
virtual int getDmmultipathInfo(const string &name, deque< DmmultipathInfo > &plist)=0
virtual bool mountDeviceOpts(const string &device, const string &mp, const string &opts)=0
Definition: StorageInterface.h:491
virtual int getContMdPartCoInfo(const string &name, ContainerInfo &cinfo, MdPartCoInfo &info)=0
Definition: StorageInterface.h:595
virtual void activateHld(bool val)=0
virtual int addNfsDevice(const string &nfsDev, const string &opts, unsigned long long sizeK, const string &mp, bool nfs4)=0
virtual int changeMountPoint(const string &device, const string &mount)=0
Definition: StorageInterface.h:481
virtual int shrinkMd(const string &name, const list< string > &devices, const list< string > &spares)=0
virtual int getMdStateInfo(const string &name, MdStateInfo &info)=0
Definition: StorageInterface.h:2826
Definition: StorageInterface.h:582
Definition: StorageInterface.h:546
virtual void setZeroNewPartitions(bool val)=0
virtual int resizeVolumeNoFs(const string &device, unsigned long long newSizeK)=0
virtual MountByType getDefaultMountBy() const =0
virtual int changeDescText(const string &device, const string &txt)=0
virtual CallbackProgressBar getCallbackProgressBar() const =0
virtual int changePartitionId(const string &partition, unsigned id)=0
virtual void getContainers(deque< ContainerInfo > &infos)=0
virtual int createPartitionMax(const string &disk, PartitionType type, string &SWIG_OUTPUT(device))=0
virtual int getUnusedPartitionSlots(const string &disk, list< PartitionSlotInfo > &slots)=0
Definition: StorageInterface.h:404
virtual int getContDmraidCoInfo(const string &name, ContainerInfo &cinfo, DmraidCoInfo &info)=0
virtual int createFileLoop(const string &lname, bool reuseExisting, unsigned long long sizeK, const string &mp, const string &pwd, string &SWIG_OUTPUT(device))=0
virtual int getUserdata(const string &device, map< string, string > &userdata)=0
Definition: StorageInterface.h:262
virtual int shrinkLvmVg(const string &name, const deque< string > &devs)=0
virtual int setIgnoreFstab(const string &device, bool val)=0
Definition: StorageInterface.h:332
virtual unsigned long kbToCylinder(const string &disk, unsigned long long sizeK)=0
Definition: StorageInterface.h:463
virtual bool umountDevice(const string &device)=0
virtual void setCallbackYesNoPopup(CallbackYesNoPopup pfnc)=0
virtual int changeLabelVolume(const string &device, const string &label)=0
virtual int getMdPartInfo(const string &device, deque< MdPartInfo > &plist)=0
virtual int createLvmLvPool(const string &vg, const string &name, unsigned long long sizeK, string &SWIG_OUTPUT(device))=0
virtual int removeMd(const string &name, bool destroySb)=0
virtual int changeLvChunkSize(const string &vg, const string &name, unsigned long long chunkSizeK)=0
Definition: StorageInterface.h:364
virtual int createPartition(const string &disk, PartitionType type, unsigned long startCyl, unsigned long sizeCyl, string &SWIG_OUTPUT(device))=0
Definition: StorageInterface.h:350
virtual int getLvmLvSnapshotStateInfo(const string &vg, const string &name, LvmLvSnapshotStateInfo &info)=0
virtual int changeMdParity(const string &name, MdParity ptype)=0
virtual bool getDetectMountedVolumes() const =0
Definition: StorageInterface.h:281
virtual int nextFreePartition(const string &disk, PartitionType type, unsigned &SWIG_OUTPUT(nr), string &SWIG_OUTPUT(device))=0
virtual void dumpCommitInfos() const =0
Definition: StorageInterface.h:643
virtual int forgetChangePartitionId(const string &partition)=0
virtual bool getDlabelCapabilities(const string &dlabel, DlabelCapabilities &dlabelcapabilities) const =0
virtual int addFstabOptions(const string &device, const string &options)=0
virtual int setUserdata(const string &device, const map< string, string > &userdata)=0
virtual int getContLvmVgInfo(const string &name, ContainerInfo &cinfo, LvmVgInfo &info)=0
virtual int getContDiskInfo(const string &disk, ContainerInfo &cinfo, DiskInfo &info)=0
virtual int resizePartitionNoFs(const string &device, unsigned long sizeCyl)=0
virtual int setCrypt(const string &device, bool val)=0
Abstract class defining the interface for libstorage.
Definition: StorageInterface.h:938
virtual bool getFreeInfo(const string &device, bool get_resize, ResizeInfo &resize_info, bool get_content, ContentInfo &content_info, bool use_cache)=0
Definition: StorageInterface.h:613
virtual int changeLvStripeSize(const string &vg, const string &name, unsigned long long stripeSizeK)=0
virtual int getDmraidCoInfo(const string &name, DmraidCoInfo &info)=0
virtual int getTmpfsInfo(deque< TmpfsInfo > &plist)=0
virtual int getVolume(const string &device, VolumeInfo &info)=0
virtual CallbackInfoPopup getCallbackInfoPopup() const =0
virtual int shrinkBtrfsVolume(const string &name, const deque< string > &devs)=0
virtual int createPartitionKb(const string &disk, PartitionType type, unsigned long long startK, unsigned long long sizeK, string &SWIG_OUTPUT(device))=0
virtual int getMountPoint(const string &device, string &SWIG_OUTPUT(mount))=0
virtual int initializeDisk(const string &disk, bool value)=0
virtual int getContVolInfo(const string &dev, ContVolInfo &info)=0
Definition: StorageInterface.h:255
Definition: StorageInterface.h:505
virtual void setRootPrefix(const string &root)=0
virtual int changeMdType(const string &name, MdType md_type)=0
virtual string getRootPrefix() const =0
virtual int createLvmLvThin(const string &vg, const string &name, const string &pool, unsigned long long sizeK, string &SWIG_OUTPUT(device))=0
virtual void setDefaultSubvolName(const string &val)=0
virtual int getContDmmultipathCoInfo(const string &name, ContainerInfo &cinfo, DmmultipathCoInfo &info)=0
virtual int extendBtrfsVolume(const string &name, const deque< string > &devs)=0
virtual int resizeVolume(const string &device, unsigned long long newSizeK)=0
Definition: StorageInterface.h:514
Definition: StorageInterface.h:358
virtual void dumpObjectList()=0
virtual CallbackPasswordPopup getCallbackPasswordPopup() const =0
virtual void setCallbackProgressBar(CallbackProgressBar pfnc)=0
virtual bool rescanCryptedObjects()=0
Definition: StorageInterface.h:418
virtual int getMdInfo(deque< MdInfo > &plist)=0
virtual list< int > getMdAllowedParity(MdType md_type, unsigned devnr)=0
virtual string getPartitionName(const string &disk, int partition_no)=0
virtual int extendLvmVg(const string &name, const deque< string > &devs)=0
virtual int removePartition(const string &partition)=0
Definition: StorageInterface.h:534
virtual int createSubvolume(const string &device, const string &name)=0
virtual bool getZeroNewPartitions() const =0
virtual int activateEncryption(const string &device, bool on)=0
Definition: StorageInterface.h:453
virtual int removeLvmLvByDevice(const string &device)=0
virtual void removeDmTableTo(const string &device)=0
virtual int getCrypt(const string &device, bool &SWIG_OUTPUT(val))=0
virtual void setCallbackInfoPopup(CallbackInfoPopup pfnc)=0
virtual int changeMdChunk(const string &name, unsigned long chunkSizeK)=0
virtual CallbackCommitErrorPopup getCallbackCommitErrorPopup() const =0
virtual int setCryptType(const string &device, bool val, EncryptType typ)=0
virtual FsType getDefaultFs() const =0
virtual int createLvmVg(const string &name, unsigned long long peSizeK, bool lvm1, const deque< string > &devs)=0
virtual string getPartitionPrefix(const string &disk)=0
virtual int getMdPartCoInfo(const string &name, MdPartCoInfo &info)=0
virtual bool equalBackupStates(const string &lhs, const string &rhs, bool verbose_log) const =0
Definition: StorageInterface.h:300
virtual int getDiskInfo(const string &disk, DiskInfo &info)=0
virtual string defaultDiskLabel(const string &device)=0
virtual int createLvmLv(const string &vg, const string &name, unsigned long long sizeK, unsigned stripes, string &SWIG_OUTPUT(device))=0
virtual int createPartitionAny(const string &disk, unsigned long long sizeK, string &SWIG_OUTPUT(device))=0
virtual void rescanEverything()=0
virtual const string & getExtendedErrorMessage() const =0
virtual string getErrorString(int error) const =0
virtual bool getRecursiveRemoval() const =0
virtual int changeMkfsOptVolume(const string &device, const string &opts)=0
virtual void setPartitionAlignment(PartAlign val)=0
Definition: StorageInterface.h:570
virtual unsigned long long cylinderToKb(const string &disk, unsigned long sizeCyl)=0
Definition: StorageInterface.h:561
virtual string getDefaultSubvolName() const =0
virtual int getLvmVgInfo(const string &name, LvmVgInfo &info)=0
virtual bool checkDmMapsTo(const string &device)=0
virtual int removeVolume(const string &device)=0
virtual void setDefaultMountBy(MountByType val)=0
virtual int destroyPartitionTable(const string &disk, const string &label)=0
virtual bool needCryptPassword(const string &device)=0
virtual int getMdPartCoStateInfo(const string &name, MdPartCoStateInfo &info)=0
virtual bool getEfiBoot()=0
virtual bool getFsCapabilities(FsType fstype, FsCapabilities &fscapabilities) const =0
virtual CallbackShowInstallInfo getCallbackShowInstallInfo() const =0
virtual int getDmraidInfo(const string &name, deque< DmraidInfo > &plist)=0
virtual void setDefaultFs(FsType val)=0
virtual int getPartitionInfo(const string &disk, deque< PartitionInfo > &plist)=0
virtual int computeMdSize(MdType md_type, const list< string > &devices, const list< string > &spares, unsigned long long &SWIG_OUTPUT(sizeK))=0
Definition: StorageInterface.h:434
virtual int removeSubvolume(const string &device, const string &name)=0
virtual int forgetCryptPassword(const string &device)=0
virtual MultipathAutostart getMultipathAutostart() const =0
virtual int updateMd(const string &name, const list< string > &devices, const list< string > &spares)=0
virtual int removeLvmLv(const string &vg, const string &name)=0
virtual int renameCryptDm(const string &device, const string &new_name)=0
virtual int getMountBy(const string &device, MountByType &SWIG_OUTPUT(mby))=0
virtual int modifyFileLoop(const string &device, const string &lname, bool reuseExisting, unsigned long long sizeK)=0
virtual int getBtrfsInfo(deque< BtrfsInfo > &plist)=0
virtual int removeFileLoop(const string &lname, bool removeFile)=0
virtual bool existSubvolume(const string &device, const string &name)=0
virtual int verifyCryptPassword(const string &device, const string &pwd, bool erase)=0
virtual int changeLvStripeCount(const string &vg, const string &name, unsigned long stripes)=0
Definition: StorageInterface.h:375
virtual int getDmmultipathCoInfo(const string &name, DmmultipathCoInfo &info)=0
virtual int changeTunefsOptVolume(const string &device, const string &opts)=0
virtual int getRecursiveUsing(const list< string > &devices, bool itself, list< string > &using_devices)=0
virtual bool isCacheChanges() const =0
virtual void setDetectMountedVolumes(bool val)=0
virtual int freeCylindersAroundPartition(const string &device, unsigned long &SWIG_OUTPUT(freeCylsBefore), unsigned long &SWIG_OUTPUT(freeCylsAfter))=0
virtual int checkNfsDevice(const string &nfsDev, const string &opts, bool nfs4, unsigned long long &SWIG_OUTPUT(sizeK))=0
virtual int removeDmraid(const string &name)=0
virtual int getFstabOptions(const string &device, string &SWIG_OUTPUT(options))=0
Definition: StorageInterface.h:236
virtual int removeTmpfsMount(const string &mp)=0
virtual int getIgnoreFstab(const string &device, bool &SWIG_OUTPUT(val))=0
virtual int restoreBackupState(const string &name)=0
Definition: StorageInterface.h:310
virtual void getCommitInfos(list< CommitInfo > &infos) const =0
Definition: StorageInterface.h:246
virtual int getCryptPassword(const string &device, string &SWIG_OUTPUT(pwd))=0
virtual bool mountDevice(const string &device, const string &mp)=0
virtual void setMultipathAutostart(MultipathAutostart multipath_autostart)=0
virtual void setCacheChanges(bool cache)=0
virtual bool mountDeviceRo(const string &device, const string &mp, const string &opts)=0
virtual void setCallbackPasswordPopup(CallbackPasswordPopup pfnc)=0
virtual int removeFstabOptions(const string &device, const string &options)=0
virtual int removeLvmLvSnapshot(const string &vg, const string &name)=0
virtual void setRecursiveRemoval(bool val)=0
virtual int createLvmLvSnapshot(const string &vg, const string &origin, const string &name, unsigned long long cowSizeK, string &SWIG_OUTPUT(device))=0
virtual CallbackYesNoPopup getCallbackYesNoPopup() const =0
virtual bool umountDeviceUns(const string &device, bool unsetup)=0
virtual list< string > getAllUsedFs() const =0
virtual int getRecursiveUsedBy(const list< string > &devices, bool itself, list< string > &usedby_devices)=0
virtual int changeFstabOptions(const string &device, const string &options)=0