Rework akanda-horizon packaging
This is a rework of the repository packaging to: * Renames project to akanda-horizon * Moves all code to akanda_horizon module * Updates setup.cfg/setup.py for PBR * Moves openstack extensions to a subdir This updates setup.cfg/.py for pbr, renames the project to akanda-horizon and moves dashboard extensions into a subdirectory. Change-Id: I5cb1dad2e7dd7f47d0bac2ac39bdf34348fa6240
This commit is contained in:
parent
2874515c22
commit
768494667a
42
.gitignore
vendored
42
.gitignore
vendored
@ -1,12 +1,36 @@
|
||||
.coverage
|
||||
*.py[co]
|
||||
*.sw[po]
|
||||
*.pyc
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
.venv
|
||||
dropin.cache
|
||||
.tox
|
||||
build
|
||||
dist
|
||||
fpm.log*
|
||||
packages/
|
||||
build
|
||||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
||||
# Packaging output
|
||||
*.deb
|
||||
|
||||
# pbr output
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
|
||||
test.conf
|
||||
|
@ -3,13 +3,13 @@
|
||||
1. Install module
|
||||
|
||||
```
|
||||
pip install akanda-rug-horizon
|
||||
pip install akanda-horizon
|
||||
```
|
||||
|
||||
2. Copy extension files from the project root folder to ```/etc/openstack_dashboard/local/enabled``` or to ```/opt/stack/horizon/openstack_dashboard/local/enabled``` folder
|
||||
|
||||
```
|
||||
cp _80_admin_rug.py _81_admin_rug_rugrouters.py _82_admin_rug_rugtenants.py /opt/stack/horizon/openstack_dashboard/local/enabled/
|
||||
cp openstack_dashboard_extensions/*.py /opt/stack/horizon/openstack_dashboard/local/enabled/
|
||||
```
|
||||
|
||||
3. Specify rug management prefix, rug api port, and router image uuid in ```local_setting.py```
|
||||
|
35
akanda_horizon/__init__.py
Normal file
35
akanda_horizon/__init__.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright 2014 DreamHost, LLC
|
||||
#
|
||||
# Author: DreamHost, LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
# Copyright 2014 DreamHost, LLC
|
||||
#
|
||||
# Author: DreamHost, LLC
|
||||
#
|
||||
# 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__('pkg_resources').declare_namespace(__name__)
|
@ -7,7 +7,7 @@ from horizon import messages
|
||||
|
||||
from openstack_dashboard.dashboards.project.images import utils
|
||||
|
||||
from rug_openstack_dashboard.api.rug import RugClient
|
||||
from akanda_horizon.rug_openstack_dashboard.api.rug import RugClient
|
||||
|
||||
|
||||
rc = RugClient()
|
@ -4,7 +4,7 @@ from django.utils.translation import ungettext_lazy
|
||||
from horizon import exceptions
|
||||
from horizon import tables
|
||||
|
||||
from rug_openstack_dashboard.api.rug import RugClient
|
||||
from akanda_horizon.rug_openstack_dashboard.api.rug import RugClient
|
||||
|
||||
|
||||
rc = RugClient()
|
@ -1,7 +1,8 @@
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
from rug_openstack_dashboard.dashboards.admin.rugrouters import views
|
||||
from akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugrouters \
|
||||
import views
|
||||
|
||||
ROUTERS = r'^(?P<router_id>[^/]+)/%s$'
|
||||
|
@ -8,11 +8,11 @@ from horizon import exceptions
|
||||
|
||||
from openstack_dashboard import api
|
||||
|
||||
from rug_openstack_dashboard.dashboards.admin.rugrouters import \
|
||||
from akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugrouters import \
|
||||
tables as router_tables
|
||||
from rug_openstack_dashboard.dashboards.admin.rugrouters import \
|
||||
from akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugrouters import \
|
||||
forms as rugrouters_forms
|
||||
from rug_openstack_dashboard.api.rug import RugClient
|
||||
from akanda_horizon.rug_openstack_dashboard.api.rug import RugClient
|
||||
|
||||
|
||||
rc = RugClient()
|
@ -5,7 +5,7 @@ from django.utils.translation import ungettext_lazy
|
||||
from horizon import tables
|
||||
from horizon import exceptions
|
||||
|
||||
from rug_openstack_dashboard.api.rug import RugClient
|
||||
from akanda_horizon.rug_openstack_dashboard.api.rug import RugClient
|
||||
|
||||
|
||||
rc = RugClient()
|
@ -1,7 +1,8 @@
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
from rug_openstack_dashboard.dashboards.admin.rugtenants import views
|
||||
from akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugtenants \
|
||||
import views
|
||||
|
||||
TENANT = r'^(?P<tenant_id>[^/]+)/%s$'
|
||||
|
@ -10,11 +10,11 @@ from horizon import forms
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard import policy
|
||||
|
||||
from rug_openstack_dashboard.dashboards.admin.rugtenants import \
|
||||
tables as tenant_tables
|
||||
from rug_openstack_dashboard.dashboards.admin.rugrouters import \
|
||||
forms as rugrouters_forms
|
||||
from rug_openstack_dashboard.api.rug import RugClient
|
||||
from akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugtenants \
|
||||
import tables as tenant_tables
|
||||
from akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugrouters \
|
||||
import forms as rugrouters_forms
|
||||
from akanda_horizon.rug_openstack_dashboard.api.rug import RugClient
|
||||
|
||||
|
||||
rc = RugClient()
|
@ -7,4 +7,4 @@ PANEL_GROUP = 'rug'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = \
|
||||
'rug_openstack_dashboard.dashboards.admin.rugrouters.panel.Rugrouters'
|
||||
'akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugrouters.panel.Rugrouters'
|
@ -6,5 +6,7 @@ PANEL_DASHBOARD = 'admin'
|
||||
PANEL_GROUP = 'rug'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = \
|
||||
'rug_openstack_dashboard.dashboards.admin.rugtenants.panel.Rugtenants'
|
||||
ADD_PANEL = (
|
||||
'akanda_horizon.rug_openstack_dashboard.dashboards.admin.rugtenants.'
|
||||
'panel.Rugtenants')
|
||||
|
43
setup.cfg
Normal file
43
setup.cfg
Normal file
@ -0,0 +1,43 @@
|
||||
[metadata]
|
||||
name = akanda-horizon
|
||||
version = 2015.1
|
||||
summary = Akanda plugin for Horizon
|
||||
description-file =
|
||||
README.md
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://github.com/stackforge/akanda-horizon
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 2.6
|
||||
|
||||
|
||||
[files]
|
||||
packages =
|
||||
akanda_horizon
|
||||
akanda_horizon.rug_openstack_dashboard
|
||||
namespace_packages =
|
||||
akanda_horizon
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
build-dir = doc/build
|
||||
source-dir = doc/source
|
||||
|
||||
[nosetests]
|
||||
where = test
|
||||
verbosity = 2
|
||||
detailed-errors = 1
|
||||
cover-package = akanda_horizon
|
30
setup.py
30
setup.py
@ -1,12 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
from setuptools import setup, find_packages
|
||||
# Copyright 2015 Akanda, Inc
|
||||
#
|
||||
# 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.
|
||||
|
||||
setup(
|
||||
name='akanda-rug-horizon',
|
||||
version='0.1',
|
||||
packages=find_packages("akanda"),
|
||||
package_dir={'': 'akanda'},
|
||||
install_requires=[
|
||||
'requests',
|
||||
],
|
||||
)
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
|
1
test/README.md
Symbolic link
1
test/README.md
Symbolic link
@ -0,0 +1 @@
|
||||
./README.md
|
Loading…
Reference in New Issue
Block a user