mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
Add support for URL query with disks
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
9ac94ef739
commit
a62e3df72f
@ -346,7 +346,7 @@
|
||||
</disk>
|
||||
<disk type="network" device="disk">
|
||||
<driver name="qemu"/>
|
||||
<source protocol="http" name="my/path">
|
||||
<source protocol="http" name="my/path" query="query=foo">
|
||||
<host name="1:2:3:4:1:2:3:4" port="5522"/>
|
||||
</source>
|
||||
<target dev="vdl" bus="virtio"/>
|
||||
|
@ -66,6 +66,7 @@ class _DiskSource(XMLBuilder):
|
||||
|
||||
name = XMLProperty("./@name")
|
||||
protocol = XMLProperty("./@protocol")
|
||||
query = XMLProperty("./@query")
|
||||
|
||||
type = XMLProperty("./@type")
|
||||
managed = XMLProperty("./@managed", is_yesno=True)
|
||||
@ -98,6 +99,8 @@ class _DiskSource(XMLBuilder):
|
||||
self.name = uriobj.path
|
||||
if self.name.startswith("/"):
|
||||
self.name = self.name[1:]
|
||||
if uriobj.query:
|
||||
self.query = uriobj.query
|
||||
|
||||
def build_url_from_network(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user