DevStack plugin for neutron-fwaas-dashboard
Change-Id: I93e00964dc4232c9bef0e4efa272111f9163cc71
This commit is contained in:
parent
706f284b90
commit
a2039e931f
33
devstack/README.rst
Normal file
33
devstack/README.rst
Normal file
@ -0,0 +1,33 @@
|
||||
===========================================
|
||||
DevStack plugin for neutron-fwaas-dashboard
|
||||
===========================================
|
||||
|
||||
This is setup as a DevStack plugin.
|
||||
For more information on DevStack plugins,
|
||||
see the `DevStack Plugins documentation
|
||||
<https://docs.openstack.org/developer/devstack/plugins.html>`__.
|
||||
|
||||
How to enable FWaaS v1 dsashboard
|
||||
---------------------------------
|
||||
|
||||
Add the following to the localrc section of your local.conf.
|
||||
You need to configure FWaaS v1 DevStack plugin as well.
|
||||
|
||||
If ``q-fwaas-v1`` (or ``q-fwaas``) is enabled,
|
||||
FWaaS v1 dashboard ``neutron-fwaas-v1-dashboard`` is automatically enabled.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[[local|localrc]]
|
||||
enable_plugin neutron-fwaas https://git.openstack.org/openstack/neutron-fwaas master
|
||||
enable_service q-fwaas-v1
|
||||
enable_plugin neutron-fwaas-dashboard https://git.openstack.org/openstack/neutron-fwaas-dashboard master
|
||||
|
||||
If you run horizon in a separate server from neutron server and
|
||||
neutron-fwaas is not configured,
|
||||
``neutron-fwaas-v1-dashboard`` is enabled by default.
|
||||
|
||||
How to enable FWaaS v2 dsashboard
|
||||
---------------------------------
|
||||
|
||||
Coming soon.
|
61
devstack/plugin.sh
Normal file
61
devstack/plugin.sh
Normal file
@ -0,0 +1,61 @@
|
||||
# plugin.sh - DevStack plugin.sh dispatch script neutron-fwaas-dashboard
|
||||
|
||||
FWAAS_DASHBOARD_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
|
||||
FWAAS_ENABLED_DIR=$FWAAS_DASHBOARD_DIR/neutron_fwaas_dashboard/enabled
|
||||
HORIZON_ENABLED_DIR=$DEST/horizon/openstack_dashboard/local/enabled
|
||||
|
||||
function install_neutron_fwaas_dashboard {
|
||||
setup_develop $FWAAS_DASHBOARD_DIR
|
||||
}
|
||||
|
||||
function configure_neutron_fwaas_dashboard {
|
||||
if is_service_enabled neutron-fwaas-v1-dashboard; then
|
||||
cp -a $FWAAS_ENABLED_DIR/_1460_project_firewalls_panel.py $HORIZON_ENABLED_DIR
|
||||
fi
|
||||
# NOTE: If locale directory does not exist, compilemessages will fail,
|
||||
# so check for an existence of locale directory is required.
|
||||
if [ -d $FWAAS_DASHBOARD_DIR/neutron_fwaas_dashboard/locale ]; then
|
||||
(cd $FWAAS_DASHBOARD_DIR/neutron_fwaas_dashboard; \
|
||||
DJANGO_SETTINGS_MODULE=openstack_dashboard.settings ../manage.py compilemessages)
|
||||
fi
|
||||
}
|
||||
|
||||
# check for service enabled
|
||||
if is_service_enabled neutron-fwaas-v1-dashboard neutron-fwaas-v2-dashboard; then
|
||||
|
||||
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
|
||||
# Set up system services
|
||||
# no-op
|
||||
:
|
||||
|
||||
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
# Perform installation of service source
|
||||
echo_summary "Installing Neutron FWaaS Dashboard"
|
||||
install_neutron_fwaas_dashboard
|
||||
|
||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||
# Configure after the other layer 1 and 2 services have been configured
|
||||
echo_summary "Configurng Neutron FWaaS Dashboard"
|
||||
configure_neutron_fwaas_dashboard
|
||||
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
# no-op
|
||||
:
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
# Remove enabled file(s)
|
||||
for _enabled_file in $FWAAS_ENABLED_DIR/_[0-9]*.py; do
|
||||
_enabled_basename=$(basename $_enabled_file .py)
|
||||
rm -f $HORIZON_ENABLED_DIR/${_enabled_basename}.py*
|
||||
rm -f $HORIZON_ENABLED_DIR/__pycache__/${_enabled_basename}.*pyc
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "$1" == "clean" ]]; then
|
||||
# Remove state and transient data
|
||||
# Remember clean.sh first calls unstack.sh
|
||||
# no-op
|
||||
:
|
||||
fi
|
||||
fi
|
8
devstack/settings
Normal file
8
devstack/settings
Normal file
@ -0,0 +1,8 @@
|
||||
# settings file for neutron-fwaas-dashboard plugin
|
||||
if is_service_enabled q-fwaas q-fwaas-v1; then
|
||||
enable_service neutron-fwaas-v1-dashboard
|
||||
elif is_service_enabled q-fwaas-v2; then
|
||||
enable_service neutron-fwaas-v2-dashboard
|
||||
else
|
||||
enable_service neutron-fwaas-v1-dashboard
|
||||
fi
|
1
doc/source/contributor/devstack-plugin.rst
Normal file
1
doc/source/contributor/devstack-plugin.rst
Normal file
@ -0,0 +1 @@
|
||||
.. include:: ../../../devstack/README.rst
|
@ -18,12 +18,22 @@
|
||||
Neutron FWaaS Dashboard Project
|
||||
================================
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
Neutron FWaaS Dashboard is a horizon plugin for Neutron FWaaS.
|
||||
|
||||
User Documentation
|
||||
------------------
|
||||
|
||||
Under preparing.
|
||||
|
||||
Contributor Guide
|
||||
-----------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
contributor/devstack-plugin
|
||||
|
||||
Release Notes
|
||||
=============
|
||||
-------------
|
||||
|
||||
See http://docs.openstack.org/releasenotes/neutron-fwaas-dashboard/.
|
||||
|
Loading…
Reference in New Issue
Block a user