Called for displaying data in table format
(self)
| 1054 | } |
| 1055 | |
| 1056 | def table_data(self) -> dict[str, str]: |
| 1057 | """ |
| 1058 | Called for displaying data in table format |
| 1059 | """ |
| 1060 | part_mod = { |
| 1061 | 'Status': self.status.value, |
| 1062 | 'Device': str(self.dev_path) if self.dev_path else '', |
| 1063 | 'Type': self.type.value, |
| 1064 | 'Start': self.start.format_size(Unit.sectors, self.start.sector_size, include_unit=False), |
| 1065 | 'End': self.end.format_size(Unit.sectors, self.start.sector_size, include_unit=False), |
| 1066 | 'Size': self.length.format_highest(), |
| 1067 | 'FS type': self.fs_type.value if self.fs_type else 'Unknown', |
| 1068 | 'Mountpoint': str(self.mountpoint) if self.mountpoint else '', |
| 1069 | 'Mount options': ', '.join(self.mount_options), |
| 1070 | 'Flags': ', '.join(f.description for f in self.flags), |
| 1071 | } |
| 1072 | |
| 1073 | if self.btrfs_subvols: |
| 1074 | part_mod['Btrfs vol.'] = f'{len(self.btrfs_subvols)} subvolumes' |
| 1075 | |
| 1076 | return part_mod |
| 1077 | |
| 1078 | |
| 1079 | class LvmLayoutType(Enum): |
no test coverage detected