# 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
|