From: Ian Jackson Subject: [OSSTEST PATCH 2/2] mg-hosts: Usage documentation. Date: Wed, 25 Jun 2014 15:06:27 +0100 Message-ID: <1403705187-9283-2-git-send-email-ian.jackson@eu.citrix.com> References: <1403705187-9283-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wznqv-00063c-RO for xen-devel@lists.xenproject.org; Wed, 25 Jun 2014 14:07:10 +0000 In-Reply-To: <1403705187-9283-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Jackson --- mg-hosts | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/mg-hosts b/mg-hosts index c116688..0e889f5 100755 --- a/mg-hosts +++ b/mg-hosts @@ -17,6 +17,71 @@ # along with this program. If not, see . +# Usages: +# +# ./mg-hosts mkpxedir HOST... +# Create directories for pxeboot as expected by the rest +# of osstest. Will use "sudo". +# +# ./mg-hosts create-like SOURCE-HOST NEW-HOST[,NEW-HOST...] +# Create new host(s). This does NOT copy the +# flags and properties (!) +# +# ./mg-hosts manual-task-create USER@NODENAME +# ./mg-hosts manual-task-create REFKEY +# Creates a static manual (ie, permanent) task with +# the specified REFKEY. The usual format of REFKEY +# is USER@NODENAME. +# +# ./mg-hosts previoustasks [--clear] +# Lists all ownd (ie, transient) tasks which are from +# previous instances of ms-ownerdaemon (normally, this +# means tasks from previous boots of the osstest +# controller). Also lists those tasks' resources. +# +# With --clear, marks the tasks as dead, which will +# allow their resources to be reclaimed. NB that this +# is dangerous if there might still be tasks running +# which started before the current ms-ownerdaemon: the +# old tasks might still mess about with the resources, +# interfering with whatever new tasks allocate them. +# +# ./mg-hosts showprops [HOST...] +# Prints the resource properties of all or specified hosts. +# +# ./mg-hosts setprops HOSTGLOB... [- PROP [OLD] NEW ...] -|-- PROP [OLD] NEW +# Updates resource properties of the specified hosts. +# If OLD is specified, the property will be set to NEW +# iff its value is currently OLD. (The use of -- rather +# than - as the delimiter allows the last OLD or NEW +# to start with - without ambiguity in the command line.) +# +# HOSTGLOB is a host name, or a glob pattern which may contain *. +# (? and [] are not supported in HOSTGLOB.) +# +# ./mg-hosts showflags +# Print a table showing the flags of all hosts. +# +# ./mg-hosts setflags HOSTGLOB... -|-- !FLAG|-FLAG|FLAG... +# Updates some flags of the specified hosts. !FLAG and +# -FLAG both clear the flag; FLAG sets it. +# +# ./mg-hosts setflagexpr HOSTGLOB... - FLAG EXPR [-|-- FLAG EXPR...] +# Sets or clears some flags of the specified hosts, +# according to a boolean expression involving other +# flags. Each EXPR is evaluated for each host and +# the flag set or cleared accordingly. +# +# In EXPR, the following constructs are allowed (in +# decreasing order of precedence): +# (EXPR) override precedence +# !EXPR boolean negation } alternative +# ~EXPR boolean negation } equivalent syntax +# EXPR|EXPR boolean disjunction +# EXPR&EXPR boolean disjunction +# FLAG true iff FLAG is set for the host +# Spaces and tabs are disregarded (outside FLAG names). + use strict qw(vars refs); use DBI; use Osstest; -- 1.7.10.4