Add initial files as devstack settings/documents/requirements.

Change-Id: I79e42375151d06dd93a7529b7c6b6c25eafa68df
This commit is contained in:
Keiichi Hikita 2017-10-27 13:37:00 +09:00
parent 867749f5b3
commit ad9eba2e20
31 changed files with 340 additions and 454 deletions

5
.gitreview Normal file
View File

@ -0,0 +1,5 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/heat-dashboard.git
defaultbranch=master

View File

@ -1,38 +1,68 @@
OpenStack Dashboard plugin for Heat project
===========================================
========================
Team and repository tags
========================
How to use with Horizon on server:
----------------------------------
.. image:: https://governance.openstack.org/tc/badges/heat-dashboard.svg
:target: http://governance.openstack.org/reference/tags/index.html
| Use pip to install the package on the server running Horizon.
| Then either copy or link the files in heat_dashboard/enabled to
| openstack_dashboard/local/enabled like following.
.. Change things from this point on
==============
Heat Dashboard
==============
Horizon plugin for Heat
* License: Apache license
* Source: http://git.openstack.org/cgit/openstack/heat-dashboard
* Bugs: http://bugs.launchpad.net/heat-dashboard
.. code-block:: bash
Use Heat Dashboard in DevStack
------------------------------
cd heat-dashboard & python setup.py sdist
horizon/tools/with_venv.sh pip install dist/package.tar.gz
Set up your ``local.conf`` to enable heat-dashboard::
cp -rv enabled/ horizon/openstack_dashboard/local/
# !! ADD_SCSS_FILES may be overried to your environment.
[[local|localrc]]
enable_plugin heat-dashboard https://git.openstack.org/openstack/heat-dashboard
# Restart Apache or your Django test server
# You may need to run
python manage.py collectstatic
python manage.py compress
Manual Installation
-------------------
| This step will cause the Horizon service to pick up the heat plugin
| when it starts.
Clone both Horizon and Heat Dashboard repositories::
git clone https://github.com/openstack/horizon
git clone https://github.com/openstack/heat-dashboard
Create a virtual environment and install Horizon relevant packages::
pip install -r horizon/requirements.txt
Create your ``local_settings.py`` file::
cp horizon/openstack_dashboard/local/local_settings.py.example \
horizon/openstack_dashboard/local/local_settings.py
Open newly created ``local_settings.py`` with your text editor,
and set some parameter to connect to your OpenStack environment:
- Set ``OPENSTACK_HOST`` as hostname or IP address of your OpenStack server.
- Verify that the ``OPENSTACK_KEYSTONE_URL`` and
``OPENSTACK_KEYSTONE_DEFAULT_ROLE`` settings are correct for your
environment. (They should be correct unless you modified your
OpenStack server to change them.)
To run unit tests:
------------------
::
Enable heat-dashboard plugin in your Horizon environment::
./run_tests.sh
cp heat-dashboard/heat_dashboard/enabled/* \
horizon/openstack_dashboard/local/enabled
Finally you can launch Horizon with Heat Dashboard plugin::
Reference:
-----------------------------------------------------------------------------------
https://docs.openstack.org/horizon/latest/contributor/tutorials/plugin.html
cd horizon
python manage.py runserver 0.0.0.0:8080
Now you can connect to your Horizon including Heat Dashboard plugin
from your browser with URL http://localhost:8080/.

60
devstack/plugin.sh Normal file
View File

@ -0,0 +1,60 @@
# plugin.sh - DevStack plugin.sh dispatch script heat-dashboard
HEAT_DASHBOARD_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
function install_heat_dashboard {
# NOTE(shu-mutou): workaround for devstack bug: 1540328
# where devstack install 'test-requirements' but should not do it
# for heat-dashboard project as it installs Horizon from url.
# Remove following two 'mv' commands when mentioned bug is fixed.
mv $HEAT_DASHBOARD_DIR/test-requirements.txt $HEAT_DASHBOARD_DIR/_test-requirements.txt
setup_develop ${HEAT_DASHBOARD_DIR}
mv $HEAT_DASHBOARD_DIR/_test-requirements.txt $HEAT_DASHBOARD_DIR/test-requirements.txt
}
function configure_heat_dashboard {
cp -a ${HEAT_DASHBOARD_DIR}/heat_dashboard/enabled/* ${DEST}/horizon/openstack_dashboard/local/enabled/
# NOTE: If locale directory does not exist, compilemessages will fail,
# so check for an existence of locale directory is required.
if [ -d ${HEAT_DASHBOARD_DIR}/heat_dashboard/locale ]; then
(cd ${HEAT_DASHBOARD_DIR}/heat_dashboard; DJANGO_SETTINGS_MODULE=openstack_dashboard.settings ../manage.py compilemessages)
fi
}
# check for service enabled
if is_service_enabled heat-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 Heat Dashboard"
install_heat_dashboard
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring Heat Dashboard"
configure_heat_dashboard
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# Remove state and transient data
# Remember clean.sh first calls unstack.sh
# no-op
:
fi
fi

2
devstack/settings Normal file
View File

@ -0,0 +1,2 @@
# settings file for heat-dashboard plugin
enable_service heat-dashboard

View File

@ -1,5 +0,0 @@
====================
Administrators guide
====================
Administrators guide of openstack.

View File

@ -1,5 +0,0 @@
================================
Command line interface reference
================================
CLI reference of openstack.

View File

@ -0,0 +1,10 @@
=============
Configuration
=============
Heat Dashboard has no configuration option.
For more configurations, see
`Configuration Guide <https://docs.openstack.org/horizon/latest/configuration/index.html>`_
in the Horizon documentation.

View File

@ -1,5 +1,8 @@
=============
Configuration
=============
==================================
heat-dashboard configuration guide
==================================
Configuration of openstack.
.. toctree::
:maxdepth: 1
configuration

View File

@ -1,4 +1,41 @@
============
Contributing
============
.. include:: ../../../CONTRIBUTING.rst
=================
How to Contribute
=================
Contributor License Agreement
-----------------------------
.. index::
single: license; agreement
In order to contribute to the Heat Dashboard project, you need to have
signed OpenStack's contributor's agreement.
.. seealso::
* http://docs.openstack.org/infra/manual/developers.html
* http://wiki.openstack.org/CLA
LaunchPad Project
-----------------
Most of the tools used for OpenStack depend on a launchpad.net ID for
authentication.
.. seealso::
* https://launchpad.net
* https://launchpad.net/heat-dashboard
Project Hosting Details
-------------------------
Bug tracker
http://launchpad.net/heat-dashboard
Code Hosting
https://git.openstack.org/cgit/openstack/heat-dashboard
Code Review
https://review.openstack.org/#/q/status:open+project:openstack/heat-dashboard,n,z

View File

@ -14,13 +14,8 @@ Contents:
readme
install/index
library/index
contributor/index
configuration/index
cli/index
user/index
admin/index
reference/index
Indices and tables
==================

View File

@ -1,10 +0,0 @@
2. Edit the ``/etc/../horizon/../horizon.conf`` file and complete the following
actions:
* In the ``[database]`` section, configure database access:
.. code-block:: ini
[database]
...
connection = mysql+pymysql://../horizon:../HORIZON_DBPASS@controller/../horizon

View File

@ -1,75 +0,0 @@
Prerequisites
-------------
Before you install and configure the openstack service,
you must create a database, service credentials, and API endpoints.
#. To create the database, complete these steps:
* Use the database access client to connect to the database
server as the ``root`` user:
.. code-block:: console
$ mysql -u root -p
* Create the ``../horizon`` database:
.. code-block:: none
CREATE DATABASE ../horizon;
* Grant proper access to the ``../horizon`` database:
.. code-block:: none
GRANT ALL PRIVILEGES ON ../horizon.* TO '../horizon'@'localhost' \
IDENTIFIED BY '../HORIZON_DBPASS';
GRANT ALL PRIVILEGES ON ../horizon.* TO '../horizon'@'%' \
IDENTIFIED BY '../HORIZON_DBPASS';
Replace ``../HORIZON_DBPASS`` with a suitable password.
* Exit the database access client.
.. code-block:: none
exit;
#. Source the ``admin`` credentials to gain access to
admin-only CLI commands:
.. code-block:: console
$ . admin-openrc
#. To create the service credentials, complete these steps:
* Create the ``../horizon`` user:
.. code-block:: console
$ openstack user create --domain default --password-prompt ../horizon
* Add the ``admin`` role to the ``../horizon`` user:
.. code-block:: console
$ openstack role add --project service --user ../horizon admin
* Create the ../horizon service entities:
.. code-block:: console
$ openstack service create --name ../horizon --description "openstack" openstack
#. Create the openstack service API endpoints:
.. code-block:: console
$ openstack endpoint create --region RegionOne \
openstack public http://controller:XXXX/vY/%\(tenant_id\)s
$ openstack endpoint create --region RegionOne \
openstack internal http://controller:XXXX/vY/%\(tenant_id\)s
$ openstack endpoint create --region RegionOne \
openstack admin http://controller:XXXX/vY/%\(tenant_id\)s

View File

@ -1,9 +0,0 @@
==========================
openstack service overview
==========================
The openstack service provides...
The openstack service consists of the following components:
``../horizon-api`` service
Accepts and responds to end user compute API calls...

View File

@ -1,17 +1,9 @@
====================================
openstack service installation guide
====================================
=================================
Heat Dashboard installation guide
=================================
.. toctree::
:maxdepth: 2
:maxdepth: 1
get_started.rst
install.rst
verify.rst
next-steps.rst
The openstack service (Heat Dashboard) provides...
This chapter assumes a working setup of OpenStack following the
`OpenStack Installation Tutorial
<https://docs.openstack.org/project-install-guide/ocata/>`_.
installation
uninstallation

View File

@ -1,34 +0,0 @@
.. _install-obs:
Install and configure for openSUSE and SUSE Linux Enterprise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the openstack service
for openSUSE Leap 42.1 and SUSE Linux Enterprise Server 12 SP1.
.. include:: common_prerequisites.rst
Install and configure components
--------------------------------
#. Install the packages:
.. code-block:: console
# zypper --quiet --non-interactive install
.. include:: common_configure.rst
Finalize installation
---------------------
Start the openstack services and configure them to start when
the system boots:
.. code-block:: console
# systemctl enable openstack-../horizon-api.service
# systemctl start openstack-../horizon-api.service

View File

@ -1,33 +0,0 @@
.. _install-rdo:
Install and configure for Red Hat Enterprise Linux and CentOS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the openstack service
for Red Hat Enterprise Linux 7 and CentOS 7.
.. include:: common_prerequisites.rst
Install and configure components
--------------------------------
#. Install the packages:
.. code-block:: console
# yum install
.. include:: common_configure.rst
Finalize installation
---------------------
Start the openstack services and configure them to start when
the system boots:
.. code-block:: console
# systemctl enable openstack-../horizon-api.service
# systemctl start openstack-../horizon-api.service

View File

@ -1,31 +0,0 @@
.. _install-ubuntu:
Install and configure for Ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the openstack
service for Ubuntu 14.04 (LTS).
.. include:: common_prerequisites.rst
Install and configure components
--------------------------------
#. Install the packages:
.. code-block:: console
# apt-get update
# apt-get install
.. include:: common_configure.rst
Finalize installation
---------------------
Restart the openstack services:
.. code-block:: console
# service openstack-../horizon-api restart

View File

@ -1,20 +0,0 @@
.. _install:
Install and configure
~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the
openstack service, code-named ../horizon, on the controller node.
This section assumes that you already have a working OpenStack
environment with at least the following components installed:
.. (add the appropriate services here and further notes)
Note that installation and configuration vary by distribution.
.. toctree::
:maxdepth: 2
install-obs.rst
install-rdo.rst
install-ubuntu.rst

View File

@ -0,0 +1,5 @@
============
Installation
============
.. include:: installation_contents.rst

View File

@ -0,0 +1,48 @@
Use Heat Dashboard in DevStack
------------------------------
Set up your ``local.conf`` to enable heat-dashboard::
[[local|localrc]]
enable_plugin heat-dashboard https://git.openstack.org/openstack/heat-dashboard
Manual Installation
-------------------
Clone both Horizon and Heat Dashboard repositories::
git clone https://github.com/openstack/horizon
git clone https://github.com/openstack/heat-dashboard
Create a virtual environment and install Horizon relevant packages::
pip install -r horizon/requirements.txt
Create your ``local_settings.py`` file::
cp horizon/openstack_dashboard/local/local_settings.py.example \
horizon/openstack_dashboard/local/local_settings.py
Open newly created ``local_settings.py`` with your text editor,
and set some parameter to connect to your OpenStack environment:
- Set ``OPENSTACK_HOST`` as hostname or IP address of your OpenStack server.
- Verify that the ``OPENSTACK_KEYSTONE_URL`` and
``OPENSTACK_KEYSTONE_DEFAULT_ROLE`` settings are correct for your
environment. (They should be correct unless you modified your
OpenStack server to change them.)
Enable heat-dashboard plugin in your Horizon environment::
cp heat-dashboard/heat_dashboard/enabled/* \
horizon/openstack_dashboard/local/enabled
Finally you can launch Horizon with Heat Dashboard plugin::
cd horizon
python manage.py runserver 0.0.0.0:8080
Now you can connect to your Horizon including Heat Dashboard plugin
from your browser with URL http://localhost:8080/.

View File

@ -1,9 +0,0 @@
.. _next-steps:
Next steps
~~~~~~~~~~
Your OpenStack environment now includes the ../horizon service.
To add additional services, see
https://docs.openstack.org/project-install-guide/ocata/.

View File

@ -0,0 +1,14 @@
==============
Uninstallation
==============
To uninstall this plugin, use ``pip uninstall heat-dashboard``
in your Horizon's virtual environment.
You also need to remove following files::
_1610_project_orchestration_panel.py
_1620_project_stacks_panel.py
_1630_project_resource_types_panel.py
_1640_project_template_versions_panel.py
_1650_project_template_generator_panel.py

View File

@ -1,24 +0,0 @@
.. _verify:
Verify operation
~~~~~~~~~~~~~~~~
Verify operation of the openstack service.
.. note::
Perform these commands on the controller node.
#. Source the ``admin`` project credentials to gain access to
admin-only CLI commands:
.. code-block:: console
$ . admin-openrc
#. List service components to verify successful launch and registration
of each process:
.. code-block:: console
$ openstack openstack service list

View File

@ -1,7 +0,0 @@
========
Usage
========
To use openstack in a project::
import ../horizon

View File

@ -1,5 +0,0 @@
==========
References
==========
References of openstack.

View File

@ -1,5 +0,0 @@
===========
Users guide
===========
Users guide of openstack.

View File

@ -1,8 +0,0 @@
from django.utils.translation import ugettext_lazy as _
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
PANEL_GROUP = 'orchestration'
# The display name of the PANEL_GROUP. Required.
PANEL_GROUP_NAME = _('Orchestration')
# The slug of the dashboard the PANEL_GROUP associated with. Required.
PANEL_GROUP_DASHBOARD = 'project'

View File

@ -410,7 +410,7 @@ class StackTests(test.TestCase):
self.assertTemplateUsed(res, 'project/stacks/create.html')
# ensure the fields were rendered correctly
if django.VERSION >= (1, 10):
if (1, 10) <= django.VERSION < (2, 0):
pattern = ('<input class="form-control" '
'id="id___param_public_string" '
'name="__param_public_string" type="text" required/>')
@ -587,7 +587,7 @@ class StackTests(test.TestCase):
self.assertTemplateUsed(res, 'project/stacks/create.html')
# ensure the fields were rendered correctly
if django.VERSION >= (1, 10):
if (1, 10) <= django.VERSION < (2, 0):
input_str = ('<input class="form-control" '
'id="id___param_param{0}" '
'name="__param_param{0}" type="{1}" required/>')
@ -596,20 +596,25 @@ class StackTests(test.TestCase):
'id="id___param_param{0}" '
'name="__param_param{0}" type="{1}"/>')
self.assertContains(res, input_str.format(1, 'text'), html=True)
self.assertContains(
res,
'<input autocomplete="off" class="form-control" '
'id="id___param_param2" name="__param_param2" '
'type="number"/>',
html=True)
self.assertContains(res, input_str.format(3, 'text'), html=True)
self.assertContains(res, input_str.format(4, 'text'), html=True)
self.assertContains(
res,
'<input id="id___param_param5" name="__param_param5" '
'type="checkbox">',
html=True)
if (1, 11) <= django.VERSION < (2, 0):
input_str_param2 = ('<input type="number" name="__param_param2" '
'autocomplete="off" '
'required class="form-control" '
'id="id___param_param2" />')
elif (1, 10) <= django.VERSION < (1, 11):
input_str_param2 = ('<input autocomplete="off" '
'class="form-control" id="id___param_param2" '
'name="__param_param2" type="number" '
'required />')
else:
input_str_param2 = ('<input autocomplete="off" '
'class ="form-control" '
'id="id___param_param2" '
'name="__param_param2" type="number" />')
self.assertContains(res, input_str_param2, html=True)
# post some sample data and make sure it validates
url = reverse('horizon:project:stacks:launch')

View File

@ -8,62 +8,4 @@
#
# PBR should always appear first
pbr!=2.1.0,>=2.0.0 # Apache-2.0
# Horizon Core Requirements
Babel!=2.4.0,>=2.3.4 # BSD
Django<2.0,>=1.8 # BSD
Pint>=0.5 # BSD
django-babel>=0.5.1 # BSD
django-compressor>=2.0 # MIT
django-openstack-auth>=3.5.0 # Apache-2.0
django-pyscss>=2.0.2 # BSD License (2 clause)
futurist!=0.15.0,>=0.11.0 # Apache-2.0
iso8601>=0.1.11 # MIT
netaddr!=0.7.16,>=0.7.13 # BSD
oslo.concurrency>=3.8.0 # Apache-2.0
oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0
oslo.i18n!=3.15.2,>=2.1.0 # Apache-2.0
oslo.policy>=1.23.0 # Apache-2.0
oslo.serialization!=2.19.1,>=1.10.0 # Apache-2.0
oslo.utils>=3.20.0 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0
pymongo!=3.1,>=3.0.2 # Apache-2.0
pyScss!=1.3.5,>=1.3.4 # MIT License
python-cinderclient>=3.1.0 # Apache-2.0
python-glanceclient>=2.8.0 # Apache-2.0
python-heatclient>=1.6.1 # Apache-2.0
python-keystoneclient>=3.8.0 # Apache-2.0
python-neutronclient>=6.3.0 # Apache-2.0
python-novaclient>=9.0.0 # Apache-2.0
python-swiftclient>=3.2.0 # Apache-2.0
pytz>=2013.6 # MIT
PyYAML>=3.10.0 # MIT
semantic-version>=2.3.1 # BSD
six>=1.9.0 # MIT
XStatic>=1.0.0 # MIT License
XStatic-Angular>=1.5.8.0 # MIT License
XStatic-Angular-Bootstrap>=2.2.0.0 # MIT License
XStatic-Angular-FileUpload>=12.0.4.0 # MIT License
XStatic-Angular-Gettext>=2.3.8.0 # MIT License
XStatic-Angular-lrdragndrop>=1.0.2.2 # MIT License
XStatic-Angular-Schema-Form>=0.8.13.0 # MIT
XStatic-Bootstrap-Datepicker>=1.3.1.0 # Apache 2.0 License
XStatic-Bootstrap-SCSS>=3.3.7.1 # Apache 2.0 License
XStatic-bootswatch>=3.3.7.0 # MIT License
XStatic-D3>=3.5.17.0 # BSD License (3 clause)
XStatic-Hogan>=2.0.0.2 # Apache 2.0 License
XStatic-Font-Awesome>=4.7.0 # SIL OFL 1.1 License, MIT License
XStatic-Jasmine>=2.4.1.1 # MIT License
XStatic-jQuery>=1.8.2.1 # MIT License
XStatic-JQuery-Migrate>=1.2.1.1 # MIT License
XStatic-JQuery.quicksearch>=2.0.3.1 # MIT License
XStatic-JQuery.TableSorter>=2.14.5.1 # MIT License
XStatic-jquery-ui>=1.10.4.1 # MIT License
XStatic-JSEncrypt>=2.3.1.1 # MIT License
XStatic-mdi>=1.4.57.0 # SIL OPEN FONT LICENSE Version 1.1
XStatic-objectpath>=1.2.1.0 # MIT
XStatic-Rickshaw>=1.5.0.0 # BSD License (prior)
XStatic-roboto-fontface>=0.5.0.0 # Apache 2.0 License
XStatic-smart-table>=1.4.13.2 # MIT License
XStatic-Spin>=1.2.5.2 # MIT License
XStatic-term.js>=0.0.7.0 # MIT License
XStatic-tv4>=1.2.7.0 # MIT

View File

@ -23,9 +23,7 @@ nosexcover # BSD
openstack.nose-plugin>=0.7 # Apache-2.0
openstackdocstheme>=1.16.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
selenium>=2.50.1 # Apache-2.0
sphinx>=1.6.2 # BSD
testtools>=1.4.0 # MIT
# This also needs xvfb library installed on your OS
xvfbwrapper>=0.1.3 #license: MIT
http://tarballs.openstack.org/horizon/horizon-master.tar.gz#egg=horizon

114
tox.ini
View File

@ -1,13 +1,13 @@
[tox]
envlist = pep8,py27dj18,releasenotes,docs,npm
envlist = py27dj18,py27dj19,py27dj110,py27dj111,py35dj18,py35dj19,py35dj110,py35dj111,pep8,releasenotes
minversion = 2.3.2
skipsdist = True
[testenv]
usedevelop = True
install_command = {toxinidir}/tools/pip_install.sh \
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \
{opts} {packages}
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \
{opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
INTEGRATION_TESTS=0
@ -16,71 +16,91 @@ setenv =
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
whitelist_externals =
bash
find
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
py27: {[unit_tests]commands}
[testenv:py27dj18]
commands =
pip install -U django>=1.8,<1.9
{[unit_tests]commands}
;[testenv:py27dj19]
;commands =
; pip install -U django>=1.9,<1.10
; {[unit_tests]commands}
;
;[testenv:py27dj110]
;commands =
; pip install -U django>=1.10,<1.11
; {[unit_tests]commands}
;
;[testenv:py27dj111]
;commands =
; pip install -U django>=1.11,<2.0
; {[unit_tests]commands}
py35: {[unit_tests]commands}
[unit_tests]
commands =
find . -type f -name "*.pyc" -delete
python manage.py test {posargs} heat_dashboard.test.tests --settings=heat_dashboard.test.settings
; bash {toxinidir}/tools/unit_tests.sh {envpython} {toxinidir} {posargs}
commands = python manage.py test heat_dashboard.test --settings=heat_dashboard.test.settings
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
coverage erase
coverage run --source=heat_dashboard {toxinidir}/manage.py test heat_dashboard.test.tests --settings=heat_dashboard.test.settings {posargs}
; coverage run -a {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests {posargs}
coverage xml
coverage html
;[testenv:npm]
;passenv =
; HOME
; DISPLAY
;commands =
; nodeenv -p
; npm install
; npm run {posargs:test}
[testenv:py27dj18]
basepython = python2.7
commands =
pip install django>=1.8,<1.9
{[unit_tests]commands}
[testenv:py27dj19]
basepython = python2.7
commands =
pip install django>=1.9,<1.10
{[unit_tests]commands}
[testenv:py27dj110]
basepython = python2.7
commands =
pip install django>=1.10,<1.11
{[unit_tests]commands}
[testenv:py27dj111]
basepython = python2.7
commands =
pip install django>=1.11,<2.0
{[unit_tests]commands}
[testenv:py35]
basepython = python3.5
commands = {[unit_tests]commands}
[testenv:py35dj18]
basepython = python3.5
commands =
pip install django>=1.8,<1.9
{[unit_tests]commands}
[testenv:py35dj19]
basepython = python3.5
commands =
pip install django>=1.9,<1.10
{[unit_tests]commands}
[testenv:py35dj110]
basepython = python3.5
commands =
pip install django>=1.10,<1.11
{[unit_tests]commands}
[testenv:py35dj111]
basepython = python3.5
commands =
pip install django>=1.11,<2.0
{[unit_tests]commands}
[testenv:docs]
commands =
doc8 doc/source
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
commands =
doc8 releasenotes/source releasenotes/notes
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[hacking]
local-check-factory = horizon.hacking.checks.factory
[flake8]
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
max-complexity = 20