[virt-tools-list] [virt-manager] [PATCH 2/9] gschema: Store source URIs for container bootstrap

Radostin Stoyanov rstoyanov1 at gmail.com
Thu Jun 22 14:53:59 UTC 2017


---
 data/org.virt-manager.virt-manager.gschema.xml | 6 ++++++
 virtManager/config.py                          | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/data/org.virt-manager.virt-manager.gschema.xml b/data/org.virt-manager.virt-manager.gschema.xml
index 411c812..d88450f 100644
--- a/data/org.virt-manager.virt-manager.gschema.xml
+++ b/data/org.virt-manager.virt-manager.gschema.xml
@@ -153,6 +153,12 @@
   <schema id="org.virt-manager.virt-manager.urls"
       path="/org/virt-manager/virt-manager/urls/">
 
+    <key name="containers" type="as">
+      <default>[]</default>
+      <summary>Saved list of source URLs</summary>
+      <description>Saved list of source URLs used to bootstrap OS containers</description>
+    </key>
+
     <key name="urls" type="as">
       <default>[]</default>
       <summary>Saved list of install URLs</summary>
diff --git a/virtManager/config.py b/virtManager/config.py
index 5b04013..6fd6530 100644
--- a/virtManager/config.py
+++ b/virtManager/config.py
@@ -549,11 +549,15 @@ class vmmConfig(object):
                 del urls[len(urls) - 1]
             self.conf.set(gsettings_path, urls)
 
+    def add_container_url(self, url):
+        self._url_add_helper("/urls/containers", url)
     def add_media_url(self, url):
         self._url_add_helper("/urls/urls", url)
     def add_iso_path(self, path):
         self._url_add_helper("/urls/isos", path)
 
+    def get_container_urls(self):
+        return self.conf.get("/urls/containers")
     def get_media_urls(self):
         return self.conf.get("/urls/urls")
     def get_iso_paths(self):
-- 
2.9.4




More information about the virt-tools-list mailing list