mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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@xensource.com>
This commit is contained in:
1 parent
5f189b1050
commit
3a62270915
2 files changed
+12
-6
No files matched your search
@@ -69,8 +69,10 @@ class BlkifController(DevController):
|
||||
'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:
|
||||
|
||||
@@ -80,11 +80,15 @@ class NetifController(DevController):
|
||||
'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
|
||||