From: Stefan Berger Subject: [PATCH] [XM] Tools support for extensions of the Xen-API for managing security policies Date: Tue, 10 Jul 2007 17:47:42 -0400 Message-ID: <1184104062.21726.16.camel@gsal-3.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-QZRQ9tCwi89kJ+3riy+W" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Keir Fraser , sailer@us.ibm.com List-Id: xen-devel@lists.xenproject.org --=-QZRQ9tCwi89kJ+3riy+W Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch adds a couple of new commands for using the Xen-API extensions for security policies. Older tools are converted to support going through the Xen-API for their operations rather than doing the operations directly in their own code. Signed-off-by: Stefan Berger --=-QZRQ9tCwi89kJ+3riy+W Content-Disposition: attachment; filename=xend-xspolicy-xapi-xm.diff Content-Type: text/x-patch; name=xend-xspolicy-xapi-xm.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit --- xen-unstable.hg/tools/python/xen/xm/activatepolicy.py | 86 ++++++++++++ xen-unstable.hg/tools/python/xen/xm/addlabel.py | 125 +++++++++++++----- xen-unstable.hg/tools/python/xen/xm/cfgbootpolicy.py | 72 ++++++++-- xen-unstable.hg/tools/python/xen/xm/create.dtd | 7 - xen-unstable.hg/tools/python/xen/xm/create.py | 22 --- xen-unstable.hg/tools/python/xen/xm/getlabel.py | 45 +++++- xen-unstable.hg/tools/python/xen/xm/getpolicy.py | 94 +++++++++++++ xen-unstable.hg/tools/python/xen/xm/labels.py | 37 +++++ xen-unstable.hg/tools/python/xen/xm/loadpolicy.py | 32 ++++ xen-unstable.hg/tools/python/xen/xm/main.py | 70 ++++++---- xen-unstable.hg/tools/python/xen/xm/makepolicy.py | 14 +- xen-unstable.hg/tools/python/xen/xm/resources.py | 33 +++- xen-unstable.hg/tools/python/xen/xm/rmlabel.py | 65 +++++++-- xen-unstable.hg/tools/python/xen/xm/setpolicy.py | 117 ++++++++++++++++ xen-unstable.hg/tools/python/xen/xm/xenapi_create.py | 55 +++++++ 15 files changed, 746 insertions(+), 128 deletions(-) Index: root/xen-unstable.hg/tools/python/xen/xm/addlabel.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xm/addlabel.py +++ root/xen-unstable.hg/tools/python/xen/xm/addlabel.py @@ -25,17 +25,29 @@ import sys from xen.util import dictio from xen.util import security from xen.xm.opts import OptionError +from xen.util import xsconstants +from xen.xm import main as xm_main +from xen.xm.main import server def help(): return """ Format: xm addlabel