From e15df6b68168699299a9f9f1713e054fe8925346 Mon Sep 17 00:00:00 2001 From: Steve Leon Date: Fri, 3 Jul 2015 12:14:44 -0700 Subject: [PATCH] Renaming cue service to message-broker Also changingg all occurrences of 'queues' to 'messagebroker' Change-Id: I3744a0ad8175a74da7e96dcbf7836f6ae5548919 --- .gitignore | 1 + _70_0_cue_panel_group.py => _70_cue_panel_group.py | 4 ++-- _70_cue_panel.py => _71_cue_panel.py | 6 +++--- cuedashboard/{queues => messagebroker}/__init__.py | 0 cuedashboard/{queues => messagebroker}/panel.py | 4 ++-- cuedashboard/{queues => messagebroker}/tables.py | 4 ++-- cuedashboard/{queues => messagebroker}/tabs.py | 2 +- cuedashboard/{queues => messagebroker}/urls.py | 2 +- cuedashboard/{queues => messagebroker}/views.py | 14 +++++++------- .../{queues => messagebroker}/workflows.py | 8 ++++---- .../_detail_overview.html | 0 .../_launch_details_help.html | 0 .../{queues => messagebroker}/detail.html | 2 +- .../templates/{queues => messagebroker}/index.html | 0 .../{queues => messagebroker}/launch.html | 0 cuedashboard/tests/test_fake.py | 2 +- 16 files changed, 25 insertions(+), 24 deletions(-) rename _70_0_cue_panel_group.py => _70_cue_panel_group.py (56%) rename _70_cue_panel.py => _71_cue_panel.py (87%) rename cuedashboard/{queues => messagebroker}/__init__.py (100%) rename cuedashboard/{queues => messagebroker}/panel.py (91%) rename cuedashboard/{queues => messagebroker}/tables.py (95%) rename cuedashboard/{queues => messagebroker}/tabs.py (94%) rename cuedashboard/{queues => messagebroker}/urls.py (96%) rename cuedashboard/{queues => messagebroker}/views.py (86%) rename cuedashboard/{queues => messagebroker}/workflows.py (96%) rename cuedashboard/templates/{queues => messagebroker}/_detail_overview.html (100%) rename cuedashboard/templates/{queues => messagebroker}/_launch_details_help.html (100%) rename cuedashboard/templates/{queues => messagebroker}/detail.html (72%) rename cuedashboard/templates/{queues => messagebroker}/index.html (100%) rename cuedashboard/templates/{queues => messagebroker}/launch.html (100%) diff --git a/.gitignore b/.gitignore index 712537e..5d827d9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ AUTHORS ChangeLog .DS_Store cuedashboard.egg* +cue_dashboard.egg* build/ .eggs/ .idea/ diff --git a/_70_0_cue_panel_group.py b/_70_cue_panel_group.py similarity index 56% rename from _70_0_cue_panel_group.py rename to _70_cue_panel_group.py index dc42517..4132a35 100644 --- a/_70_0_cue_panel_group.py +++ b/_70_cue_panel_group.py @@ -1,5 +1,5 @@ from django.utils.translation import ugettext_lazy as _ -PANEL_GROUP = 'queuesgroup' -PANEL_GROUP_NAME = _('Messaging') +PANEL_GROUP = 'messagebroker' +PANEL_GROUP_NAME = _('Message Broker') PANEL_GROUP_DASHBOARD = 'project' diff --git a/_70_cue_panel.py b/_71_cue_panel.py similarity index 87% rename from _70_cue_panel.py rename to _71_cue_panel.py index 4282b9d..7d21870 100644 --- a/_70_cue_panel.py +++ b/_71_cue_panel.py @@ -14,10 +14,10 @@ # Copyright [2014] Hewlett-Packard Development Company, L.P. # limitations under the License. -PANEL = 'queues' -PANEL_GROUP = 'queuesgroup' +PANEL = 'messagebroker' +PANEL_GROUP = 'messagebroker' PANEL_DASHBOARD = 'project' -ADD_PANEL = 'cuedashboard.queues.panel.CuePanel' +ADD_PANEL = 'cuedashboard.messagebroker.panel.CuePanel' ADD_INSTALLED_APPS = [ 'cuedashboard', ] diff --git a/cuedashboard/queues/__init__.py b/cuedashboard/messagebroker/__init__.py similarity index 100% rename from cuedashboard/queues/__init__.py rename to cuedashboard/messagebroker/__init__.py diff --git a/cuedashboard/queues/panel.py b/cuedashboard/messagebroker/panel.py similarity index 91% rename from cuedashboard/queues/panel.py rename to cuedashboard/messagebroker/panel.py index 570f7ec..6c2a024 100644 --- a/cuedashboard/queues/panel.py +++ b/cuedashboard/messagebroker/panel.py @@ -22,5 +22,5 @@ import horizon class CuePanel(horizon.Panel): name = _("Clusters") - slug = 'queues' - permissions = ('openstack.services.message_queue',) + slug = 'messagebroker' + permissions = ('openstack.services.message-broker',) diff --git a/cuedashboard/queues/tables.py b/cuedashboard/messagebroker/tables.py similarity index 95% rename from cuedashboard/queues/tables.py rename to cuedashboard/messagebroker/tables.py index 88ed6f3..e7d25cb 100644 --- a/cuedashboard/queues/tables.py +++ b/cuedashboard/messagebroker/tables.py @@ -26,7 +26,7 @@ from horizon import tables class CreateCluster(tables.LinkAction): name = "create" verbose_name = _("Create Cluster") - url = "horizon:project:queues:create" + url = "horizon:project:messagebroker:create" classes = ("ajax-modal", "btn-create") @@ -73,7 +73,7 @@ def format_endpoints(cluster): class ClusterTable(tables.DataTable): name = tables.Column("name", verbose_name=_("Name"), - link='horizon:project:queues:detail') + link='horizon:project:messagebroker:detail') size = tables.Column("size", verbose_name=_("Cluster Size"),) endpoint = tables.Column(format_endpoints, verbose_name=_("Endpoints")) status = tables.Column("status", verbose_name=_("Status")) diff --git a/cuedashboard/queues/tabs.py b/cuedashboard/messagebroker/tabs.py similarity index 94% rename from cuedashboard/queues/tabs.py rename to cuedashboard/messagebroker/tabs.py index 6e60deb..1432761 100644 --- a/cuedashboard/queues/tabs.py +++ b/cuedashboard/messagebroker/tabs.py @@ -21,7 +21,7 @@ from horizon import tabs class OverviewTab(tabs.Tab): name = _("Overview") slug = "overview" - template_name = "project/queues/_detail_overview.html" + template_name = "project/messagebroker/_detail_overview.html" def get_context_data(self, request): return {"cluster": self.tab_group.kwargs['cluster']} diff --git a/cuedashboard/queues/urls.py b/cuedashboard/messagebroker/urls.py similarity index 96% rename from cuedashboard/queues/urls.py rename to cuedashboard/messagebroker/urls.py index dcc4760..664aeca 100644 --- a/cuedashboard/queues/urls.py +++ b/cuedashboard/messagebroker/urls.py @@ -16,7 +16,7 @@ # Copyright [2014] Hewlett-Packard Development Company, L.P. # limitations under the License. -from cuedashboard.queues import views +from cuedashboard.messagebroker import views from django.conf.urls import patterns from django.conf.urls import url diff --git a/cuedashboard/queues/views.py b/cuedashboard/messagebroker/views.py similarity index 86% rename from cuedashboard/queues/views.py rename to cuedashboard/messagebroker/views.py index 0f0d879..96f9ce7 100644 --- a/cuedashboard/queues/views.py +++ b/cuedashboard/messagebroker/views.py @@ -17,9 +17,9 @@ # limitations under the License. from cuedashboard import api -from cuedashboard.queues.tables import ClusterTable -from cuedashboard.queues.tabs import ClusterDetailTabs -from cuedashboard.queues import workflows as cue_workflows +from cuedashboard.messagebroker.tables import ClusterTable +from cuedashboard.messagebroker.tabs import ClusterDetailTabs +from cuedashboard.messagebroker import workflows as cue_workflows from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ @@ -31,7 +31,7 @@ from horizon import workflows class IndexView(tables.DataTableView): table_class = ClusterTable - template_name = 'queues/index.html' + template_name = 'messagebroker/index.html' page_title = _("Clusters") def get_data(self): @@ -40,13 +40,13 @@ class IndexView(tables.DataTableView): class CreateClusterView(workflows.WorkflowView): workflow_class = cue_workflows.CreateCluster - template_name = "queues/launch.html" + template_name = "messagebroker/launch.html" page_title = _("Create Cluster") class DetailView(horizon_tabs.TabbedTableView): tab_group_class = ClusterDetailTabs - template_name = 'queues/detail.html' + template_name = 'messagebroker/detail.html' page_title = _("Cluster Details: {{ cluster.name }}") def get_context_data(self, **kwargs): @@ -78,4 +78,4 @@ class DetailView(horizon_tabs.TabbedTableView): @staticmethod def get_redirect_url(): - return reverse('horizon:project:queues:index') + return reverse('horizon:project:messagebroker:index') diff --git a/cuedashboard/queues/workflows.py b/cuedashboard/messagebroker/workflows.py similarity index 96% rename from cuedashboard/queues/workflows.py rename to cuedashboard/messagebroker/workflows.py index 72baa36..00e541f 100644 --- a/cuedashboard/queues/workflows.py +++ b/cuedashboard/messagebroker/workflows.py @@ -91,7 +91,7 @@ class SetInstanceDetailsAction(workflows.Action): class Meta(object): name = _("Details") - help_text_template = "queues/_launch_details_help.html" + help_text_template = "messagebroker/_launch_details_help.html" @memoized.memoized_method def flavors(self, request): @@ -99,7 +99,7 @@ class SetInstanceDetailsAction(workflows.Action): return api.nova.flavor_list(request) except Exception: LOG.exception("Exception while obtaining flavors list") - redirect = reverse("horizon:project:queues:index") + redirect = reverse("horizon:project:messagebroker:index") exceptions.handle(request, _('Unable to obtain flavors.'), redirect=redirect) @@ -150,7 +150,7 @@ class CreateCluster(workflows.Workflow): finalize_button_name = _("Create") success_message = _('Created cluster named "%(name)s".') failure_message = _('Unable to create cluster named "%(name)s".') - success_url = "horizon:project:queues:index" + success_url = "horizon:project:messagebroker:index" default_steps = (SetClusterDetails,) def __init__(self, request=None, context_seed=None, entry_point=None, @@ -166,7 +166,7 @@ class CreateCluster(workflows.Workflow): def handle(self, request, context): try: - LOG.info("Launching message queue cluster with parameters " + LOG.info("Launching message broker cluster with parameters " "{name=%s, flavor=%s, size=%s, nics=%s}", context['name'], context['flavor'], context['size'], context['network']) diff --git a/cuedashboard/templates/queues/_detail_overview.html b/cuedashboard/templates/messagebroker/_detail_overview.html similarity index 100% rename from cuedashboard/templates/queues/_detail_overview.html rename to cuedashboard/templates/messagebroker/_detail_overview.html diff --git a/cuedashboard/templates/queues/_launch_details_help.html b/cuedashboard/templates/messagebroker/_launch_details_help.html similarity index 100% rename from cuedashboard/templates/queues/_launch_details_help.html rename to cuedashboard/templates/messagebroker/_launch_details_help.html diff --git a/cuedashboard/templates/queues/detail.html b/cuedashboard/templates/messagebroker/detail.html similarity index 72% rename from cuedashboard/templates/queues/detail.html rename to cuedashboard/templates/messagebroker/detail.html index 22dd4b7..e864260 100644 --- a/cuedashboard/templates/queues/detail.html +++ b/cuedashboard/templates/messagebroker/detail.html @@ -5,7 +5,7 @@ {% block main %}
- {% include "queues/_detail_overview.html" %} + {% include "messagebroker/_detail_overview.html" %}
{% endblock %} \ No newline at end of file diff --git a/cuedashboard/templates/queues/index.html b/cuedashboard/templates/messagebroker/index.html similarity index 100% rename from cuedashboard/templates/queues/index.html rename to cuedashboard/templates/messagebroker/index.html diff --git a/cuedashboard/templates/queues/launch.html b/cuedashboard/templates/messagebroker/launch.html similarity index 100% rename from cuedashboard/templates/queues/launch.html rename to cuedashboard/templates/messagebroker/launch.html diff --git a/cuedashboard/tests/test_fake.py b/cuedashboard/tests/test_fake.py index 6da87fd..b66597c 100644 --- a/cuedashboard/tests/test_fake.py +++ b/cuedashboard/tests/test_fake.py @@ -1,6 +1,6 @@ import testtools -import cuedashboard.queues.tables as tables +import cuedashboard.messagebroker.tables as tables class FakeTest(testtools.TestCase):