WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] [XM] Fix the display of the __NULL_LABEL__

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] [XM] Fix the display of the __NULL_LABEL__
From: Syunsuke HAYASHI <syunsuke@xxxxxxxxxxxxxx>
Date: Wed, 14 Nov 2007 14:25:01 +0900
Delivery-date: Tue, 13 Nov 2007 21:25:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.5 (Windows/20070716)
Hi,

I think the security.py was changed to acm.py.
http://xenbits.xensource.com/staging/xen-unstable.hg?rev=security.py

This patch fixes the problem.

The result is shown as follows.
--------When xen-api is not effective-------
# xm labels type=any
dom_BoincClient              <---- __NULL_LABEL__ is removed.
dom_Fun
dom_HomeBanking
dom_NetworkDomain
dom_StorageDomain
dom_SystemManagement
res_EthernetCard
res_GraphicsAdapter
res_HardDrive(hda)
res_ImageFile1
res_ImageFile2
res_LogicalDiskPartition1(hda1)
res_LogicalDiskPartition2(hda2)
res_ManagementResource
--------------------------------------------

Thanks

Syunsuke HAYASHI

> >No longer display the __NULL_LABEL__ on the list of labels.
> >
> >Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
> >
> >
> >
> >Index: root/xen-unstable.hg/tools/python/xen/util/security.py
> >===================================================================
> >--- root.orig/xen-unstable.hg/tools/python/xen/util/security.py
> >+++ root/xen-unstable.hg/tools/python/xen/util/security.py
> >@@ -608,6 +608,11 @@ def list_labels(policy_name, condition):
> >             label = line.split()[3]
> >             if label not in labels:
> >                 labels.append(label)
> >+
> >+    f.close()
> >+    if '__NULL_LABEL__' in labels:
> >+        labels.remove('__NULL_LABEL__')
> >+
> >     return labels
> >
> >
> >
> >
> >
> >
> >_______________________________________________
> >Xen-devel mailing list
> >Xen-devel@xxxxxxxxxxxxxxxxxxx
> >http://lists.xensource.com/xen-devel
> >
> >



diff -r 0c2535407828 tools/python/xen/util/xsm/acm/acm.py
--- a/tools/python/xen/util/xsm/acm/acm.py      Mon Oct 08 09:40:49 2007
+0100
+++ b/tools/python/xen/util/xsm/acm/acm.py      Wed Nov 14 11:40:11 2007
+0900
@@ -600,4 +600,8 @@ def list_labels(policy_name, condition):
             label = line.split()[3]
             if label not in labels:
                 labels.append(label)
+    f.close()
+    if '__NULL_LABEL__' in labels:
+        labels.remove('__NULL_LABEL__')
+
     return labels



diff -r 0c2535407828 tools/python/xen/util/xsm/acm/acm.py
--- a/tools/python/xen/util/xsm/acm/acm.py      Mon Oct 08 09:40:49 2007 +0100
+++ b/tools/python/xen/util/xsm/acm/acm.py      Wed Nov 14 11:40:11 2007 +0900
@@ -600,4 +600,8 @@ def list_labels(policy_name, condition):
             label = line.split()[3]
             if label not in labels:
                 labels.append(label)
+    f.close()
+    if '__NULL_LABEL__' in labels:
+        labels.remove('__NULL_LABEL__')
+
     return labels


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>