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 10:46:11 +0000
Delivery-date: Tue, 04 Oct 2005 10:43:52 +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 d79ab87e27b8f88621234f7fb5bfeb24a8d33a89
# Parent  fc97109eb28ea8e0705d247ad7cfd99847dfeab6
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 fc97109eb28e -r d79ab87e27b8 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Mon Oct  3 15:39:19 2005
+++ b/tools/python/xen/xend/server/blkif.py     Mon Oct  3 15:40:27 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 fc97109eb28e -r d79ab87e27b8 tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Mon Oct  3 15:39:19 2005
+++ b/tools/python/xen/xend/server/netif.py     Mon Oct  3 15:40:27 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>