mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Rename 'system' action to 'system:info'
This commit is contained in:
parent
7b39a06913
commit
f2da35e813
11
psu
11
psu
@ -60,7 +60,7 @@ main() {
|
|||||||
"list;Lists of the stacks already deployed;url|user|password;endpoint|quiet|insecure|verbose|debug|masked-variables|help"
|
"list;Lists of the stacks already deployed;url|user|password;endpoint|quiet|insecure|verbose|debug|masked-variables|help"
|
||||||
"info;Stack information;url|user|password|name;endpoint|quiet|insecure|verbose|debug|masked-variables"
|
"info;Stack information;url|user|password|name;endpoint|quiet|insecure|verbose|debug|masked-variables"
|
||||||
"status;Check if the stack is running/deployed correctly;url|user|password|name;endpoint|service|detect-job|timeout|insecure|verbose|debug|masked-variables"
|
"status;Check if the stack is running/deployed correctly;url|user|password|name;endpoint|service|detect-job|timeout|insecure|verbose|debug|masked-variables"
|
||||||
"system;Display Docker system-wide information;url|user|password;endpoint|insecure|verbose|debug|masked-variables"
|
"system:info;Display Docker system-wide information;url|user|password;endpoint|insecure|verbose|debug|masked-variables"
|
||||||
"services;Lists services already deployed for the current stack;url|user|password|name;endpoint|quiet|insecure|verbose|debug|masked-variables"
|
"services;Lists services already deployed for the current stack;url|user|password|name;endpoint|quiet|insecure|verbose|debug|masked-variables"
|
||||||
"tasks;Lists tasks for the current stack;url|user|password|name;endpoint|service|detect-job|timeout|quiet|insecure|verbose|debug|masked-variables"
|
"tasks;Lists tasks for the current stack;url|user|password|name;endpoint|service|detect-job|timeout|quiet|insecure|verbose|debug|masked-variables"
|
||||||
"tasks:healthy;Lists tasks who are running correctly for the current stack;url|user|password|name;endpoint|service|detect-job|timeout|quiet|insecure|verbose|debug|masked-variables"
|
"tasks:healthy;Lists tasks who are running correctly for the current stack;url|user|password|name;endpoint|service|detect-job|timeout|quiet|insecure|verbose|debug|masked-variables"
|
||||||
@ -85,8 +85,8 @@ main() {
|
|||||||
["stacks:list"]="list"
|
["stacks:list"]="list"
|
||||||
["stacks:info"]="info"
|
["stacks:info"]="info"
|
||||||
["stacks:status"]="status"
|
["stacks:status"]="status"
|
||||||
["system:info"]="system"
|
["system"]="system:info"
|
||||||
["docker:info"]="system"
|
["docker:info"]="system:info"
|
||||||
["services:list"]="services"
|
["services:list"]="services"
|
||||||
["tasks:list"]="tasks"
|
["tasks:list"]="tasks"
|
||||||
["containers:list"]="containers"
|
["containers:list"]="containers"
|
||||||
@ -187,11 +187,12 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Returns Docker system info
|
# Returns Docker system info
|
||||||
if [ $ACTION == "system" ]; then
|
if [ $ACTION == "system:info" ]; then
|
||||||
local docker_info
|
local docker_info
|
||||||
echo_verbose "Getting Docker info..."
|
echo_verbose "Getting Docker info..."
|
||||||
docker_info="$(docker_info)"
|
docker_info="$(docker_info)"
|
||||||
echo_debug "Docker info -> $(echo $docker_info | jq -C .)"
|
echo_debug "Docker info -> $(echo $docker_info | jq -C .)"
|
||||||
|
|
||||||
if [ -n "$docker_info" ]; then
|
if [ -n "$docker_info" ]; then
|
||||||
echo "$docker_info"
|
echo "$docker_info"
|
||||||
exit 0
|
exit 0
|
||||||
@ -424,7 +425,7 @@ set_globals() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$ACTION" != "list" ] && [ "$ACTION" != "system" ] && [[ ! ${ACTIONS_TEXT_ONLY[*]} =~ $ACTION ]]; then
|
if [ "$ACTION" != "list" ] && [ "$ACTION" != "system:info" ] && [[ ! ${ACTIONS_TEXT_ONLY[*]} =~ $ACTION ]]; then
|
||||||
check_argument "$PORTAINER_STACK_NAME" "portainer stack name" "PORTAINER_STACK_NAME" "n" "name"
|
check_argument "$PORTAINER_STACK_NAME" "portainer stack name" "PORTAINER_STACK_NAME" "n" "name"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user