[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH]add bash completion to VCPUs-params param-key
Add bash completion to VCPUs-params param-key Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> diff -r ad754527bddd ocaml/xe-cli/bash-completion --- a/ocaml/xe-cli/bash-completion Fri Apr 16 11:44:32 2010 +0100 +++ b/ocaml/xe-cli/bash-completion Tue Apr 20 07:56:32 2010 -0400 @@ -204,9 +204,12 @@ _xe() vmselectors=`${xe} help ${COMP_WORDS[1]} 2>/dev/null | grep "optional params" | grep "<vm-selectors>"` hostselectors=`${xe} help ${COMP_WORDS[1]} 2>/dev/null | grep "optional params" | grep "<host-selectors>"` isdeviceconfig=`echo "${param}" | grep "device-config:"` + isvcpusparams=`echo "${param}" | grep "VCPUs-params:"` if [ "${isdeviceconfig}" ]; then IFS=" " type=$(for i in ${COMP_WORDS[@]:2}; do echo $i | grep "^type="; done | sed -e 's/^type=//' | tr [A-Z] [a-z]) extraargs=,$(IFS=";"; for i in `xe sm-list type=${type} params=configuration --minimal 2>/dev/null`; do echo device-config:$i | cut -d ':' -f 1-2; done | sed -e 's/ //g' -e 's/$/=/') + elif [ "${isvcpusparams}" ]; then + extraargs=,$(for i in weight cap mask; do echo "VCPUs-params:$i="; done) elif [ "${vmselectors}" ]; then if [ "${param}" ] ; then extraargs=",vm=,"$(params "vm-list" | sed 's/params=//g') -- Regards Yang Hongyang diff -r ad754527bddd ocaml/xe-cli/bash-completion --- a/ocaml/xe-cli/bash-completion Fri Apr 16 11:44:32 2010 +0100 +++ b/ocaml/xe-cli/bash-completion Tue Apr 20 07:56:32 2010 -0400 @@ -204,9 +204,12 @@ _xe() vmselectors=`${xe} help ${COMP_WORDS[1]} 2>/dev/null | grep "optional params" | grep "<vm-selectors>"` hostselectors=`${xe} help ${COMP_WORDS[1]} 2>/dev/null | grep "optional params" | grep "<host-selectors>"` isdeviceconfig=`echo "${param}" | grep "device-config:"` + isvcpusparams=`echo "${param}" | grep "VCPUs-params:"` if [ "${isdeviceconfig}" ]; then IFS=" " type=$(for i in ${COMP_WORDS[@]:2}; do echo $i | grep "^type="; done | sed -e 's/^type=//' | tr [A-Z] [a-z]) extraargs=,$(IFS=";"; for i in `xe sm-list type=${type} params=configuration --minimal 2>/dev/null`; do echo device-config:$i | cut -d ':' -f 1-2; done | sed -e 's/ //g' -e 's/$/=/') + elif [ "${isvcpusparams}" ]; then + extraargs=,$(for i in weight cap mask; do echo "VCPUs-params:$i="; done) elif [ "${vmselectors}" ]; then if [ "${param}" ] ; then extraargs=",vm=,"$(params "vm-list" | sed 's/params=//g') _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |