From 2ebfb80dda12116f30e8d00a4b45eb2ebba2cb8a Mon Sep 17 00:00:00 2001 From: Eyal Date: Sun, 3 Apr 2016 15:19:28 +0300 Subject: [PATCH] add vitrage plugins to devstack configuration Change-Id: Id0b61cc5c92359e8780e6bef9eb956e0a583a55a --- devstack/plugin.sh | 23 +++++++++++++++++++++++ devstack/settings | 1 + 2 files changed, 24 insertions(+) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 98fbc0a34..e492d2643 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -100,6 +100,16 @@ function cleanup_vitrage { fi } +function disable_vitrage_plugin { + + local enabled_plugins=",${VITRAGE_DEFAULT_PLUGINS}," + local plugin + for plugin in $@; do + enabled_plugins=${enabled_plugins//,$plugin,/,} + done + VITRAGE_DEFAULT_PLUGINS=$(_cleanup_service_list "$enabled_plugins") + +} # Configure Vitrage function configure_vitrage { @@ -124,6 +134,19 @@ function configure_vitrage { iniset $VITRAGE_CONF service_credentials region_name $REGION_NAME iniset $VITRAGE_CONF service_credentials auth_url $KEYSTONE_SERVICE_URI + # add default plugins + iniset $VITRAGE_CONF synchronizer_plugins plugin_type $VITRAGE_DEFAULT_PLUGINS + + # remove neutron vitrage plugin if neutron plugin not installed + if ! is_service_enabled neutron; then + disable_vitrage_plugin neutron.network + fi + + # remove aodh vitrage plugin if aodh plugin not installed + if ! is_service_enabled aodh; then + disable_vitrage_plugin aodh + fi + # copy the mock sample files cp $VITRAGE_DIR/etc/vitrage/*.sample.json $VITRAGE_CONF_DIR diff --git a/devstack/settings b/devstack/settings index e4798f2a0..3b75b954a 100644 --- a/devstack/settings +++ b/devstack/settings @@ -20,6 +20,7 @@ VITRAGE_SERVICE_PROTOCOL=http VITRAGE_SERVICE_HOST=$SERVICE_HOST VITRAGE_SERVICE_PORT=${VITRAGE_SERVICE_PORT:-8999} VITRAGE_USE_MOD_WSGI=${VITRAGE_USE_MOD_WSGI:-${ENABLE_HTTPD_MOD_WSGI_SERVICES}} +VITRAGE_DEFAULT_PLUGINS=${VITRAGE_DEFAULT_PLUGINS:-nova.host,nova.instance,nova.zone,nagios,static_physical,aodh,cinder.volume,neutron.network} # Tell Tempest this project is present