- fs-create - fs-delete - fs-resize - fs-export - fs-unexport - fs-clone - fs-snap-create - fs-snap-delete - fs-snap-restore - fs-dependants - fs-dependants-rm - file-clone
Signed-off-by: Tony Asleson <tasle...@redhat.com> --- doc/lsmcli.bash | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 84 insertions(+), 3 deletions(-) diff --git a/doc/lsmcli.bash b/doc/lsmcli.bash index 22eb86f..383595c 100644 --- a/doc/lsmcli.bash +++ b/doc/lsmcli.bash @@ -56,7 +56,10 @@ _lsm() volume-dependants volume-dependants-rm volume-access-group \ volume-mask volume-unmask access-group-create \ access-group-delete access-group-add access-group-remove \ - volume-enable volume-disable iscsi-chap" + volume-enable volume-disable iscsi-chap fs-create fs-delete \ + fs-resize fs-export fs-unexport fs-clone fs-snap-create \ + fs-snap-delete fs-snap-restore fs-dependants fs-dependants-rm + file-clone" list_args="--type" list_type_args="volumes pools fs snapshots exports nfs_client_auth \ @@ -91,6 +94,18 @@ _lsm() iscsi_chap_args="--in-user --in-pass --out-user --out-pass" + fs_create_args="--name --size --pool" + fs_delete_args="--fs --force" # Force ? + fs_resize_args="--fs --size --force" # Force ? + fs_export_args="--fs --exportpath --anonuid --auth-type --root-host --ro-host --rw-host" + fs_unexport_args="--export" + fs_clone_args="--src-fs --dst-name" + fs_snap_create_args="--name --fs" + fs_snap_delete_args="--snap --fs" + fs_snap_restore_args="--snap --fs --file --fileas --force" + fs_dependants_args="--fs" + file_clone_args="--fs --src --dst --backing-snapshot" + # Check if we have somthing present that we can help the user with case "${prev}" in --sys) @@ -142,11 +157,16 @@ _lsm() COMPREPLY=( $(compgen -W "${items}" -- ${cur}) ) return 0 ;; - --fs) + --fs|--src-fs) local items=`lsmcli list --type fs -t${sep} | awk -F ${sep} '{print $1}'` COMPREPLY=( $(compgen -W "${items}" -- ${cur}) ) return 0 ;; + --export) + local items=`lsmcli list --type exports -t${sep} | awk -F ${sep} '{print $1}'` + COMPREPLY=( $(compgen -W "${items}" -- ${cur}) ) + return 0 + ;; snapshots) # Specific listing case where you need a fs too if [[ ${COMP_WORDS[COMP_CWORD-2]} == '--type' && \ @@ -160,7 +180,8 @@ _lsm() return 0 ;; --size|--count|--src-start|--dst-start|--name|--in-user|--in-pass|\ - --out-user|--out-pass) + --out-user|--out-pass|--exportpath|--anonuid|--root-host|--ro-host|\ + --rw-host|--dest-name|--snap|--file|--fileas|--src|--dst) # These we cannot lookup, so don't offer any values COMPREPLY=( $(compgen -W "" -- ${cur}) ) return 0 @@ -169,6 +190,11 @@ _lsm() COMPREPLY=( $(compgen -W "${volume_rep_types}" -- ${cur}) ) return 0 ;; + --auth-type) + local items=`lsmcli list --type nfs_client_auth -t ' '` + COMPREPLY=( $(compgen -W "${items}" -- ${cur}) ) + return 0 + ;; *) ;; esac @@ -254,6 +280,61 @@ _lsm() COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) return 0 ;; + fs-create) + possible_args "${fs_create_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-delete) + possible_args "${fs_delete_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-resize) + possible_args "${fs_resize_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-export) + possible_args "${fs_export_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-unexport) + possible_args "${fs_unexport_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-clone) + possible_args "${fs_clone_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-snap-create) + possible_args "${fs_snap_create_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-snap-delete) + possible_args "${fs_snap_delete_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-snap-restore) + possible_args "${fs_snap_restore_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + fs-dependants|fs-dependants-rm) + possible_args "${fs_dependants_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; + file-clone) + possible_args "${file_clone_args}" + COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) + return 0 + ;; capabilities) possible_args "${cap_args}" COMPREPLY=( $(compgen -W "${potential_args}" -- ${cur}) ) -- 1.7.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Libstoragemgmt-devel mailing list Libstoragemgmt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel