mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +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>
|
||||||
<disk type="network" device="disk">
|
<disk type="network" device="disk">
|
||||||
<driver name="qemu"/>
|
<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"/>
|
<host name="1:2:3:4:1:2:3:4" port="5522"/>
|
||||||
</source>
|
</source>
|
||||||
<target dev="vdl" bus="virtio"/>
|
<target dev="vdl" bus="virtio"/>
|
||||||
|
@ -66,6 +66,7 @@ class _DiskSource(XMLBuilder):
|
|||||||
|
|
||||||
name = XMLProperty("./@name")
|
name = XMLProperty("./@name")
|
||||||
protocol = XMLProperty("./@protocol")
|
protocol = XMLProperty("./@protocol")
|
||||||
|
query = XMLProperty("./@query")
|
||||||
|
|
||||||
type = XMLProperty("./@type")
|
type = XMLProperty("./@type")
|
||||||
managed = XMLProperty("./@managed", is_yesno=True)
|
managed = XMLProperty("./@managed", is_yesno=True)
|
||||||
@ -98,6 +99,8 @@ class _DiskSource(XMLBuilder):
|
|||||||
self.name = uriobj.path
|
self.name = uriobj.path
|
||||||
if self.name.startswith("/"):
|
if self.name.startswith("/"):
|
||||||
self.name = self.name[1:]
|
self.name = self.name[1:]
|
||||||
|
if uriobj.query:
|
||||||
|
self.query = uriobj.query
|
||||||
|
|
||||||
def build_url_from_network(self):
|
def build_url_from_network(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user