Merge lp:~corey.bryant/horizon/2014.1.4 into lp:~ubuntu-server-dev/horizon/icehouse

Proposed by Corey Bryant
Status: Merged
Merged at revision: 201
Proposed branch: lp:~corey.bryant/horizon/2014.1.4
Merge into: lp:~ubuntu-server-dev/horizon/icehouse
Diff against target: 265 lines (+212/-9)
5 files modified
debian/changelog (+22/-0)
debian/patches/fix-dashboard-django-wsgi.patch (+2/-2)
debian/patches/fix-host-listing-live-migration.patch (+182/-0)
debian/patches/fix-requirements.patch (+5/-7)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~corey.bryant/horizon/2014.1.4
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+253096@code.launchpad.net
To post a comment you must log in.
lp:~corey.bryant/horizon/2014.1.4 updated
201. By Corey Bryant

* Resynchronize with stable/icehouse (b14a2ec) (LP: #1432608):
  - [4f12ca8] Fix metering daily display
  - [e00979e] Use floats instead of integer in memory calculation of admin dashboard
  - [0eef0d8] Removing Moscow's timezone check
  - [c37aafa] Remove the urlquote to arguments passed to reverse
  - [61d09f6] Horizon login page contains DOS attack mechanism
  - [33f2b93] Prevent leaking `target` info into subsequent `policy.check()` calls
  - [a04aa21] Tolerate completely missing floating_ips
  - [ad1a893] Fixing Neutron Subnet Details help text
  - [7dd9ca6] Handle negative values in total*Used for Cinder absolute limits
  - [2b292e8] Workaround for negative vals in total*Used in nova absolute_limits
  - [e5a9037] Update WSGI app creation to be compatible with Django 1.7
  - [b14a2ec] Run router dashboard unit tests by default
* d/p/fix-dashboard-django-wsgi.patch: Rebased
* d/p/fix-requirements.patch: Rebased
* d/p/fix-host-listing-live-migration.patch: Cherry picked from
  https://review.openstack.org/#/c/149621/

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-12-03 19:01:02 +0000
+++ debian/changelog 2015-03-16 19:14:28 +0000
@@ -1,3 +1,25 @@
1horizon (1:2014.1.4-0ubuntu1) UNRELEASED; urgency=medium
2
3 * Resynchronize with stable/icehouse (b14a2ec) (LP: #1432608):
4 - [4f12ca8] Fix metering daily display
5 - [e00979e] Use floats instead of integer in memory calculation of admin dashboard
6 - [0eef0d8] Removing Moscow's timezone check
7 - [c37aafa] Remove the urlquote to arguments passed to reverse
8 - [61d09f6] Horizon login page contains DOS attack mechanism
9 - [33f2b93] Prevent leaking `target` info into subsequent `policy.check()` calls
10 - [a04aa21] Tolerate completely missing floating_ips
11 - [ad1a893] Fixing Neutron Subnet Details help text
12 - [7dd9ca6] Handle negative values in total*Used for Cinder absolute limits
13 - [2b292e8] Workaround for negative vals in total*Used in nova absolute_limits
14 - [e5a9037] Update WSGI app creation to be compatible with Django 1.7
15 - [b14a2ec] Run router dashboard unit tests by default
16 * d/p/fix-dashboard-django-wsgi.patch: Rebased
17 * d/p/fix-requirements.patch: Rebased
18 * d/p/fix-host-listing-live-migration.patch: Cherry picked from
19 https://review.openstack.org/#/c/149621/
20
21 -- Corey Bryant <corey.bryant@canonical.com> Mon, 16 Mar 2015 14:34:38 -0400
22
1horizon (1:2014.1.3-0ubuntu2) trusty; urgency=medium23horizon (1:2014.1.3-0ubuntu2) trusty; urgency=medium
224
3 * Fix Ubuntu theme region switcher dropdown (LP: #1396318) 25 * Fix Ubuntu theme region switcher dropdown (LP: #1396318)
426
=== modified file 'debian/patches/fix-dashboard-django-wsgi.patch'
--- debian/patches/fix-dashboard-django-wsgi.patch 2013-10-03 12:44:29 +0000
+++ debian/patches/fix-dashboard-django-wsgi.patch 2015-03-16 19:14:28 +0000
@@ -1,6 +1,6 @@
1--- a/openstack_dashboard/wsgi/django.wsgi1--- a/openstack_dashboard/wsgi/django.wsgi
2+++ b/openstack_dashboard/wsgi/django.wsgi2+++ b/openstack_dashboard/wsgi/django.wsgi
3@@ -9,6 +9,8 @@ sys.path.insert(0, os.path.join(os.path.3@@ -9,6 +9,8 @@
4 os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'4 os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
5 sys.stdout = sys.stderr5 sys.stdout = sys.stderr
6 6
@@ -8,4 +8,4 @@
8+8+
9 DEBUG = False9 DEBUG = False
10 10
11 application = django.core.handlers.wsgi.WSGIHandler()11 application = get_wsgi_application()
1212
=== added file 'debian/patches/fix-host-listing-live-migration.patch'
--- debian/patches/fix-host-listing-live-migration.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/fix-host-listing-live-migration.patch 2015-03-16 19:14:28 +0000
@@ -0,0 +1,182 @@
1Description: Fix host listing in live migration
2Author: Dirk Mueller<dirk@dmllr.de>
3Origin: Cherry picked from https://review.openstack.org/#/c/149621/
4---
5 .../dashboards/admin/instances/forms.py | 7 ++--
6 .../dashboards/admin/instances/tests.py | 40 +++++++++++-----------
7 .../dashboards/admin/instances/views.py | 4 +--
8 openstack_dashboard/test/test_data/nova_data.py | 10 ++++++
9 4 files changed, 36 insertions(+), 25 deletions(-)
10
11diff --git a/openstack_dashboard/dashboards/admin/instances/forms.py b/openstack_dashboard/dashboards/admin/instances/forms.py
12index b13dce6..86da601 100644
13--- a/openstack_dashboard/dashboards/admin/instances/forms.py
14+++ b/openstack_dashboard/dashboards/admin/instances/forms.py
15@@ -50,10 +50,11 @@ class LiveMigrateForm(forms.SelfHandlingForm):
16 def populate_host_choices(self, request, initial):
17 hosts = initial.get('hosts')
18 current_host = initial.get('current_host')
19- host_list = [(host.hypervisor_hostname,
20- host.hypervisor_hostname)
21+ host_list = [(host.host_name,
22+ host.host_name)
23 for host in hosts
24- if host.service['host'] != current_host]
25+ if host.service.startswith('compute') and
26+ host.host_name != current_host]
27 if host_list:
28 host_list.insert(0, ("", _("Select a new host")))
29 else:
30diff --git a/openstack_dashboard/dashboards/admin/instances/tests.py b/openstack_dashboard/dashboards/admin/instances/tests.py
31index abb98af..64276f8 100644
32--- a/openstack_dashboard/dashboards/admin/instances/tests.py
33+++ b/openstack_dashboard/dashboards/admin/instances/tests.py
34@@ -221,14 +221,14 @@ class InstanceViewTest(test.BaseAdminViewTests):
35 self.assertContains(res, "instances__revert")
36 self.assertNotContains(res, "instances__migrate")
37
38- @test.create_stubs({api.nova: ('hypervisor_list',
39+ @test.create_stubs({api.nova: ('host_list',
40 'server_get',)})
41 def test_instance_live_migrate_get(self):
42 server = self.servers.first()
43 api.nova.server_get(IsA(http.HttpRequest), server.id) \
44 .AndReturn(server)
45- api.nova.hypervisor_list(IsA(http.HttpRequest)) \
46- .AndReturn(self.hypervisors.list())
47+ api.nova.host_list(IsA(http.HttpRequest)) \
48+ .AndReturn(self.hosts.list())
49
50 self.mox.ReplayAll()
51
52@@ -252,13 +252,13 @@ class InstanceViewTest(test.BaseAdminViewTests):
53
54 self.assertRedirectsNoFollow(res, INDEX_URL)
55
56- @test.create_stubs({api.nova: ('hypervisor_list',
57+ @test.create_stubs({api.nova: ('host_list',
58 'server_get',)})
59 def test_instance_live_migrate_list_hypervisor_get_exception(self):
60 server = self.servers.first()
61 api.nova.server_get(IsA(http.HttpRequest), server.id) \
62 .AndReturn(server)
63- api.nova.hypervisor_list(IsA(http.HttpRequest)) \
64+ api.nova.host_list(IsA(http.HttpRequest)) \
65 .AndRaise(self.exceptions.nova)
66
67 self.mox.ReplayAll()
68@@ -268,14 +268,14 @@ class InstanceViewTest(test.BaseAdminViewTests):
69
70 self.assertRedirectsNoFollow(res, INDEX_URL)
71
72- @test.create_stubs({api.nova: ('hypervisor_list',
73+ @test.create_stubs({api.nova: ('host_list',
74 'server_get',)})
75 def test_instance_live_migrate_list_hypervisor_without_current(self):
76 server = self.servers.first()
77 api.nova.server_get(IsA(http.HttpRequest), server.id) \
78 .AndReturn(server)
79- api.nova.hypervisor_list(IsA(http.HttpRequest)) \
80- .AndReturn(self.hypervisors.list())
81+ api.nova.host_list(IsA(http.HttpRequest)) \
82+ .AndReturn(self.hosts.list())
83
84 self.mox.ReplayAll()
85
86@@ -283,24 +283,25 @@ class InstanceViewTest(test.BaseAdminViewTests):
87 args=[server.id])
88 res = self.client.get(url)
89 self.assertNotContains(
90- res, "<option value=\"devstack003\">devstack003</option>")
91+ res, "<option value=\"instance-host\">devstack004</option>")
92 self.assertContains(
93 res, "<option value=\"devstack001\">devstack001</option>")
94- self.assertContains(
95+ self.assertNotContains(
96 res, "<option value=\"devstack002\">devstack002</option>")
97+ self.assertContains(
98+ res, "<option value=\"devstack003\">devstack003</option>")
99
100- @test.create_stubs({api.nova: ('hypervisor_list',
101+ @test.create_stubs({api.nova: ('host_list',
102 'server_get',
103 'server_live_migrate',)})
104 def test_instance_live_migrate_post(self):
105 server = self.servers.first()
106- hypervisor = self.hypervisors.first()
107- host = hypervisor.hypervisor_hostname
108+ host = self.hosts.first().host_name
109
110 api.nova.server_get(IsA(http.HttpRequest), server.id) \
111 .AndReturn(server)
112- api.nova.hypervisor_list(IsA(http.HttpRequest)) \
113- .AndReturn(self.hypervisors.list())
114+ api.nova.host_list(IsA(http.HttpRequest)) \
115+ .AndReturn(self.hosts.list())
116 api.nova.server_live_migrate(IsA(http.HttpRequest), server.id, host,
117 block_migration=False,
118 disk_over_commit=False) \
119@@ -314,18 +315,17 @@ class InstanceViewTest(test.BaseAdminViewTests):
120 self.assertNoFormErrors(res)
121 self.assertRedirectsNoFollow(res, INDEX_URL)
122
123- @test.create_stubs({api.nova: ('hypervisor_list',
124+ @test.create_stubs({api.nova: ('host_list',
125 'server_get',
126 'server_live_migrate',)})
127 def test_instance_live_migrate_post_api_exception(self):
128 server = self.servers.first()
129- hypervisor = self.hypervisors.first()
130- host = hypervisor.hypervisor_hostname
131+ host = self.hosts.first().host_name
132
133 api.nova.server_get(IsA(http.HttpRequest), server.id) \
134 .AndReturn(server)
135- api.nova.hypervisor_list(IsA(http.HttpRequest)) \
136- .AndReturn(self.hypervisors.list())
137+ api.nova.host_list(IsA(http.HttpRequest)) \
138+ .AndReturn(self.hosts.list())
139 api.nova.server_live_migrate(IsA(http.HttpRequest), server.id, host,
140 block_migration=False,
141 disk_over_commit=False) \
142diff --git a/openstack_dashboard/dashboards/admin/instances/views.py b/openstack_dashboard/dashboards/admin/instances/views.py
143index 54f41ce..4d2358d 100644
144--- a/openstack_dashboard/dashboards/admin/instances/views.py
145+++ b/openstack_dashboard/dashboards/admin/instances/views.py
146@@ -143,10 +143,10 @@ class LiveMigrateView(forms.ModalFormView):
147 @memoized.memoized_method
148 def get_hosts(self, *args, **kwargs):
149 try:
150- return api.nova.hypervisor_list(self.request)
151+ return api.nova.host_list(self.request)
152 except Exception:
153 redirect = reverse("horizon:admin:instances:index")
154- msg = _('Unable to retrieve hypervisor information.')
155+ msg = _('Unable to retrieve host information.')
156 exceptions.handle(self.request, msg, redirect=redirect)
157
158 @memoized.memoized_method
159diff --git a/openstack_dashboard/test/test_data/nova_data.py b/openstack_dashboard/test/test_data/nova_data.py
160index 56cd698..26206e1 100644
161--- a/openstack_dashboard/test/test_data/nova_data.py
162+++ b/openstack_dashboard/test/test_data/nova_data.py
163@@ -730,6 +730,16 @@ def data(TEST):
164 "zone": "testing"
165 }
166 )
167+
168+ host4 = hosts.Host(hosts.HostManager(None),
169+ {
170+ "host_name": "devstack004",
171+ "service": "compute",
172+ "zone": "testing",
173+ }
174+ )
175+
176 TEST.hosts.add(host1)
177 TEST.hosts.add(host2)
178 TEST.hosts.add(host3)
179+ TEST.hosts.add(host4)
180--
1812.1.0
182
0183
=== modified file 'debian/patches/fix-requirements.patch'
--- debian/patches/fix-requirements.patch 2014-06-13 15:46:13 +0000
+++ debian/patches/fix-requirements.patch 2015-03-16 19:14:28 +0000
@@ -1,13 +1,11 @@
1Description: Set min version of six.1Description: Set min version of six.
2Author: Corey Bryant <corey.bryant@canonical.com>2Author: Corey Bryant <corey.bryant@canonical.com>
3Forwarded: Not needed.3Forwarded: Not needed.
4Index: horizon/requirements.txt4--- a/requirements.txt
5===================================================================5+++ b/requirements.txt
6--- horizon.orig/requirements.txt 2014-06-13 10:14:00.816555621 -04006@@ -22,4 +22,4 @@
7+++ horizon/requirements.txt 2014-06-13 11:44:13.180390616 -04007 python-swiftclient>=1.6,<=2.3.1
8@@ -21,4 +21,4 @@8 python-troveclient>=1.0.3,<=1.0.8
9 python-swiftclient>=1.6
10 python-troveclient>=1.0.3
11 pytz>=2010h9 pytz>=2010h
12-six>=1.6.010-six>=1.6.0
13+six>=1.5.211+six>=1.5.2
1412
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-06-13 15:46:13 +0000
+++ debian/patches/series 2015-03-16 19:14:28 +0000
@@ -1,3 +1,4 @@
1fix-host-listing-live-migration.patch
1fix-dashboard-django-wsgi.patch2fix-dashboard-django-wsgi.patch
2fix-dashboard-manage.patch3fix-dashboard-manage.patch
34

Subscribers

People subscribed via source and target branches