cli: Add --filesystem fmode, dmode

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2021-01-24 18:45:07 -05:00
parent 5a152712d9
commit d3517ded62
5 changed files with 11 additions and 5 deletions

View File

@ -303,7 +303,7 @@
<target dir="/"/>
<source file="foo.img"/>
</filesystem>
<filesystem type="volume" model="virtio" multidevs="remap" accessmode="mapped">
<filesystem type="volume" accessmode="mapped" model="virtio" multidevs="remap">
<readonly/>
<space_hard_limit>1234</space_hard_limit>
<space_soft_limit>500</space_soft_limit>

View File

@ -175,7 +175,7 @@
<emulator>/new/emu</emulator>
<controller type="usb" model="qemu-xhci" ports="15"/>
<controller type="scsi" model="virtio-scsi"/>
<filesystem type="mount" accessmode="mapped">
<filesystem type="mount" accessmode="mapped" fmode="0123" dmode="0345">
<source dir="/foo/source"/>
<target dir="/bar/target"/>
</filesystem>
@ -419,7 +419,7 @@
<emulator>/new/emu</emulator>
<controller type="usb" model="qemu-xhci" ports="15"/>
<controller type="scsi" model="virtio-scsi"/>
<filesystem type="mount" accessmode="mapped">
<filesystem type="mount" accessmode="mapped" fmode="0123" dmode="0345">
<source dir="/foo/source"/>
<target dir="/bar/target"/>
</filesystem>

View File

@ -542,7 +542,7 @@ memnode0.cellid=1,memnode0.mode=strict,memnode0.nodeset=2
--controller usb3
--controller scsi,model=virtio-scsi
--graphics vnc
--filesystem /foo/source,/bar/target
--filesystem /foo/source,/bar/target,fmode=0123,dmode=0345
--memballoon virtio,autodeflate=on,stats.period=10
--watchdog ib700,action=pause
--tpm passthrough,model=tpm-crb,path=/dev/tpm0,backend.encryption.secret=11111111-2222-3333-4444-5555555555

View File

@ -4218,6 +4218,8 @@ class ParserFilesystem(VirtCLIParser):
cls.add_arg("readonly", "readonly", is_onoff=True)
cls.add_arg("space_hard_limit", "space_hard_limit")
cls.add_arg("space_soft_limit", "space_soft_limit")
cls.add_arg("fmode", "fmode")
cls.add_arg("dmode", "dmode")
cls.add_arg("source", "source")
cls.add_arg("target", "target")

View File

@ -12,6 +12,7 @@ from ..xmlbuilder import XMLProperty
class DeviceFilesystem(Device):
XML_NAME = "filesystem"
_XML_PROP_ORDER = ["_type_prop", "accessmode", "fmode", "dmode"]
TYPE_MOUNT = "mount"
TYPE_TEMPLATE = "template"
@ -28,8 +29,11 @@ class DeviceFilesystem(Device):
_type_prop = XMLProperty("./@type")
accessmode = XMLProperty("./@accessmode")
model = XMLProperty("./@model")
readonly = XMLProperty("./readonly", is_bool=True)
multidevs = XMLProperty("./@multidevs")
fmode = XMLProperty("./@fmode")
dmode = XMLProperty("./@dmode")
readonly = XMLProperty("./readonly", is_bool=True)
space_hard_limit = XMLProperty("./space_hard_limit")
space_soft_limit = XMLProperty("./space_soft_limit")