From 3b9fa62452c636c49cc1bd19436e37882c76b88c Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 3 Apr 2014 22:56:57 -0400 Subject: clients: add bash-completion support Package and enable the bash completion suppor that comes with the various client packages. Signed-off-by: Bruce Ashfield --- .../python/python-ceilometer_git.bb | 39 +++++++++++----------- .../python/python-ceilometerclient_git.bb | 12 +++++++ .../recipes-devtools/python/python-cinder_git.bb | 1 + .../python/python-cinderclient_git.bb | 11 ++++++ .../python/python-heatclient_git.bb | 12 +++++++ .../python/python-keystoneclient_git.bb | 11 ++++++ .../python/python-neutronclient_git.bb | 11 ++++++ .../recipes-devtools/python/python-nova_git.bb | 17 ++++++++-- .../python/python-novaclient_git.bb | 13 +++++++- 9 files changed, 105 insertions(+), 22 deletions(-) (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb index f77cf1d..8d5b9dc 100644 --- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb +++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb @@ -162,26 +162,27 @@ RDEPENDS_${PN} += " \ python-glanceclient \ python-keystoneclient \ python-swiftclient \ + python-ceilometerclient \ python-oslo.config \ - python-msgpack \ - python-pecan \ - python-amqp \ - python-singledispatch \ - python-flask \ - python-werkzeug \ - python-itsdangerous \ - python-happybase \ - python-wsme \ - python-eventlet \ - python-pymongo \ - python-thrift \ - python-simplegeneric \ - python-webtest \ - python-waitress \ - python-pyyaml \ - python-pip \ - python-pytz \ - python-pbr \ + python-msgpack \ + python-pecan \ + python-amqp \ + python-singledispatch \ + python-flask \ + python-werkzeug \ + python-itsdangerous \ + python-happybase \ + python-wsme \ + python-eventlet \ + python-pymongo \ + python-thrift \ + python-simplegeneric \ + python-webtest \ + python-waitress \ + python-pyyaml \ + python-pip \ + python-pytz \ + python-pbr \ " RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common ${SRCNAME}-alarm-notifier ${SRCNAME}-alarm-evaluator \ diff --git a/meta-openstack/recipes-devtools/python/python-ceilometerclient_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometerclient_git.bb index c7c6ff4..dce3e12 100644 --- a/meta-openstack/recipes-devtools/python/python-ceilometerclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-ceilometerclient_git.bb @@ -30,3 +30,15 @@ SRCREV="6f4ec9dc96477131c90040ee00f5535e50d5f914" S = "${WORKDIR}/git" inherit setuptools + + +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" + +do_install_append() { + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/ceilometer.bash_completion ${D}/${sysconfdir}/bash_completion.d +} + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb index 15a2608..28b0f74 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb @@ -162,6 +162,7 @@ RDEPENDS_${PN} += "lvm2 \ python-glanceclient \ python-keystoneclient \ python-swiftclient \ + python-cinderclient \ python-oslo.config \ python-pbr \ " diff --git a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb index 3c7293b..1f4e4a6 100644 --- a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb @@ -30,3 +30,14 @@ RDEPENDS_${PN} += "python-prettytable \ python-setuptools-git \ python-pbr \ " + +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" + +do_install_append() { + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/cinder.bash_completion ${D}/${sysconfdir}/bash_completion.d +} + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" diff --git a/meta-openstack/recipes-devtools/python/python-heatclient_git.bb b/meta-openstack/recipes-devtools/python/python-heatclient_git.bb index fc9f020..9902de1 100644 --- a/meta-openstack/recipes-devtools/python/python-heatclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-heatclient_git.bb @@ -27,3 +27,15 @@ SRCREV="55e794f922dd2005a62bb33fd129996b6c476b66" S = "${WORKDIR}/git" inherit setuptools + + +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" + +do_install_append() { + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/heat.bash_completion ${D}/${sysconfdir}/bash_completion.d +} + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb index 89d8a9a..f376617 100644 --- a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb @@ -31,3 +31,14 @@ RDEPENDS_${PN} += "python-iso8601 \ python-oslo.config \ python-pbr \ " + +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" + +do_install_append() { + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/keystone.bash_completion ${D}/${sysconfdir}/bash_completion.d +} + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" diff --git a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb index 6d295c2..2aac1e9 100644 --- a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb @@ -27,3 +27,14 @@ SRCREV="6adb11703cb5b55a4af45e8524dc1039fb03176c" S = "${WORKDIR}/git" inherit setuptools + +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" + +do_install_append() { + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/neutron.bash_completion ${D}/${sysconfdir}/bash_completion.d +} + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb index 18e69aa..e88220a 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_git.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb @@ -114,6 +114,9 @@ do_install_append() { fi cp run_tests.sh ${NOVA_CONF_DIR} + + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/nova-manage.bash_completion ${D}/${sysconfdir}/bash_completion.d } pkg_postinst_${SRCNAME}-setup () { @@ -139,9 +142,11 @@ pkg_postinst_${SRCNAME}-common () { fi if [ -d /home/root ]; then - echo "source /etc/nova/openrc" > /home/root/.bashrc + echo "source /etc/nova/openrc" >> /home/root/.bashrc + echo "source /etc/nova/openrc" >> /home/root/.profile else - echo "source /etc/nova/openrc" > /root/.bashrc + echo "source /etc/nova/openrc" >> /root/.bashrc + echo "source /etc/nova/openrc" >> /root/.profile fi } @@ -161,6 +166,13 @@ PACKAGES += " ${SRCNAME}-cert" PACKAGES += " ${SRCNAME}-conductor" PACKAGES += " ${SRCNAME}-api" +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion python-nova-bash-completion" + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" + + ALLOW_EMPTY_${SRCNAME}-setup = "1" FILES_${PN} = "${libdir}/*" @@ -215,6 +227,7 @@ RDEPENDS_${PN} = " libvirt \ python-anyjson \ python-babel \ python-boto \ + python-novaclient \ python-cinderclient \ python-cliff \ python-cheetah \ diff --git a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb index 7ac9b34..ff81924 100644 --- a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb @@ -3,7 +3,6 @@ HOMEPAGE = "https://github.com/openstack/python-novaclient" SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=7cdb54622cacc9bc9b2883091e6dd669" -DEPENDS = "python-setuptools-git" PR = "r0" @@ -18,6 +17,7 @@ S = "${WORKDIR}/git" inherit setuptools +DEPENDS = "python-setuptools-git" DEPENDS += " \ python-pip \ python-pbr \ @@ -29,3 +29,14 @@ RDEPENDS_${PN} += "python-iso8601 \ python-simplejson \ python-pbr \ " + +PACKAGECONFIG ?= "bash-completion" +PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" + +do_install_append() { + install -d ${D}/${sysconfdir}/bash_completion.d + install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d +} + +PACKAGES =+ "${BPN}-bash-completion" +FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" -- cgit v1.2.3-54-g00ecf