diff --git a/.gitreview b/.gitreview new file mode 100644 index 00000000..305007e7 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/heat-dashboard.git +defaultbranch=master diff --git a/README.rst b/README.rst index caa98de1..aff004e5 100644 --- a/README.rst +++ b/README.rst @@ -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/. diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 00000000..1039ae72 --- /dev/null +++ b/devstack/plugin.sh @@ -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 diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 00000000..f9caaf7c --- /dev/null +++ b/devstack/settings @@ -0,0 +1,2 @@ +# settings file for heat-dashboard plugin +enable_service heat-dashboard diff --git a/doc/source/admin/index.rst b/doc/source/admin/index.rst deleted file mode 100644 index 5a2500d7..00000000 --- a/doc/source/admin/index.rst +++ /dev/null @@ -1,5 +0,0 @@ -==================== -Administrators guide -==================== - -Administrators guide of openstack. diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst deleted file mode 100644 index 53d63e31..00000000 --- a/doc/source/cli/index.rst +++ /dev/null @@ -1,5 +0,0 @@ -================================ -Command line interface reference -================================ - -CLI reference of openstack. diff --git a/doc/source/configuration/configuration.rst b/doc/source/configuration/configuration.rst new file mode 100644 index 00000000..d6286ed3 --- /dev/null +++ b/doc/source/configuration/configuration.rst @@ -0,0 +1,10 @@ +============= +Configuration +============= + +Heat Dashboard has no configuration option. + +For more configurations, see +`Configuration Guide `_ +in the Horizon documentation. + diff --git a/doc/source/configuration/index.rst b/doc/source/configuration/index.rst index b0d51edd..31b3869c 100644 --- a/doc/source/configuration/index.rst +++ b/doc/source/configuration/index.rst @@ -1,5 +1,8 @@ -============= -Configuration -============= +================================== +heat-dashboard configuration guide +================================== -Configuration of openstack. +.. toctree:: + :maxdepth: 1 + + configuration diff --git a/doc/source/contributor/contributing.rst b/doc/source/contributor/contributing.rst index 2aa07077..66860f38 100644 --- a/doc/source/contributor/contributing.rst +++ b/doc/source/contributor/contributing.rst @@ -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 + diff --git a/doc/source/index.rst b/doc/source/index.rst index 35483b35..61f749b2 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -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 ================== diff --git a/doc/source/install/common_configure.rst b/doc/source/install/common_configure.rst deleted file mode 100644 index 725d34b2..00000000 --- a/doc/source/install/common_configure.rst +++ /dev/null @@ -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 diff --git a/doc/source/install/common_prerequisites.rst b/doc/source/install/common_prerequisites.rst deleted file mode 100644 index 9f873b70..00000000 --- a/doc/source/install/common_prerequisites.rst +++ /dev/null @@ -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 diff --git a/doc/source/install/get_started.rst b/doc/source/install/get_started.rst deleted file mode 100644 index 4686529e..00000000 --- a/doc/source/install/get_started.rst +++ /dev/null @@ -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... diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index c915bc78..a2039870 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -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 -`_. + installation + uninstallation diff --git a/doc/source/install/install-obs.rst b/doc/source/install/install-obs.rst deleted file mode 100644 index 3f60ed62..00000000 --- a/doc/source/install/install-obs.rst +++ /dev/null @@ -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 diff --git a/doc/source/install/install-rdo.rst b/doc/source/install/install-rdo.rst deleted file mode 100644 index e01bd535..00000000 --- a/doc/source/install/install-rdo.rst +++ /dev/null @@ -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 diff --git a/doc/source/install/install-ubuntu.rst b/doc/source/install/install-ubuntu.rst deleted file mode 100644 index f7ace76c..00000000 --- a/doc/source/install/install-ubuntu.rst +++ /dev/null @@ -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 diff --git a/doc/source/install/install.rst b/doc/source/install/install.rst deleted file mode 100644 index 5cdc5ece..00000000 --- a/doc/source/install/install.rst +++ /dev/null @@ -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 diff --git a/doc/source/install/installation.rst b/doc/source/install/installation.rst new file mode 100644 index 00000000..3ff67f8e --- /dev/null +++ b/doc/source/install/installation.rst @@ -0,0 +1,5 @@ +============ +Installation +============ + +.. include:: installation_contents.rst diff --git a/doc/source/install/installation_contents.rst b/doc/source/install/installation_contents.rst new file mode 100644 index 00000000..ef4da0a9 --- /dev/null +++ b/doc/source/install/installation_contents.rst @@ -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/. diff --git a/doc/source/install/next-steps.rst b/doc/source/install/next-steps.rst deleted file mode 100644 index 0ebe1ef3..00000000 --- a/doc/source/install/next-steps.rst +++ /dev/null @@ -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/. diff --git a/doc/source/install/uninstallation.rst b/doc/source/install/uninstallation.rst new file mode 100644 index 00000000..12c4541d --- /dev/null +++ b/doc/source/install/uninstallation.rst @@ -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 diff --git a/doc/source/install/verify.rst b/doc/source/install/verify.rst deleted file mode 100644 index bb6f8ebc..00000000 --- a/doc/source/install/verify.rst +++ /dev/null @@ -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 diff --git a/doc/source/library/index.rst b/doc/source/library/index.rst deleted file mode 100644 index f7856227..00000000 --- a/doc/source/library/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -======== -Usage -======== - -To use openstack in a project:: - - import ../horizon diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst deleted file mode 100644 index 676ddd01..00000000 --- a/doc/source/reference/index.rst +++ /dev/null @@ -1,5 +0,0 @@ -========== -References -========== - -References of openstack. diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst deleted file mode 100644 index d7509c71..00000000 --- a/doc/source/user/index.rst +++ /dev/null @@ -1,5 +0,0 @@ -=========== -Users guide -=========== - -Users guide of openstack. diff --git a/heat_dashboard/enabled/_1610_orchestration_panel_group.py b/heat_dashboard/enabled/_1610_orchestration_panel_group.py deleted file mode 100644 index 986879ca..00000000 --- a/heat_dashboard/enabled/_1610_orchestration_panel_group.py +++ /dev/null @@ -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' diff --git a/heat_dashboard/test/tests/content/test_stacks.py b/heat_dashboard/test/tests/content/test_stacks.py index 3f5f7600..0d3d84e3 100644 --- a/heat_dashboard/test/tests/content/test_stacks.py +++ b/heat_dashboard/test/tests/content/test_stacks.py @@ -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 = ('') @@ -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 = ('') @@ -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, - '', - 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, - '', - html=True) + + if (1, 11) <= django.VERSION < (2, 0): + input_str_param2 = ('') + elif (1, 10) <= django.VERSION < (1, 11): + input_str_param2 = ('') + else: + input_str_param2 = ('') + self.assertContains(res, input_str_param2, html=True) # post some sample data and make sure it validates url = reverse('horizon:project:stacks:launch') diff --git a/requirements.txt b/requirements.txt index 9c2385ff..1da26438 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index 41de00e0..e5a8959a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini index 4b358467..2e2f99ea 100644 --- a/tox.ini +++ b/tox.ini @@ -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