WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Cope with missing configuration information inside the c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Cope with missing configuration information inside the configuration method.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Oct 2005 01:32:12 +0000
Delivery-date: Tue, 04 Oct 2005 01:30:02 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@ewan
# Node ID 625c75a223fe0c7f63a048a89bb914096b88f74d
# Parent  7f42935cb4b0befbd89f4e4d14c4f169f7880e26
Cope with missing configuration information inside the configuration method.
This allows us to better recover if the store has been deleted.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 7f42935cb4b0 -r 625c75a223fe tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Tue Oct  4 01:25:04 2005
+++ b/tools/python/xen/xend/server/blkif.py     Tue Oct  4 01:28:41 2005
@@ -69,8 +69,10 @@
                                                   'dev', 'type', 'params',
                                                   'read-only')
 
-        result.append(['dev', dev])
-        result.append(['uname', typ + ":" + params])
+        if dev:
+            result.append(['dev', dev])
+        if typ and params:
+            result.append(['uname', typ + ":" + params])
         if ro:
             result.append(['mode', 'r'])
         else:
diff -r 7f42935cb4b0 -r 625c75a223fe tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Tue Oct  4 01:25:04 2005
+++ b/tools/python/xen/xend/server/netif.py     Tue Oct  4 01:28:41 2005
@@ -80,11 +80,15 @@
                                                      'script', 'ip', 'bridge',
                                                      'mac')
 
-        result.append(['script',
-                       script.replace(xroot.network_script_dir + os.sep, "")])
+        if script:
+            result.append(['script',
+                           script.replace(xroot.network_script_dir + os.sep,
+                                          "")])
         if ip:
             result.append(['ip', ip.split(" ")])
-        result.append(['bridge', bridge])
-        result.append(['mac', mac])
+        if bridge:
+            result.append(['bridge', bridge])
+        if mac:
+            result.append(['mac', mac])
 
         return result

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>