format/v2: add new "partition" field to "describe_mount"

This commit is contained in:
Michael Vogt 2023-12-21 12:42:46 +01:00 committed by Dusty Mabe
parent ce8408a9c6
commit 827b238764
2 changed files with 16 additions and 1 deletions

View file

@ -84,9 +84,10 @@ def describe(manifest: Manifest, *, with_id=False) -> Dict:
if mnt.device: if mnt.device:
desc["source"] = mnt.device.name desc["source"] = mnt.device.name
if mnt.options: if mnt.options:
desc["options"] = mnt.options desc["options"] = mnt.options
if mnt.partition:
desc["partition"] = mnt.partition
return desc return desc
def describe_mounts(mounts: Dict): def describe_mounts(mounts: Dict):

View file

@ -80,6 +80,13 @@ BASIC_PIPELINE = {
"filename": "empty.img" "filename": "empty.img"
} }
}, },
"var": {
"type": "org.osbuild.loopback",
"options": {
"filename": "empty.img",
"partscan": True,
},
},
}, },
"mounts": [ "mounts": [
{ {
@ -93,6 +100,13 @@ BASIC_PIPELINE = {
"type": "org.osbuild.noop", "type": "org.osbuild.noop",
"source": "boot", "source": "boot",
"target": "/boot", "target": "/boot",
},
{
"name": "var",
"type": "org.osbuild.noop",
"source": "var",
"target": "/var",
"partition": 1,
} }
] ]
} }