{% 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)