All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix xm labels
@ 2007-11-05 12:03 Syunsuke HAYASHI
  0 siblings, 0 replies; only message in thread
From: Syunsuke HAYASHI @ 2007-11-05 12:03 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

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,

Signed-off-by: Syunsuke HAYASHI <syunsuke@jp.fujitsu.com>



[-- Attachment #2: xm_labels.patch --]
[-- Type: text/plain, Size: 713 bytes --]

diff -r b28ae5f00553 tools/python/xen/xm/labels.py
--- a/tools/python/xen/xm/labels.py	Tue Oct 23 09:26:43 2007 +0100
+++ b/tools/python/xen/xm/labels.py	Fri Oct 26 11:11:36 2007 +0900
@@ -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:

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-05 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05 12:03 [PATCH] Fix xm labels Syunsuke HAYASHI

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.