Commit 603c0371 authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Rename driver command functions

parent df6a94f1
......@@ -321,8 +321,9 @@ deleteMapping() {
popd > /dev/null
}
# Program entrypoint that is called by Kubernetes to attach and mount a disk.
domount() {
# Program part that is performed when the program is called by Kubernetes to
# attach and mount a disk.
mountAction() {
debug "domount $@"
local mountPoint=$1
local options=$2
......@@ -388,7 +389,9 @@ domount() {
exit 0
}
unmount() {
# Program part that is performed when the program is called by Kubernetes to
# unmount and detach a disk.
unmountAction() {
debug "unmount $@"
local mountPoint=$1
......@@ -435,22 +438,19 @@ unmount() {
# This is the command Kubernetes wants us to perform.
op=$1
if [[ "$op" = "init" ]]
then
debug "init $@"
echo "{\"status\":\"Success\",\"capabilities\":{\"attach\":false}}" >&1
exit 0
fi
shift
case "$op" in
init)
debug "init"
echo "{\"status\":\"Success\",\"capabilities\":{\"attach\":false}}" >&1
exit 0
;;
mount)
domount $*
mountAction $*
;;
unmount)
unmount $*
unmountAction $*
;;
*)
debug "not supported: $op $*"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment