diff --git a/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/_manage_hosts.html b/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/_manage_hosts.html deleted file mode 100644 index bafc137fa7..0000000000 --- a/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/_manage_hosts.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "horizon/common/_modal_form.html" %} -{% load i18n %} -{% load url from future %} - -{% block form_id %}{% endblock %} -{% block form_action %}{% url 'horizon:admin:aggregates:manage_hosts' id%}{% endblock %} - -{% block modal_id %}add_aggregate_modal{% endblock %} -{% block modal-header %}{% trans "Manage Hosts" %}{% endblock %} - -{% block modal-body %} -
-
- {% include "horizon/common/_form_fields.html" %} -
-
-
-

{% trans "Description" %}:

-

{% blocktrans %} - Here you can add/remove hosts to the selected aggregate host. - Note that while a host can be a member of multiple aggregates, it can belong to one availability zone at most. - {% endblocktrans %}

-
-{% endblock %} - -{% block modal-footer %} - - {% trans "Cancel" %} -{% endblock %} \ No newline at end of file diff --git a/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/manage_hosts.html b/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/manage_hosts.html index 382efb5431..e1a6377f39 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/manage_hosts.html +++ b/openstack_dashboard/dashboards/admin/aggregates/templates/aggregates/manage_hosts.html @@ -7,5 +7,5 @@ {% endblock page_header %} {% block main %} - {% include 'admin/aggregates/_manage_hosts.html' %} + {% include 'horizon/common/_workflow.html' %} {% endblock %} \ No newline at end of file diff --git a/openstack_dashboard/dashboards/admin/aggregates/tests.py b/openstack_dashboard/dashboards/admin/aggregates/tests.py index cfe5c7af60..27810966da 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/tests.py +++ b/openstack_dashboard/dashboards/admin/aggregates/tests.py @@ -219,8 +219,15 @@ class AggregatesViewTests(test.BaseAdminViewTests): class ManageHostsTests(test.BaseAdminViewTests): + @test.create_stubs({api.nova: ('aggregate_get', 'host_list')}) def test_manage_hosts(self): aggregate = self.aggregates.first() + api.nova.aggregate_get(IsA(http.HttpRequest), str(aggregate.id)) \ + .AndReturn(aggregate) + api.nova.host_list(IsA(http.HttpRequest)) \ + .AndReturn(self.hosts.list()) + self.mox.ReplayAll() + res = self.client.get(reverse(constants.AGGREGATES_MANAGE_HOSTS_URL, args=[aggregate.id])) self.assertEqual(res.status_code, 200)