All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [XM] Fix the display of the __NULL_LABEL__
@ 2007-11-13 14:59 Stefan Berger
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Berger @ 2007-11-13 14:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

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

No longer display the __NULL_LABEL__ on the list of labels.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>


[-- Attachment #2: xm_list_labels_remove_null_label.diff --]
[-- Type: text/x-patch, Size: 546 bytes --]

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
 
 

[-- 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] 3+ messages in thread

* Re: [PATCH] [XM] Fix the display of the __NULL_LABEL__
@ 2007-11-14  5:25 Syunsuke HAYASHI
  2007-11-14 12:11 ` Stefan Berger
  0 siblings, 1 reply; 3+ messages in thread
From: Syunsuke HAYASHI @ 2007-11-14  5:25 UTC (permalink / raw)
  To: xen-devel

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

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@us.ibm.com>
> >
> >
> >
> >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@lists.xensource.com
> >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




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

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



[-- 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] 3+ messages in thread

* Re: [PATCH] [XM] Fix the display of the __NULL_LABEL__
  2007-11-14  5:25 [PATCH] [XM] Fix the display of the __NULL_LABEL__ Syunsuke HAYASHI
@ 2007-11-14 12:11 ` Stefan Berger
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Berger @ 2007-11-14 12:11 UTC (permalink / raw)
  To: Syunsuke HAYASHI; +Cc: xen-devel, xen-devel-bounces


[-- Attachment #1.1: Type: text/plain, Size: 3105 bytes --]

xen-devel-bounces@lists.xensource.com wrote on 11/14/2007 12:25:01 AM:

> Hi,
> 
> I think the security.py was changed to acm.py.

Right. I worked against a much older version. Another patch that I'll post 
later this week or next will fix it for real, though.

   Stefan


> 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@us.ibm.com>
> > >
> > >
> > >
> > >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@lists.xensource.com
> > >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@lists.xensource.com
> http://lists.xensource.com/xen-devel

[-- Attachment #1.2: Type: text/html, Size: 4751 bytes --]

[-- Attachment #2: 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] 3+ messages in thread

end of thread, other threads:[~2007-11-14 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14  5:25 [PATCH] [XM] Fix the display of the __NULL_LABEL__ Syunsuke HAYASHI
2007-11-14 12:11 ` Stefan Berger
  -- strict thread matches above, loose matches on Subject: below --
2007-11-13 14:59 Stefan Berger

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.