diff options
author | Andrew Butcher <abutcher@redhat.com> | 2016-05-25 11:15:10 -0400 |
---|---|---|
committer | Andrew Butcher <abutcher@redhat.com> | 2016-05-25 11:15:10 -0400 |
commit | 4c911eeed06fa433b5ac78dbf644ce923d7411e0 (patch) | |
tree | d39395c1fb4f45a469627fa74ff290992b7c4e41 /bin/zsh_functions | |
parent | 00eba039c9312fbd04cc05a8a890ef48f2311769 (diff) | |
download | openshift-4c911eeed06fa433b5ac78dbf644ce923d7411e0.tar.gz openshift-4c911eeed06fa433b5ac78dbf644ce923d7411e0.tar.bz2 openshift-4c911eeed06fa433b5ac78dbf644ce923d7411e0.tar.xz openshift-4c911eeed06fa433b5ac78dbf644ce923d7411e0.zip |
Cleanup bin, test and roles/openshift_ansible_inventory following move to openshift-tools
Diffstat (limited to 'bin/zsh_functions')
-rw-r--r-- | bin/zsh_functions/_ossh | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/bin/zsh_functions/_ossh b/bin/zsh_functions/_ossh deleted file mode 100644 index 65979c58a..000000000 --- a/bin/zsh_functions/_ossh +++ /dev/null @@ -1,49 +0,0 @@ -#compdef ossh oscp - -_ossh_known_hosts(){ - if [[ -f ~/.ansible/tmp/multi_inventory.cache ]]; then - print $(/usr/bin/python -c 'import json,os; z = json.loads(open("%s"%os.path.expanduser("~/.ansible/tmp/multi_inventory.cache")).read()); print "\n".join(["%s.%s" % (host["oo_name"],host["oo_environment"]) for dns, host in z["_meta"]["hostvars"].items()])') - fi -} - -_ossh(){ - local curcontext="$curcontext" state line - typeset -A opt_args - - common_arguments=( - '(- *)'{-h,--help}'[show help]' \ - {-v,--verbose}'[enable verbose]' \ - {-d,--debug}'[debug mode]' \ - {-l,--login_name}+'[login name]:login_name' \ - {-c,--command}+'[command to run on remote host]:command' \ - {-o,--ssh_opts}+'[SSH Options to pass to SSH]:ssh options' \ - {-e,--env}+'[environtment to use]:environment:->env' \ - '--list[list out hosts]' \ - ':OP Hosts:->oo_hosts' - ) - - case "$service" in - ossh) - _arguments -C -s \ - "$common_arguments[@]" \ - ;; - - oscp) - _arguments -C -s \ - "$common_arguments[@]" \ - {-r,--recurse}'[Recursive copy]' \ - ':file:_files' - ;; - esac - - case "$state" in - oo_hosts) - _values 'oo_hosts' $(_ossh_known_hosts) - ;; - env) - _values 'environment' ops int stg prod - ;; - esac -} - -_ossh "$@" |