Skip to content
Snippets Groups Projects
Commit ba964f31 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

onevm: update help; show help without requirements

parent 19921ad1
No related branches found
No related tags found
1 merge request!1376468 docs and harmonize
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
# STAT:done:Done:The VM is done. VMs in this state won’t be shown with onevm list but are kept in the database for accounting purposes. You can still get their information with the onevm show command. # STAT:done:Done:The VM is done. VMs in this state won’t be shown with onevm list but are kept in the database for accounting purposes. You can still get their information with the onevm show command.
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# 2023-06-12 v1.0 <axel.hahn@unibe.ch> initial version # 2023-06-12 v1.0 <axel.hahn@unibe.ch> initial version
# 2023-06-15 v1.0 <axel.hahn@unibe.ch> fix output if no vm is running # 2023-06-15 v1.1 <axel.hahn@unibe.ch> fix output if no vm is running
# 2023-08-23 v1.2 <axel.hahn@unibe.ch> update help; show help without requirements
# ====================================================================== # ======================================================================
. $(dirname $0)/inc_pluginfunctions . $(dirname $0)/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.2
self_APPVERSION=1.1
# new line # new line
NL=" NL="
...@@ -53,21 +53,14 @@ showData=0 ...@@ -53,21 +53,14 @@ showData=0
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
function showHelp(){ function showHelp(){
local _self; _self=$(basename $0)
cat <<EOF cat <<EOF
______________________________________________________________________ $( ph.showImlHelpHeader )
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Show count of vms in OpenNebula - listed by state and by host. Show count of vms in OpenNebula - listed by state and by host.
It will go to warning if a non running state was found. It will go to warning if a non running state was found.
It will go to critical if a vm is on failure. It will go to critical if a vm is on failure.
SYNTAX: SYNTAX:
$(basename $0) $(basename $0)
...@@ -88,9 +81,6 @@ function _add(){ ...@@ -88,9 +81,6 @@ function _add(){
# MAIN # MAIN
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# --- check required tools
ph.require onehost
# --- check param -h # --- check param -h
case "$1" in case "$1" in
"--help"|"-h") "--help"|"-h")
...@@ -100,6 +90,9 @@ case "$1" in ...@@ -100,6 +90,9 @@ case "$1" in
*) *)
esac esac
# --- check required tools
ph.require onehost
# --- get data # --- get data
cmdout=$( sudo onevm list --csv 2>&1 ) cmdout=$( sudo onevm list --csv 2>&1 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment