Commit 1f0c90f3 authored by Michael Johnson's avatar Michael Johnson Committed by Jacky Hu

Updating for octavia-dashboard

This patch updates the imported code to reflect octavia-dashboard.

More work is required to make this work with the Octavia v2 API.
This will be done in followup patches.

Change-Id: I7363105a53642d0003036cada21c5b0cc25efc1a
parent 2224dc0f
...@@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored. ...@@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub: Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/neutron-lbaas-dashboard https://bugs.launchpad.net/octavia
neutron-lbaas-dashboard Style Commandments octavia-dashboard Style Commandments
=============================================== ====================================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
...@@ -2,32 +2,32 @@ ...@@ -2,32 +2,32 @@
Team and repository tags Team and repository tags
======================== ========================
.. image:: http://governance.openstack.org/badges/neutron-lbaas-dashboard.svg .. image:: http://governance.openstack.org/badges/octavia-dashboard.svg
:target: http://governance.openstack.org/reference/tags/index.html :target: http://governance.openstack.org/reference/tags/index.html
.. Change things from this point on .. Change things from this point on
======================= =================
neutron-lbaas-dashboard octavia-dashboard
======================= =================
Horizon panels for Neutron LBaaS v2 Horizon panels for Octavia
* Free software: Apache license * Free software: Apache license
* Documentation: http://docs.openstack.org/developer/neutron-lbaas-dashboard * Documentation: http://docs.openstack.org/developer/octavia-dashboard
* Source: http://git.openstack.org/cgit/openstack/neutron-lbaas-dashboard * Source: http://git.openstack.org/cgit/openstack/octavia-dashboard
* Bugs: http://bugs.launchpad.net/octavia * Bugs: http://bugs.launchpad.net/octavia
Features Features
-------- --------
* Please see neutron-lbaas repository * Please see octavia repository
Howto Howto
----- -----
1. Package the neutron_lbaas_dashboard by running:: 1. Package the octavia_dashboard by running::
python setup.py sdist python setup.py sdist
...@@ -36,13 +36,13 @@ Howto ...@@ -36,13 +36,13 @@ Howto
environment. environment.
2. Copy ``_1481_project_ng_loadbalancersv2_panel.py`` in 2. Copy ``_1481_project_ng_loadbalancersv2_panel.py`` in
``neutron_lbaas_dashboard/enabled`` directory ``octavia_dashboard/enabled`` directory
to ``openstack_dashboard/local/enabled``. to ``openstack_dashboard/local/enabled``.
3. (Optional) Copy the policy file into horizon's policy files folder, and 3. (Optional) Copy the policy file into horizon's policy files folder, and
add this config ``POLICY_FILES``:: add this config ``POLICY_FILES``::
'neutron_lbaas': 'neutron_lbaas_policy.json', 'octavia': 'octavia_policy.json',
4. Django has a compressor feature that performs many enhancements for the 4. Django has a compressor feature that performs many enhancements for the
delivery of static files. If the compressor feature is enabled in your delivery of static files. If the compressor feature is enabled in your
...@@ -51,7 +51,7 @@ Howto ...@@ -51,7 +51,7 @@ Howto
$ ./manage.py collectstatic $ ./manage.py collectstatic
$ ./manage.py compress $ ./manage.py compress
5. Finally restart your web server to enable neutron-lbaas-dashboard 5. Finally restart your web server to enable octavia-dashboard
in your Horizon:: in your Horizon::
$ sudo service apache2 restart $ sudo service apache2 restart
========================================== =================================
Neutron LBaaS v2 dashboard devstack plugin Octavia dashboard devstack plugin
========================================== =================================
This directory contains the neutron-lbaas-dashboard devstack plugin. This directory contains the octavia-dashboard devstack plugin.
To enable the plugin, add the following to your local.conf: To enable the plugin, add the following to your local.conf:
enable_plugin neutron-lbaas-dashboard <neutron-lbaas-dashboard GITURL> [GITREF] enable_plugin octavia-dashboard <octavia-dashboard GITURL> [GITREF]
where where
<neutron-lbaas-dashboard GITURL> is the URL of a neutron-lbaas-dashboard repository <octavia-dashboard GITURL> is the URL of a octavia-dashboard repository
[GITREF] is an optional git ref (branch/ref/tag). The default is master. [GITREF] is an optional git ref (branch/ref/tag). The default is master.
For example: For example:
enable_plugin neutron-lbaas-dashboard https://git.openstack.org/openstack/neutron-lbaas-dashboard enable_plugin octavia-dashboard https://git.openstack.org/openstack/octavia-dashboard
Once you enable the plugin in your local.conf, ensure ``horizon`` and Once you enable the plugin in your local.conf, ensure ``horizon`` and
``q-lbaasv2`` services are enabled. If both of them are enabled, ``o-api`` services are enabled. If both of them are enabled,
neutron-lbaas-dashboard will be enabled automatically octavia-dashboard will be enabled automatically
function neutron_lbaas_dashboard_install { function octavia_dashboard_install {
setup_develop $NEUTRON_LBAAS_DASHBOARD_DIR setup_develop $OCTAVIA_DASHBOARD_DIR
} }
function neutron_lbaas_dashboard_configure { function octavia_dashboard_configure {
cp $NEUTRON_LBAAS_DASHBOARD_ENABLE_FILE_PATH \ cp $OCTAVIA_DASHBOARD_ENABLE_FILE_PATH \
$HORIZON_DIR/openstack_dashboard/local/enabled/ $HORIZON_DIR/openstack_dashboard/local/enabled/
} }
if is_service_enabled horizon && is_service_enabled q-lbaasv2; then if is_service_enabled horizon && is_service_enabled o-api; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then if [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of service source # Perform installation of service source
echo_summary "Installing neutron-lbaas-dashboard" echo_summary "Installing octavia-dashboard"
neutron_lbaas_dashboard_install octavia_dashboard_install
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring neutron-lbaas-dashboard" echo_summary "Configuring octavia-dashboard"
neutron_lbaas_dashboard_configure octavia_dashboard_configure
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize and start the LBaaS service # Initialize and start the Octavia dashboard service
echo_summary "Initializing neutron-lbaas-dashboard" echo_summary "Initializing octavia-dashboard"
fi fi
fi fi
if [[ "$1" == "unstack" ]]; then if [[ "$1" == "unstack" ]]; then
# Shut down LBaaS dashboard services # Shut down Octavia dashboard services
: :
fi fi
...@@ -30,6 +30,6 @@ if [[ "$1" == "clean" ]]; then ...@@ -30,6 +30,6 @@ if [[ "$1" == "clean" ]]; then
# Remove state and transient data # Remove state and transient data
# Remember clean.sh first calls unstack.sh # Remember clean.sh first calls unstack.sh
# Remove lbaas-dashboard enabled file and pyc # Remove octavia-dashboard enabled file and pyc
rm -f "$HORIZON_DIR"/openstack_dashboard/local/enabled/"$NEUTRON_LBAAS_DASHBOARD_ENABLE_FILE_NAME"* rm -f "$HORIZON_DIR"/openstack_dashboard/local/enabled/"$OCTAVIA_DASHBOARD_ENABLE_FILE_NAME"*
fi fi
NEUTRON_LBAAS_DASHBOARD_DIR=$DEST/neutron-lbaas-dashboard OCTAVIA_DASHBOARD_DIR=$DEST/octavia-dashboard
NEUTRON_LBAAS_DASHBOARD_ENABLE_FILE_NAME=_1481_project_ng_loadbalancersv2_panel.py OCTAVIA_DASHBOARD_ENABLE_FILE_NAME=_1481_project_ng_loadbalancersv2_panel.py
NEUTRON_LBAAS_DASHBOARD_ENABLE_FILE_PATH=$NEUTRON_LBAAS_DASHBOARD_DIR/neutron_lbaas_dashboard/enabled/$NEUTRON_LBAAS_DASHBOARD_ENABLE_FILE_NAME OCTAVIA_DASHBOARD_ENABLE_FILE_PATH=$OCTAVIA_DASHBOARD_DIR/octavia_dashboard/enabled/$OCTAVIA_DASHBOARD_ENABLE_FILE_NAME
...@@ -37,8 +37,8 @@ source_suffix = '.rst' ...@@ -37,8 +37,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'neutron-lbaas-dashboard' project = u'octavia-dashboard'
copyright = u'2013, OpenStack Foundation' copyright = u'2017, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True add_function_parentheses = True
...@@ -75,4 +75,4 @@ latex_documents = [ ...@@ -75,4 +75,4 @@ latex_documents = [
#intersphinx_mapping = {'http://docs.python.org/': None} #intersphinx_mapping = {'http://docs.python.org/': None}
# A list of ignored prefixes for module index sorting. # A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['neutron-lbaas-dashboard.'] modindex_common_prefix = ['octavia-dashboard.']
.. neutron-lbaas-dashboard documentation master file, created by .. octavia-dashboard documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013. sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to neutron-lbaas-dashboard's documentation! Welcome to octavia-dashboard's documentation!
======================================================== ========================================================
Contents: Contents:
...@@ -13,7 +13,6 @@ Contents: ...@@ -13,7 +13,6 @@ Contents:
readme readme
installation installation
usage
contributing contributing
Indices and tables Indices and tables
......
...@@ -4,9 +4,9 @@ Installation ...@@ -4,9 +4,9 @@ Installation
At the command line:: At the command line::
$ pip install neutron-lbaas-dashboard $ pip install octavia-dashboard
Or, if you have virtualenvwrapper installed:: Or, if you have virtualenvwrapper installed::
$ mkvirtualenv neutron-lbaas-dashboard $ mkvirtualenv octavia-dashboard
$ pip install neutron-lbaas-dashboard $ pip install octavia-dashboard
========
Usage
========
To use neutron-lbaas-dashboard in a project::
import neutron_lbaas_dashboard
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
import pbr.version import pbr.version
__version__ = pbr.version.VersionInfo( __version__ = pbr.version.VersionInfo(
'neutron_lbaas_dashboard').version_string() 'octavia_dashboard').version_string()
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""This package holds the REST API that supports the LBaaS v2 dashboard """This package holds the REST API that supports the Octavia dashboard
Javascript code. Javascript code.
It is not intended to be used outside of Horizon, and makes no promises of It is not intended to be used outside of Horizon, and makes no promises of
...@@ -22,5 +22,5 @@ in https://wiki.openstack.org/wiki/APIChangeGuidelines. ...@@ -22,5 +22,5 @@ in https://wiki.openstack.org/wiki/APIChangeGuidelines.
""" """
# import REST API modules here # import REST API modules here
from neutron_lbaas_dashboard.api.rest import barbican # noqa from octavia_dashboard.api.rest import barbican # noqa
from neutron_lbaas_dashboard.api.rest import lbaasv2 # noqa from octavia_dashboard.api.rest import lbaasv2 # noqa
...@@ -22,7 +22,7 @@ from django.utils.translation import ugettext_lazy as _ ...@@ -22,7 +22,7 @@ from django.utils.translation import ugettext_lazy as _
from horizon import tables from horizon import tables
from neutron_lbaas_dashboard import api from octavia_dashboard import api
class TerminateLoadBalancer(tables.BatchAction): class TerminateLoadBalancer(tables.BatchAction):
......
...@@ -23,7 +23,7 @@ from horizon import tables ...@@ -23,7 +23,7 @@ from horizon import tables
from horizon import tabs from horizon import tabs
from horizon import workflows from horizon import workflows
from neutron_lbaas_dashboard import api from octavia_dashboard import api
from .tables import LoadBalancersTable # noqa from .tables import LoadBalancersTable # noqa
from .tabs import LoadBalancerDetailTabs # noqa from .tabs import LoadBalancerDetailTabs # noqa
......
...@@ -20,7 +20,7 @@ from horizon import workflows ...@@ -20,7 +20,7 @@ from horizon import workflows
from openstack_dashboard.api import nova from openstack_dashboard.api import nova
from neutron_lbaas_dashboard import api from octavia_dashboard import api
__create_new__ = "Create New" __create_new__ = "Create New"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# under the License. # under the License.
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from neutron_lbaas_dashboard import api from octavia_dashboard import api
from . create_lb import * # noqa from . create_lb import * # noqa
INDEX_URL = "horizon:projects:loadbalancersv2:index" INDEX_URL = "horizon:projects:loadbalancersv2:index"
......
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
# limitations under the License. # limitations under the License.
# Register the REST API URLs so they can be called from the JavaScript files # Register the REST API URLs so they can be called from the JavaScript files
from neutron_lbaas_dashboard.api import rest # noqa from octavia_dashboard.api import rest # noqa
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
from django.conf.urls import patterns from django.conf.urls import patterns
from django.conf.urls import url from django.conf.urls import url
from neutron_lbaas_dashboard.dashboards.project.ngloadbalancersv2 import views from octavia_dashboard.dashboards.project.ngloadbalancersv2 import views
urlpatterns = patterns( urlpatterns = patterns(
'neutron_lbaas_dashboard.dashboards.project.ngloadbalancersv2.views', 'octavia_dashboard.dashboards.project.ngloadbalancersv2.views',
url('', views.IndexView.as_view(), name='index'), url('', views.IndexView.as_view(), name='index'),
) )
...@@ -19,5 +19,5 @@ PANEL_GROUP = 'network' ...@@ -19,5 +19,5 @@ PANEL_GROUP = 'network'
# Python panel class of the PANEL to be added. # Python panel class of the PANEL to be added.
ADD_PANEL = ( ADD_PANEL = (
'neutron_lbaas_dashboard.dashboards.project.loadbalancersv2.panel' 'octavia_dashboard.dashboards.project.loadbalancersv2.panel'
'.LoadBalancersUI') '.LoadBalancersUI')
...@@ -21,10 +21,10 @@ PANEL_GROUP = 'network' ...@@ -21,10 +21,10 @@ PANEL_GROUP = 'network'
# Python panel class of the PANEL to be added. # Python panel class of the PANEL to be added.
ADD_PANEL = ( ADD_PANEL = (
'neutron_lbaas_dashboard.dashboards.project.ngloadbalancersv2.panel' 'octavia_dashboard.dashboards.project.ngloadbalancersv2.panel'
'.NGLoadBalancers') '.NGLoadBalancers')
ADD_INSTALLED_APPS = ['neutron_lbaas_dashboard'] ADD_INSTALLED_APPS = ['octavia_dashboard']
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.lbaasv2'] ADD_ANGULAR_MODULES = ['horizon.dashboard.project.lbaasv2']
......
# Frank Kloeker <eumel@arcor.de>, 2017. #zanata # Frank Kloeker <eumel@arcor.de>, 2017. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev46\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev46\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2017-01-24 21:32+0000\n" "POT-Creation-Date: 2017-01-24 21:32+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Frank Kloeker <eumel@arcor.de>, 2017. #zanata # Frank Kloeker <eumel@arcor.de>, 2017. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev46\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev46\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2017-01-24 21:31+0000\n" "POT-Creation-Date: 2017-01-24 21:31+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Corinne Verheyde <cverheyd@gmail.com>, 2017. #zanata # Corinne Verheyde <cverheyd@gmail.com>, 2017. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev52\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev52\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2017-01-26 23:11+0000\n" "POT-Creation-Date: 2017-01-26 23:11+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
# suhartono <cloudsuhartono@gmail.com>, 2017. #zanata # suhartono <cloudsuhartono@gmail.com>, 2017. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev44\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev44\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2017-01-03 17:58+0000\n" "POT-Creation-Date: 2017-01-03 17:58+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
# suhartono <cloudsuhartono@gmail.com>, 2017. #zanata # suhartono <cloudsuhartono@gmail.com>, 2017. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev45\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev45\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2017-01-17 14:12+0000\n" "POT-Creation-Date: 2017-01-17 14:12+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
# Yusuke Higashino <yusuke_higashino@adoc.co.jp>, 2016. #zanata # Yusuke Higashino <yusuke_higashino@adoc.co.jp>, 2016. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev38\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev38\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-11-28 22:05+0000\n" "POT-Creation-Date: 2016-11-28 22:05+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# 小羽根 陸 <riku_kobane@adoc.co.jp>, 2016. #zanata # 小羽根 陸 <riku_kobane@adoc.co.jp>, 2016. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev41\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev41\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-11-30 19:41+0000\n" "POT-Creation-Date: 2016-11-30 19:41+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
# Eunseop Shin <kairos9603@gmail.com>, 2016. #zanata # Eunseop Shin <kairos9603@gmail.com>, 2016. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev32\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev32\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-10-13 22:46+0000\n" "POT-Creation-Date: 2016-10-13 22:46+0000\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Fedor Tarasenko <feodor.tarasenko@gmail.com>, 2017. #zanata # Fedor Tarasenko <feodor.tarasenko@gmail.com>, 2017. #zanata
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: neutron-lbaas-dashboard 1.0.1.dev55\n" "Project-Id-Version: octavia-dashboard 1.0.1.dev55\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"