(cls, arg: _LvmVolumeSerialization)
| 1205 | |
| 1206 | @classmethod |
| 1207 | def parse_arg(cls, arg: _LvmVolumeSerialization) -> Self: |
| 1208 | volume = cls( |
| 1209 | status=ModificationStatus(arg['status']), |
| 1210 | name=arg['name'], |
| 1211 | fs_type=FilesystemType(arg['fs_type']), |
| 1212 | length=Size.parse_args(arg['length']), |
| 1213 | mountpoint=Path(arg['mountpoint']) if arg['mountpoint'] else None, |
| 1214 | mount_options=arg.get('mount_options', []), |
| 1215 | btrfs_subvols=SubvolumeModification.parse_args(arg.get('btrfs', [])), |
| 1216 | ) |
| 1217 | |
| 1218 | volume._obj_id = arg['obj_id'] |
| 1219 | |
| 1220 | return volume |
| 1221 | |
| 1222 | def json(self) -> _LvmVolumeSerialization: |
| 1223 | return { |
no test coverage detected