Skip to contentSkip to conversation

Fix xm labels

PATCH New Syunsuke HAYASHI 1 participant 1 message Nov 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix xm labels

Hi,

This patch fixes "xm labels type=any" command error.

When the command "xm labels type=any" was input, the label of the resource was not displayed before.
So,I fixed it.

Thanks,

tools/python/xen/xm/labels.py +2 -5
diff -r b28ae5f00553 tools/python/xen/xm/labels.py
@@ -98,11 +98,8 @@ def labels_xapi(policy, ptype):
             names1 = acmpol.policy_get_virtualmachinelabel_names()
         if ptype == 'res' or ptype == 'any':
             names2 = acmpol.policy_get_resourcelabel_names()
-        if len(names1) > 0:
-            names = set(names1)
-            names.union(names2)
-        else:
-            names = set(names2)
+        names = list(set(names1).union(names2))
+        names.sort()
         for n in names:
             print n
     elif int(policystate['type']) == 0:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel