Configure bash completion
Add bash completion rules to the /etc/bash_completion.d from the
cinder, neutron, keystone, nova and nova-manage.
This is very fast operation and makes the cli usage easier.
Change-Id: Icdcdaf55d58efaaa1afe25fd55f088bf7dc8b3f1
diff --git a/lib/cinder b/lib/cinder
index 54cf844..6fc877d 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -468,6 +468,7 @@
function install_cinderclient() {
git_clone $CINDERCLIENT_REPO $CINDERCLIENT_DIR $CINDERCLIENT_BRANCH
setup_develop $CINDERCLIENT_DIR
+ sudo install -D -m 0644 -o $STACK_USER {$CINDERCLIENT_DIR/tools/,/etc/bash_completion.d/}cinder.bash_completion
}
# apply config.d approach for cinder volumes directory
diff --git a/lib/keystone b/lib/keystone
index e7e0544..0a35dd5 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -289,6 +289,7 @@
function install_keystoneclient() {
git_clone $KEYSTONECLIENT_REPO $KEYSTONECLIENT_DIR $KEYSTONECLIENT_BRANCH
setup_develop $KEYSTONECLIENT_DIR
+ sudo install -D -m 0644 -o $STACK_USER {$KEYSTONECLIENT_DIR/tools/,/etc/bash_completion.d/}keystone.bash_completion
}
# install_keystone() - Collect source and prepare
diff --git a/lib/neutron b/lib/neutron
index 31876de..c46003b 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -382,6 +382,7 @@
function install_neutronclient() {
git_clone $NEUTRONCLIENT_REPO $NEUTRONCLIENT_DIR $NEUTRONCLIENT_BRANCH
setup_develop $NEUTRONCLIENT_DIR
+ sudo install -D -m 0644 -o $STACK_USER {$NEUTRONCLIENT_DIR/tools/,/etc/bash_completion.d/}neutron.bash_completion
}
# install_neutron_agent_packages() - Collect source and prepare
diff --git a/lib/nova b/lib/nova
index 842c098..bb9bca2 100644
--- a/lib/nova
+++ b/lib/nova
@@ -645,6 +645,7 @@
function install_novaclient() {
git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
setup_develop $NOVACLIENT_DIR
+ sudo install -D -m 0644 -o $STACK_USER {$NOVACLIENT_DIR/tools/,/etc/bash_completion.d/}nova.bash_completion
}
# install_nova() - Collect source and prepare
@@ -682,6 +683,7 @@
git_clone $NOVA_REPO $NOVA_DIR $NOVA_BRANCH
setup_develop $NOVA_DIR
+ sudo install -D -m 0644 -o $STACK_USER {$NOVA_DIR/tools/,/etc/bash_completion.d/}nova-manage.bash_completion
}
# start_nova_api() - Start the API process ahead of other things