xm: Relax the sanity check on guest configuration with XSM-ACM addlabel

The attached patch relaxes the sanity check on guest configuration
when assigning a acm label to the guest. This patch makes a guest
configuration accept a bootloader parameter. This is common for
paravirtualized guests to boot them by using pygrub.

Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
This commit is contained in:
Keir Fraser committed 2008-11-28 13:04:30 +00:00
1 parent 1f80f21b47
commit 2fdd853ff5
1 file changed
+3 -2
+3 -2
View File
@@ -64,12 +64,13 @@ def validate_config_file(configfile):
return 0
# sanity check on the data from the file
# requiring 'memory,' 'name,' and ether 'kernel' or 'bootloader'
count = 0
required = ['kernel', 'memory', 'name']
required = ['kernel', 'bootloader', 'memory', 'name']
for (k, v) in locs.items():
if k in required:
count += 1
if count != 3:
if count < len(required) - 1:
print "Invalid configuration file."
return 0
else:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.