Rename python package to freezer_ui
While current package name "disaster_recovery" is a valid slug inside of the Horizon, when it comes to the Python package naming, it is not conforming with Horizon Dashboard naming pattern, where all existing dashboard packages end their names on `dashboard` or `ui`. Current naming might break Horizon installation logic by some common deployment tools, like OpenStack-Ansible. To prevent that we rename the package given the opportunity, that project is currently in Inactive state and major changes can be made to it. Change-Id: I965b545b6aada866ab5c6eb2279154b70bc5dff1
This commit is contained in:
parent
5c90c800a6
commit
50b6486df9
@ -59,11 +59,11 @@ To install freezer dashboard for development you need to do the following::
|
||||
|
||||
# cd freezer-web-ui
|
||||
|
||||
# cp freezer-web-ui/disaster_recovery/enabled/_5050_freezer.py /opt/stack/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
||||
# cp freezer-web-ui/freezer_ui/enabled/_5050_freezer.py /opt/stack/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
||||
|
||||
# to disable the panel just copy the following file
|
||||
|
||||
# cp freezer-web-ui/disaster_recovery/enabled/_7050_freezer_remove_panel_.py /opt/stack/horizon/openstack_dashboard/enabled/_7050_freezer_remove_panel_.py
|
||||
# cp freezer-web-ui/freezer_ui/enabled/_7050_freezer_remove_panel_.py /opt/stack/horizon/openstack_dashboard/enabled/_7050_freezer_remove_panel_.py
|
||||
|
||||
# cd /opt/stack/horizon/
|
||||
|
||||
@ -82,11 +82,11 @@ To deploy freezer dashboard in production you need to do the following::
|
||||
|
||||
# cd freezer-web-ui
|
||||
|
||||
# cp freezer-web-ui/disaster_recovery/enabled/_5050_freezer.py /opt/stack/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
||||
# cp freezer-web-ui/freezer_ui/enabled/_5050_freezer.py /opt/stack/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
||||
|
||||
# to disable the panel just copy the following file
|
||||
|
||||
# cp freezer-web-ui/disaster_recovery/enabled/_7050_freezer_remove_panel_.py /opt/stack/horizon/openstack_dashboard/enabled/_7050_freezer_remove_panel_.py
|
||||
# cp freezer-web-ui/freezer_ui/enabled/_7050_freezer_remove_panel_.py /opt/stack/horizon/openstack_dashboard/enabled/_7050_freezer_remove_panel_.py
|
||||
|
||||
# make sure freezer is installed from source as detailed in the first step
|
||||
|
||||
|
@ -16,7 +16,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from disaster_recovery import dashboard
|
||||
from freezer_ui import dashboard
|
||||
|
||||
|
||||
class ActionsPanel(horizon.Panel):
|
@ -17,7 +17,7 @@ from django.utils.translation import ngettext_lazy
|
||||
from horizon import tables
|
||||
from django.urls import reverse
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class DeleteAction(tables.DeleteAction):
|
@ -14,7 +14,7 @@
|
||||
|
||||
from django.urls import re_path
|
||||
|
||||
from disaster_recovery.actions import views
|
||||
from freezer_ui.actions import views
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
@ -19,11 +19,11 @@ from django.views import generic
|
||||
from horizon import tables
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
from disaster_recovery.actions import tables as freezer_tables
|
||||
from disaster_recovery.actions.workflows import action as action_workflow
|
||||
from disaster_recovery.utils import shield
|
||||
from freezer_ui.actions import tables as freezer_tables
|
||||
from freezer_ui.actions.workflows import action as action_workflow
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class IndexView(tables.DataTableView):
|
@ -19,7 +19,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class ActionConfigurationAction(workflows.Action):
|
@ -19,7 +19,7 @@ from django.conf import settings
|
||||
from horizon.utils.memoized import memoized # noqa
|
||||
from freezerclient import client as freezer_client
|
||||
|
||||
from disaster_recovery import utils
|
||||
from freezer_ui import utils
|
||||
|
||||
|
||||
LOG = log.getLogger(__name__)
|
@ -21,7 +21,7 @@ from django.views import generic
|
||||
from openstack_dashboard.api.rest import utils as rest_utils
|
||||
from openstack_dashboard.api.rest import utils
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
# https://github.com/tornadoweb/tornado/issues/1009
|
@ -18,7 +18,7 @@ URL patterns for the OpenStack Dashboard.
|
||||
|
||||
from django.urls import re_path
|
||||
|
||||
from disaster_recovery.api.rest import rest_api
|
||||
from freezer_ui.api.rest import rest_api
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^api/clients/$', rest_api.Clients.as_view(),
|
@ -16,7 +16,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from disaster_recovery import dashboard
|
||||
from freezer_ui import dashboard
|
||||
|
||||
|
||||
class BackupsPanel(horizon.Panel):
|
@ -20,9 +20,9 @@ from django.utils.translation import gettext_lazy as _
|
||||
from horizon import tables
|
||||
from horizon.utils import functions as utils
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
from disaster_recovery.utils import shield
|
||||
from disaster_recovery.utils import timestamp_to_string
|
||||
import freezer_ui.api.api as freezer_api
|
||||
from freezer_ui.utils import shield
|
||||
from freezer_ui.utils import timestamp_to_string
|
||||
|
||||
|
||||
class Restore(tables.LinkAction):
|
@ -15,7 +15,7 @@
|
||||
|
||||
from django.urls import re_path
|
||||
|
||||
from disaster_recovery.backups import views
|
||||
from freezer_ui.backups import views
|
||||
|
||||
|
||||
urlpatterns = [
|
@ -19,11 +19,11 @@ from django.views import generic
|
||||
from horizon import tables
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
from disaster_recovery.backups import tables as freezer_tables
|
||||
from disaster_recovery.backups.workflows import restore as restore_workflow
|
||||
from disaster_recovery.utils import shield
|
||||
from freezer_ui.backups import tables as freezer_tables
|
||||
from freezer_ui.backups.workflows import restore as restore_workflow
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class IndexView(tables.DataTableView):
|
@ -19,7 +19,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class DestinationAction(workflows.MembershipAction):
|
@ -16,7 +16,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from disaster_recovery import dashboard
|
||||
from freezer_ui import dashboard
|
||||
|
||||
|
||||
class ClientsPanel(horizon.Panel):
|
@ -16,8 +16,8 @@ from django.utils.translation import ngettext_lazy
|
||||
from horizon import tables
|
||||
from django.urls import reverse
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
from disaster_recovery.utils import shield
|
||||
import freezer_ui.api.api as freezer_api
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class Filter(tables.FilterAction):
|
@ -14,7 +14,7 @@
|
||||
|
||||
from django.urls import re_path
|
||||
|
||||
from disaster_recovery.clients import views
|
||||
from freezer_ui.clients import views
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
@ -17,10 +17,10 @@ from django.views import generic
|
||||
|
||||
from horizon import tables
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
from disaster_recovery.clients import tables as freezer_tables
|
||||
from disaster_recovery.utils import shield
|
||||
from freezer_ui.clients import tables as freezer_tables
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class IndexView(tables.DataTableView):
|
@ -6,5 +6,5 @@ DISABLED = False
|
||||
|
||||
# A list of applications to be added to INSTALLED_APPS.
|
||||
ADD_INSTALLED_APPS = [
|
||||
'disaster_recovery',
|
||||
'freezer_ui',
|
||||
]
|
@ -14,7 +14,7 @@
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from disaster_recovery.jobs import tables
|
||||
from freezer_ui.jobs import tables
|
||||
|
||||
from horizon import browsers
|
||||
|
@ -16,7 +16,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from disaster_recovery import dashboard
|
||||
from freezer_ui import dashboard
|
||||
|
||||
|
||||
class JobsPanel(horizon.Panel):
|
@ -20,8 +20,8 @@ from horizon import tables
|
||||
from horizon import messages
|
||||
from django.urls import reverse
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
from disaster_recovery.utils import shield
|
||||
import freezer_ui.api.api as freezer_api
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class ObjectFilterAction(tables.FilterAction):
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from django.urls import re_path
|
||||
from disaster_recovery.jobs import views
|
||||
from freezer_ui.jobs import views
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^(?P<job_id>[^/]+)?$',
|
@ -13,14 +13,14 @@
|
||||
from horizon import browsers
|
||||
from horizon import workflows
|
||||
|
||||
from disaster_recovery.jobs.workflows import create as configure_workflow
|
||||
from disaster_recovery.jobs.workflows import update_job as update_job_workflow
|
||||
from disaster_recovery.jobs.workflows import update_actions as update_workflow
|
||||
from freezer_ui.jobs.workflows import create as configure_workflow
|
||||
from freezer_ui.jobs.workflows import update_job as update_job_workflow
|
||||
from freezer_ui.jobs.workflows import update_actions as update_workflow
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import disaster_recovery.jobs.browsers as project_browsers
|
||||
import freezer_ui.api.api as freezer_api
|
||||
import freezer_ui.jobs.browsers as project_browsers
|
||||
|
||||
from disaster_recovery.utils import shield
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class JobsView(browsers.ResourceBrowserView):
|
@ -17,7 +17,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class ActionsConfigurationAction(workflows.Action):
|
@ -21,7 +21,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class ActionsConfigurationAction(workflows.Action):
|
@ -19,7 +19,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class ActionsConfigurationAction(workflows.Action):
|
@ -21,7 +21,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class InfoConfigurationAction(workflows.Action):
|
@ -14,7 +14,7 @@
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from disaster_recovery.sessions import tables
|
||||
from freezer_ui.sessions import tables
|
||||
|
||||
from horizon import browsers
|
||||
|
@ -17,7 +17,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
from disaster_recovery import dashboard
|
||||
from freezer_ui import dashboard
|
||||
|
||||
|
||||
class SessionsPanel(horizon.Panel):
|
@ -18,8 +18,8 @@ from django.urls import reverse
|
||||
|
||||
from horizon import tables
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
from disaster_recovery.utils import shield
|
||||
import freezer_ui.api.api as freezer_api
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class ObjectFilterAction(tables.FilterAction):
|
@ -14,7 +14,7 @@
|
||||
|
||||
from django.urls import re_path
|
||||
|
||||
from disaster_recovery.sessions import views
|
||||
from freezer_ui.sessions import views
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^(?P<session_id>[^/]+)?$',
|
@ -15,12 +15,12 @@
|
||||
from horizon import browsers
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import disaster_recovery.sessions.browsers as project_browsers
|
||||
import freezer_ui.api.api as freezer_api
|
||||
import freezer_ui.sessions.browsers as project_browsers
|
||||
|
||||
from disaster_recovery.sessions.workflows import attach
|
||||
from disaster_recovery.sessions.workflows import create
|
||||
from disaster_recovery.utils import shield
|
||||
from freezer_ui.sessions.workflows import attach
|
||||
from freezer_ui.sessions.workflows import create
|
||||
from freezer_ui.utils import shield
|
||||
|
||||
|
||||
class SessionsView(browsers.ResourceBrowserView):
|
@ -19,7 +19,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class SessionConfigurationAction(workflows.Action):
|
@ -22,7 +22,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import workflows
|
||||
|
||||
import disaster_recovery.api.api as freezer_api
|
||||
import freezer_ui.api.api as freezer_api
|
||||
|
||||
|
||||
class SessionConfigurationAction(workflows.Action):
|
@ -5,7 +5,7 @@ var Browser = (function () {
|
||||
url += "//";
|
||||
url += $(location).attr("host");
|
||||
|
||||
url += WEBROOT + 'disaster_recovery/api/';
|
||||
url += WEBROOT + 'freezer_ui/api/';
|
||||
|
||||
return {
|
||||
get_url : function () {
|
@ -21,7 +21,7 @@
|
||||
angular.module('hz').controller('DestinationCtrl', function ($scope, $http, $location) {
|
||||
$scope.query = '';
|
||||
|
||||
$http.get($location.protocol() + "://" + $location.host() + ":" + $location.port() + "/disaster_recovery/api/clients").
|
||||
$http.get($location.protocol() + "://" + $location.host() + ":" + $location.port() + "/freezer_ui/api/clients").
|
||||
success(function (data) {
|
||||
$scope.clients = data;
|
||||
});
|
@ -14,7 +14,7 @@
|
||||
|
||||
from django.conf.urls import include
|
||||
from django.urls import re_path
|
||||
import disaster_recovery.api.rest.urls as rest_urls
|
||||
import freezer_ui.api.rest.urls as rest_urls
|
||||
|
||||
|
||||
urlpatterns = [
|
@ -18,6 +18,6 @@ import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault(
|
||||
"DJANGO_SETTINGS_MODULE", "disaster_recovery.tests.settings")
|
||||
"DJANGO_SETTINGS_MODULE", "freezer_ui.tests.settings")
|
||||
from django.core.management import execute_from_command_line # noqa
|
||||
execute_from_command_line(sys.argv)
|
||||
|
7
releasenotes/notes/package_rename-635a1b32e355cd11.yaml
Normal file
7
releasenotes/notes/package_rename-635a1b32e355cd11.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
prelude: >
|
||||
Python package name for Freezer Horizon Dashboard has been renamed from
|
||||
``disaster_recovery`` to ``freezer_ui`` in order to align with repository
|
||||
naming and naming conventions for Dashboards.
|
||||
This will not have any effect on URIs inside of the Horizon as well as
|
||||
representation of the Dashboard in UI.
|
18
run_tests.sh
18
run_tests.sh
@ -57,7 +57,7 @@ root=`pwd -P`
|
||||
venv=$root/.venv
|
||||
venv_env_version=$venv/environments
|
||||
with_venv=tools/with_venv.sh
|
||||
included_dirs="disaster_recovery"
|
||||
included_dirs="freezer_ui"
|
||||
|
||||
always_venv=0
|
||||
backup_env=0
|
||||
@ -187,7 +187,7 @@ function warn_on_flake8_without_venv {
|
||||
function run_pep8 {
|
||||
echo "Running flake8 ..."
|
||||
warn_on_flake8_without_venv
|
||||
DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings ${command_wrapper} flake8
|
||||
DJANGO_SETTINGS_MODULE=freezer_ui.test.settings ${command_wrapper} flake8
|
||||
}
|
||||
|
||||
function run_pep8_changed {
|
||||
@ -200,13 +200,13 @@ function run_pep8_changed {
|
||||
files=$(git diff --name-only $base_commit | tr '\n' ' ')
|
||||
echo "Running flake8 on ${files}"
|
||||
warn_on_flake8_without_venv
|
||||
diff -u --from-file /dev/null ${files} | DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings ${command_wrapper} flake8 --diff
|
||||
diff -u --from-file /dev/null ${files} | DJANGO_SETTINGS_MODULE=freezer_ui.test.settings ${command_wrapper} flake8 --diff
|
||||
exit
|
||||
}
|
||||
|
||||
function run_sphinx {
|
||||
echo "Building sphinx..."
|
||||
DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings ${command_wrapper} python setup.py build_sphinx
|
||||
DJANGO_SETTINGS_MODULE=freezer_ui.test.settings ${command_wrapper} python setup.py build_sphinx
|
||||
echo "Build complete."
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ function run_tests {
|
||||
fi
|
||||
|
||||
if [ $with_selenium -eq 0 -a $integration -eq 0 ]; then
|
||||
testopts="$testopts --exclude-dir=disaster_recovery/test/integration_tests"
|
||||
testopts="$testopts --exclude-dir=freezer_ui/test/integration_tests"
|
||||
fi
|
||||
|
||||
if [ $selenium_headless -eq 1 ]; then
|
||||
@ -361,11 +361,11 @@ function run_tests_subset {
|
||||
|
||||
function run_tests_all {
|
||||
echo "Running Freezer Web UI tests"
|
||||
export NOSE_XUNIT_FILE=disaster_recovery/nosetests.xml
|
||||
export NOSE_XUNIT_FILE=freezer_ui/nosetests.xml
|
||||
if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
|
||||
export NOSE_HTML_OUT_FILE='dashboard_nose_results.html'
|
||||
fi
|
||||
${command_wrapper} ${coverage_run} $root/manage.py test disaster_recovery --settings=disaster_recovery.test.settings $testopts
|
||||
${command_wrapper} ${coverage_run} $root/manage.py test freezer_ui --settings=freezer_ui.test.settings $testopts
|
||||
# get results of the openstack_dashboard tests
|
||||
DASHBOARD_RESULT=$?
|
||||
|
||||
@ -421,7 +421,7 @@ function babel_extract {
|
||||
function run_makemessages {
|
||||
|
||||
echo -n "freezer web ui: "
|
||||
cd disaster_recovery
|
||||
cd freezer_ui
|
||||
babel_extract django
|
||||
FREEZER_PY_RESULT=$?
|
||||
|
||||
@ -431,7 +431,7 @@ function run_makemessages {
|
||||
|
||||
cd ..
|
||||
if [ $check_only -eq 1 ]; then
|
||||
rm disaster_recovery/locale/django*.pot
|
||||
rm freezer_ui/locale/django*.pot
|
||||
fi
|
||||
|
||||
exit $(($FREEZER_PY_RESULT || $FREEZER_JS_RESULT))
|
||||
|
4
tox.ini
4
tox.ini
@ -38,11 +38,11 @@ commands = python setup.py test --coverage --testr-args={posargs}
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
setenv = DJANGO_SETTINGS_MODULE=disaster_recovery.test.settings
|
||||
setenv = DJANGO_SETTINGS_MODULE=freezer_ui.test.settings
|
||||
commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pylint]
|
||||
commands = pylint --rcfile .pylintrc disaster_recovery
|
||||
commands = pylint --rcfile .pylintrc freezer_ui
|
||||
|
||||
[flake8]
|
||||
# W504 line break after binary operator
|
||||
|
Loading…
x
Reference in New Issue
Block a user