diff --git a/.gitignore b/.gitignore index 51cbe85..fc8c7d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,54 +1,28 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -bin/ -build/ -develop-eggs/ -dist/ -eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ +*.pyc +*.swp +*.sqlite3 +.environment_version +.selenium_log +.coverage* +.noseids +.DS_STORE +*.egg/ *.egg-info/ -.installed.cfg -*.egg - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.cache -nosetests.xml coverage.xml - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Rope -.ropeproject - -# Django stuff: -*.log -*.pot - -# Sphinx documentation -docs/_build/ - +nosetests.xml +pep8.txt +pylint.txt +reports +horizon.egg-info +.secret_key_store +doc/build/ +doc/source/sourcecode +/static/ +.venv +.tox +build +dist +AUTHORS +ChangeLog +tags +openstack_dashboard/dummydb.sqlite diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..a7b7898 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=stackforge/solum-dashboard.git diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..da66af1 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,7 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ + OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ + OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ + ${PYTHON:-python} -m subunit.run discover solumdashboard/tests $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 0000000..e60cc18 --- /dev/null +++ b/HACKING.rst @@ -0,0 +1,4 @@ +Solum Style Commandments +======================== + +Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ diff --git a/LICENSE b/LICENSE index ad410e1..67db858 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -172,30 +173,3 @@ Apache License defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..dae7156 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,11 @@ +include AUTHORS +include README.rst +include ChangeLog +include LICENSE + +include solumdashboard/templates/**.html + +exclude .gitignore +exclude .gitreview + +global-exclude *.pyc diff --git a/README.md b/README.md deleted file mode 100644 index f3454b3..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -solum-horizon -============= - -Horizon plugin for Solum diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..2fa43fc --- /dev/null +++ b/README.rst @@ -0,0 +1,6 @@ +solum-dashboard +=============== + +Horizon plugin for Solum +Purpose of this plugin is to add Solum capabilities to the openstack dashboard. +This plugin requires a working openstack install including solum and horizon. diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..7d49b1c --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import sys + +sys.path.insert(0, os.path.abspath('../..')) +# -- General configuration ---------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'oslosphinx', +] + +# autodoc generation is a bit aggressive and a nuisance when doing heavy +# text edit cycles. +# execute "export SPHINX_DEBUG=1" in your terminal to disable + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'solum-dashboard' +copyright = u'2013, OpenStack Foundation' + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +add_module_names = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +# html_theme = '_theme' +html_static_path = ['_static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = '%sdoc' % project + +# -- Options for manual page output ------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [] + +# If true, show URL addresses after external links. +man_show_urls = True + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..980aa4b --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,4 @@ + +Welcome to solum-dashboard's documentation! +=========================================== + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a92dccf --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +pbr>=0.6,!=0.7,<1.0 +# Horizon Core Requirements +Django>=1.4,<1.7 +django_compressor>=1.3 +django_openstack_auth>=1.1.4 +eventlet>=0.13.0 +iso8601>=0.1.9 +netaddr>=0.7.6 +python-keystoneclient>=0.7.0 +pytz>=2010h +# Horizon Utility Requirements +# for SECURE_KEY generation +lockfile>=0.8 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..e907232 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,31 @@ +[metadata] +name = solum-dashboard +version = 1 +summary = Solum Dashboard +description-file = README.rst +license = Apache Software License +classifier = + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 2.6 + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux +author = OpenStack +author-email = openstack-dev@lists.openstack.org +home-page = http://docs.openstack.org/developer/solum + +[global] +setup-hooks = pbr.hooks.setup_hook + +[files] +packages = + solumdashboard + +[build_sphinx] +source-dir = doc/source +build-dir = doc/build +all_files = 1 diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..186fa00 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import setuptools + +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/solumdashboard/__init__.py b/solumdashboard/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/solumdashboard/tests/__init__.py b/solumdashboard/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/solumdashboard/version.py b/solumdashboard/version.py new file mode 100644 index 0000000..d9df8f9 --- /dev/null +++ b/solumdashboard/version.py @@ -0,0 +1,18 @@ +# Copyright (c) 2014 Rackspace Hosting. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pbr import version + +version_info = version.VersionInfo('solum-dashboard') diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..3c02a5e --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,16 @@ +hacking>=0.8.0,<0.9 + +coverage>=3.6 +discover +mock>=1.0 +oslo.config>=1.2.0 +pylint==0.25.2 +selenium +sphinx>=1.1.2,<1.2 +oslosphinx +sphinxcontrib-pecanwsme>=0.6 +sphinxcontrib-httpdomain +docutils==0.9.1 +testrepository>=0.0.18 +testtools>=0.9.34 +unittest2 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..d5345fb --- /dev/null +++ b/tox.ini @@ -0,0 +1,36 @@ +[tox] +minversion = 1.6 +skipsdist = True +envlist = py26,py27,py33,pypy,pep8 + +[testenv] +usedevelop = True +install_command = pip install -U {opts} {packages} +setenv = + VIRTUAL_ENV={envdir} +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +[testenv:uitests] +commands = python setup.py testr --slowest --testr-args="--concurrency 1 {posargs}" + +[testenv:cover] +commands = python setup.py testr --coverage --testr-args='--concurrency 1 {posargs}' + +[tox:jenkins] +downloadcache = ~/cache/pip + +[testenv:pep8] +commands = flake8 + +[testenv:venv] +commands = {posargs} + +[flake8] +show-source = true +builtins = _ +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,horizon + +[hacking] +import_exceptions = django.utils.translation.ugettext