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-api

[Xen-API] [PATCH] CA-34457 tab-completion for xe subject-role-add role-n

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] CA-34457 tab-completion for xe subject-role-add role-name=
From: Thomas Sanders <thomas.sanders@xxxxxxxxxx>
Date: Tue, 19 Oct 2010 19:18:26 +0100
Delivery-date: Tue, 19 Oct 2010 11:18:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Thomas Sanders <thomas.sanders@xxxxxxxxxx>
# Date 1287512032 -3600
# Node ID 1fa921ccffe9139a96582711b2067cf308f6023b
# Parent  44c74d83ce54ffbf0e856e1829bb90f655ffdf64
CA-34457 tab-completion for xe subject-role-add role-name=

The bash-completion file now has a section for role-name.

Signed-off-by: Thomas Sanders <thomas.sanders@xxxxxxxxxx>

diff --git a/ocaml/xe-cli/bash-completion b/ocaml/xe-cli/bash-completion
--- a/ocaml/xe-cli/bash-completion
+++ b/ocaml/xe-cli/bash-completion
@@ -210,6 +210,12 @@ _xe()
                                 COMPREPLY=( $(compgen -W 
"monday,tuesday,wednesday,thursday,friday,saturday,sunday " -- ${LAST_VALUE}) )
                                 return 0
                                 ;;
+                       role-name)
+                               IFS=$'\n,'
+                               LAST_VALUE=`echo ${value}|gawk 'BEGIN{FS=" 
"}{print $NF}'`
+                               COMPREPLY=( $(compgen -W 
"vm-power-admin,vm-admin,vm-operator,read-only,pool-operator,pool-admin" -- 
${LAST_VALUE}) )
+                               return 0
+                               ;;
             edition) # for host-apply-edition (licensing)
                 IFS=$'\n,'
                 COMPREPLY=( $(compgen -W "free ,enterprise ,platinum 
,enterprise-xd " -- ${value}) )

Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-34457 tab-completion for xe subject-role-add role-name=, Thomas Sanders <=