Merge lp:~corey.bryant/horizon/2014.1.4 into lp:~ubuntu-server-dev/horizon/icehouse
- 2014.1.4
- Merge into icehouse
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 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Approve | ||
Review via email: mp+253096@code.launchpad.net |
Commit message
Description of the change
- 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/
James Page (james-page) : | # |
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2014-12-03 19:01:02 +0000 | |||
3 | +++ debian/changelog 2015-03-16 19:14:28 +0000 | |||
4 | @@ -1,3 +1,25 @@ | |||
5 | 1 | horizon (1:2014.1.4-0ubuntu1) UNRELEASED; urgency=medium | ||
6 | 2 | |||
7 | 3 | * Resynchronize with stable/icehouse (b14a2ec) (LP: #1432608): | ||
8 | 4 | - [4f12ca8] Fix metering daily display | ||
9 | 5 | - [e00979e] Use floats instead of integer in memory calculation of admin dashboard | ||
10 | 6 | - [0eef0d8] Removing Moscow's timezone check | ||
11 | 7 | - [c37aafa] Remove the urlquote to arguments passed to reverse | ||
12 | 8 | - [61d09f6] Horizon login page contains DOS attack mechanism | ||
13 | 9 | - [33f2b93] Prevent leaking `target` info into subsequent `policy.check()` calls | ||
14 | 10 | - [a04aa21] Tolerate completely missing floating_ips | ||
15 | 11 | - [ad1a893] Fixing Neutron Subnet Details help text | ||
16 | 12 | - [7dd9ca6] Handle negative values in total*Used for Cinder absolute limits | ||
17 | 13 | - [2b292e8] Workaround for negative vals in total*Used in nova absolute_limits | ||
18 | 14 | - [e5a9037] Update WSGI app creation to be compatible with Django 1.7 | ||
19 | 15 | - [b14a2ec] Run router dashboard unit tests by default | ||
20 | 16 | * d/p/fix-dashboard-django-wsgi.patch: Rebased | ||
21 | 17 | * d/p/fix-requirements.patch: Rebased | ||
22 | 18 | * d/p/fix-host-listing-live-migration.patch: Cherry picked from | ||
23 | 19 | https://review.openstack.org/#/c/149621/ | ||
24 | 20 | |||
25 | 21 | -- Corey Bryant <corey.bryant@canonical.com> Mon, 16 Mar 2015 14:34:38 -0400 | ||
26 | 22 | |||
27 | 1 | horizon (1:2014.1.3-0ubuntu2) trusty; urgency=medium | 23 | horizon (1:2014.1.3-0ubuntu2) trusty; urgency=medium |
28 | 2 | 24 | ||
29 | 3 | * Fix Ubuntu theme region switcher dropdown (LP: #1396318) | 25 | * Fix Ubuntu theme region switcher dropdown (LP: #1396318) |
30 | 4 | 26 | ||
31 | === modified file 'debian/patches/fix-dashboard-django-wsgi.patch' | |||
32 | --- debian/patches/fix-dashboard-django-wsgi.patch 2013-10-03 12:44:29 +0000 | |||
33 | +++ debian/patches/fix-dashboard-django-wsgi.patch 2015-03-16 19:14:28 +0000 | |||
34 | @@ -1,6 +1,6 @@ | |||
35 | 1 | --- a/openstack_dashboard/wsgi/django.wsgi | 1 | --- a/openstack_dashboard/wsgi/django.wsgi |
36 | 2 | +++ b/openstack_dashboard/wsgi/django.wsgi | 2 | +++ b/openstack_dashboard/wsgi/django.wsgi |
38 | 3 | @@ -9,6 +9,8 @@ sys.path.insert(0, os.path.join(os.path. | 3 | @@ -9,6 +9,8 @@ |
39 | 4 | os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' | 4 | os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' |
40 | 5 | sys.stdout = sys.stderr | 5 | sys.stdout = sys.stderr |
41 | 6 | 6 | ||
42 | @@ -8,4 +8,4 @@ | |||
43 | 8 | + | 8 | + |
44 | 9 | DEBUG = False | 9 | DEBUG = False |
45 | 10 | 10 | ||
47 | 11 | application = django.core.handlers.wsgi.WSGIHandler() | 11 | application = get_wsgi_application() |
48 | 12 | 12 | ||
49 | === added file 'debian/patches/fix-host-listing-live-migration.patch' | |||
50 | --- debian/patches/fix-host-listing-live-migration.patch 1970-01-01 00:00:00 +0000 | |||
51 | +++ debian/patches/fix-host-listing-live-migration.patch 2015-03-16 19:14:28 +0000 | |||
52 | @@ -0,0 +1,182 @@ | |||
53 | 1 | Description: Fix host listing in live migration | ||
54 | 2 | Author: Dirk Mueller<dirk@dmllr.de> | ||
55 | 3 | Origin: Cherry picked from https://review.openstack.org/#/c/149621/ | ||
56 | 4 | --- | ||
57 | 5 | .../dashboards/admin/instances/forms.py | 7 ++-- | ||
58 | 6 | .../dashboards/admin/instances/tests.py | 40 +++++++++++----------- | ||
59 | 7 | .../dashboards/admin/instances/views.py | 4 +-- | ||
60 | 8 | openstack_dashboard/test/test_data/nova_data.py | 10 ++++++ | ||
61 | 9 | 4 files changed, 36 insertions(+), 25 deletions(-) | ||
62 | 10 | |||
63 | 11 | diff --git a/openstack_dashboard/dashboards/admin/instances/forms.py b/openstack_dashboard/dashboards/admin/instances/forms.py | ||
64 | 12 | index b13dce6..86da601 100644 | ||
65 | 13 | --- a/openstack_dashboard/dashboards/admin/instances/forms.py | ||
66 | 14 | +++ b/openstack_dashboard/dashboards/admin/instances/forms.py | ||
67 | 15 | @@ -50,10 +50,11 @@ class LiveMigrateForm(forms.SelfHandlingForm): | ||
68 | 16 | def populate_host_choices(self, request, initial): | ||
69 | 17 | hosts = initial.get('hosts') | ||
70 | 18 | current_host = initial.get('current_host') | ||
71 | 19 | - host_list = [(host.hypervisor_hostname, | ||
72 | 20 | - host.hypervisor_hostname) | ||
73 | 21 | + host_list = [(host.host_name, | ||
74 | 22 | + host.host_name) | ||
75 | 23 | for host in hosts | ||
76 | 24 | - if host.service['host'] != current_host] | ||
77 | 25 | + if host.service.startswith('compute') and | ||
78 | 26 | + host.host_name != current_host] | ||
79 | 27 | if host_list: | ||
80 | 28 | host_list.insert(0, ("", _("Select a new host"))) | ||
81 | 29 | else: | ||
82 | 30 | diff --git a/openstack_dashboard/dashboards/admin/instances/tests.py b/openstack_dashboard/dashboards/admin/instances/tests.py | ||
83 | 31 | index abb98af..64276f8 100644 | ||
84 | 32 | --- a/openstack_dashboard/dashboards/admin/instances/tests.py | ||
85 | 33 | +++ b/openstack_dashboard/dashboards/admin/instances/tests.py | ||
86 | 34 | @@ -221,14 +221,14 @@ class InstanceViewTest(test.BaseAdminViewTests): | ||
87 | 35 | self.assertContains(res, "instances__revert") | ||
88 | 36 | self.assertNotContains(res, "instances__migrate") | ||
89 | 37 | |||
90 | 38 | - @test.create_stubs({api.nova: ('hypervisor_list', | ||
91 | 39 | + @test.create_stubs({api.nova: ('host_list', | ||
92 | 40 | 'server_get',)}) | ||
93 | 41 | def test_instance_live_migrate_get(self): | ||
94 | 42 | server = self.servers.first() | ||
95 | 43 | api.nova.server_get(IsA(http.HttpRequest), server.id) \ | ||
96 | 44 | .AndReturn(server) | ||
97 | 45 | - api.nova.hypervisor_list(IsA(http.HttpRequest)) \ | ||
98 | 46 | - .AndReturn(self.hypervisors.list()) | ||
99 | 47 | + api.nova.host_list(IsA(http.HttpRequest)) \ | ||
100 | 48 | + .AndReturn(self.hosts.list()) | ||
101 | 49 | |||
102 | 50 | self.mox.ReplayAll() | ||
103 | 51 | |||
104 | 52 | @@ -252,13 +252,13 @@ class InstanceViewTest(test.BaseAdminViewTests): | ||
105 | 53 | |||
106 | 54 | self.assertRedirectsNoFollow(res, INDEX_URL) | ||
107 | 55 | |||
108 | 56 | - @test.create_stubs({api.nova: ('hypervisor_list', | ||
109 | 57 | + @test.create_stubs({api.nova: ('host_list', | ||
110 | 58 | 'server_get',)}) | ||
111 | 59 | def test_instance_live_migrate_list_hypervisor_get_exception(self): | ||
112 | 60 | server = self.servers.first() | ||
113 | 61 | api.nova.server_get(IsA(http.HttpRequest), server.id) \ | ||
114 | 62 | .AndReturn(server) | ||
115 | 63 | - api.nova.hypervisor_list(IsA(http.HttpRequest)) \ | ||
116 | 64 | + api.nova.host_list(IsA(http.HttpRequest)) \ | ||
117 | 65 | .AndRaise(self.exceptions.nova) | ||
118 | 66 | |||
119 | 67 | self.mox.ReplayAll() | ||
120 | 68 | @@ -268,14 +268,14 @@ class InstanceViewTest(test.BaseAdminViewTests): | ||
121 | 69 | |||
122 | 70 | self.assertRedirectsNoFollow(res, INDEX_URL) | ||
123 | 71 | |||
124 | 72 | - @test.create_stubs({api.nova: ('hypervisor_list', | ||
125 | 73 | + @test.create_stubs({api.nova: ('host_list', | ||
126 | 74 | 'server_get',)}) | ||
127 | 75 | def test_instance_live_migrate_list_hypervisor_without_current(self): | ||
128 | 76 | server = self.servers.first() | ||
129 | 77 | api.nova.server_get(IsA(http.HttpRequest), server.id) \ | ||
130 | 78 | .AndReturn(server) | ||
131 | 79 | - api.nova.hypervisor_list(IsA(http.HttpRequest)) \ | ||
132 | 80 | - .AndReturn(self.hypervisors.list()) | ||
133 | 81 | + api.nova.host_list(IsA(http.HttpRequest)) \ | ||
134 | 82 | + .AndReturn(self.hosts.list()) | ||
135 | 83 | |||
136 | 84 | self.mox.ReplayAll() | ||
137 | 85 | |||
138 | 86 | @@ -283,24 +283,25 @@ class InstanceViewTest(test.BaseAdminViewTests): | ||
139 | 87 | args=[server.id]) | ||
140 | 88 | res = self.client.get(url) | ||
141 | 89 | self.assertNotContains( | ||
142 | 90 | - res, "<option value=\"devstack003\">devstack003</option>") | ||
143 | 91 | + res, "<option value=\"instance-host\">devstack004</option>") | ||
144 | 92 | self.assertContains( | ||
145 | 93 | res, "<option value=\"devstack001\">devstack001</option>") | ||
146 | 94 | - self.assertContains( | ||
147 | 95 | + self.assertNotContains( | ||
148 | 96 | res, "<option value=\"devstack002\">devstack002</option>") | ||
149 | 97 | + self.assertContains( | ||
150 | 98 | + res, "<option value=\"devstack003\">devstack003</option>") | ||
151 | 99 | |||
152 | 100 | - @test.create_stubs({api.nova: ('hypervisor_list', | ||
153 | 101 | + @test.create_stubs({api.nova: ('host_list', | ||
154 | 102 | 'server_get', | ||
155 | 103 | 'server_live_migrate',)}) | ||
156 | 104 | def test_instance_live_migrate_post(self): | ||
157 | 105 | server = self.servers.first() | ||
158 | 106 | - hypervisor = self.hypervisors.first() | ||
159 | 107 | - host = hypervisor.hypervisor_hostname | ||
160 | 108 | + host = self.hosts.first().host_name | ||
161 | 109 | |||
162 | 110 | api.nova.server_get(IsA(http.HttpRequest), server.id) \ | ||
163 | 111 | .AndReturn(server) | ||
164 | 112 | - api.nova.hypervisor_list(IsA(http.HttpRequest)) \ | ||
165 | 113 | - .AndReturn(self.hypervisors.list()) | ||
166 | 114 | + api.nova.host_list(IsA(http.HttpRequest)) \ | ||
167 | 115 | + .AndReturn(self.hosts.list()) | ||
168 | 116 | api.nova.server_live_migrate(IsA(http.HttpRequest), server.id, host, | ||
169 | 117 | block_migration=False, | ||
170 | 118 | disk_over_commit=False) \ | ||
171 | 119 | @@ -314,18 +315,17 @@ class InstanceViewTest(test.BaseAdminViewTests): | ||
172 | 120 | self.assertNoFormErrors(res) | ||
173 | 121 | self.assertRedirectsNoFollow(res, INDEX_URL) | ||
174 | 122 | |||
175 | 123 | - @test.create_stubs({api.nova: ('hypervisor_list', | ||
176 | 124 | + @test.create_stubs({api.nova: ('host_list', | ||
177 | 125 | 'server_get', | ||
178 | 126 | 'server_live_migrate',)}) | ||
179 | 127 | def test_instance_live_migrate_post_api_exception(self): | ||
180 | 128 | server = self.servers.first() | ||
181 | 129 | - hypervisor = self.hypervisors.first() | ||
182 | 130 | - host = hypervisor.hypervisor_hostname | ||
183 | 131 | + host = self.hosts.first().host_name | ||
184 | 132 | |||
185 | 133 | api.nova.server_get(IsA(http.HttpRequest), server.id) \ | ||
186 | 134 | .AndReturn(server) | ||
187 | 135 | - api.nova.hypervisor_list(IsA(http.HttpRequest)) \ | ||
188 | 136 | - .AndReturn(self.hypervisors.list()) | ||
189 | 137 | + api.nova.host_list(IsA(http.HttpRequest)) \ | ||
190 | 138 | + .AndReturn(self.hosts.list()) | ||
191 | 139 | api.nova.server_live_migrate(IsA(http.HttpRequest), server.id, host, | ||
192 | 140 | block_migration=False, | ||
193 | 141 | disk_over_commit=False) \ | ||
194 | 142 | diff --git a/openstack_dashboard/dashboards/admin/instances/views.py b/openstack_dashboard/dashboards/admin/instances/views.py | ||
195 | 143 | index 54f41ce..4d2358d 100644 | ||
196 | 144 | --- a/openstack_dashboard/dashboards/admin/instances/views.py | ||
197 | 145 | +++ b/openstack_dashboard/dashboards/admin/instances/views.py | ||
198 | 146 | @@ -143,10 +143,10 @@ class LiveMigrateView(forms.ModalFormView): | ||
199 | 147 | @memoized.memoized_method | ||
200 | 148 | def get_hosts(self, *args, **kwargs): | ||
201 | 149 | try: | ||
202 | 150 | - return api.nova.hypervisor_list(self.request) | ||
203 | 151 | + return api.nova.host_list(self.request) | ||
204 | 152 | except Exception: | ||
205 | 153 | redirect = reverse("horizon:admin:instances:index") | ||
206 | 154 | - msg = _('Unable to retrieve hypervisor information.') | ||
207 | 155 | + msg = _('Unable to retrieve host information.') | ||
208 | 156 | exceptions.handle(self.request, msg, redirect=redirect) | ||
209 | 157 | |||
210 | 158 | @memoized.memoized_method | ||
211 | 159 | diff --git a/openstack_dashboard/test/test_data/nova_data.py b/openstack_dashboard/test/test_data/nova_data.py | ||
212 | 160 | index 56cd698..26206e1 100644 | ||
213 | 161 | --- a/openstack_dashboard/test/test_data/nova_data.py | ||
214 | 162 | +++ b/openstack_dashboard/test/test_data/nova_data.py | ||
215 | 163 | @@ -730,6 +730,16 @@ def data(TEST): | ||
216 | 164 | "zone": "testing" | ||
217 | 165 | } | ||
218 | 166 | ) | ||
219 | 167 | + | ||
220 | 168 | + host4 = hosts.Host(hosts.HostManager(None), | ||
221 | 169 | + { | ||
222 | 170 | + "host_name": "devstack004", | ||
223 | 171 | + "service": "compute", | ||
224 | 172 | + "zone": "testing", | ||
225 | 173 | + } | ||
226 | 174 | + ) | ||
227 | 175 | + | ||
228 | 176 | TEST.hosts.add(host1) | ||
229 | 177 | TEST.hosts.add(host2) | ||
230 | 178 | TEST.hosts.add(host3) | ||
231 | 179 | + TEST.hosts.add(host4) | ||
232 | 180 | -- | ||
233 | 181 | 2.1.0 | ||
234 | 182 | |||
235 | 0 | 183 | ||
236 | === modified file 'debian/patches/fix-requirements.patch' | |||
237 | --- debian/patches/fix-requirements.patch 2014-06-13 15:46:13 +0000 | |||
238 | +++ debian/patches/fix-requirements.patch 2015-03-16 19:14:28 +0000 | |||
239 | @@ -1,13 +1,11 @@ | |||
240 | 1 | Description: Set min version of six. | 1 | Description: Set min version of six. |
241 | 2 | Author: Corey Bryant <corey.bryant@canonical.com> | 2 | Author: Corey Bryant <corey.bryant@canonical.com> |
242 | 3 | Forwarded: Not needed. | 3 | Forwarded: Not needed. |
250 | 4 | Index: horizon/requirements.txt | 4 | --- a/requirements.txt |
251 | 5 | =================================================================== | 5 | +++ b/requirements.txt |
252 | 6 | --- horizon.orig/requirements.txt 2014-06-13 10:14:00.816555621 -0400 | 6 | @@ -22,4 +22,4 @@ |
253 | 7 | +++ horizon/requirements.txt 2014-06-13 11:44:13.180390616 -0400 | 7 | python-swiftclient>=1.6,<=2.3.1 |
254 | 8 | @@ -21,4 +21,4 @@ | 8 | python-troveclient>=1.0.3,<=1.0.8 |
248 | 9 | python-swiftclient>=1.6 | ||
249 | 10 | python-troveclient>=1.0.3 | ||
255 | 11 | pytz>=2010h | 9 | pytz>=2010h |
256 | 12 | -six>=1.6.0 | 10 | -six>=1.6.0 |
257 | 13 | +six>=1.5.2 | 11 | +six>=1.5.2 |
258 | 14 | 12 | ||
259 | === modified file 'debian/patches/series' | |||
260 | --- debian/patches/series 2014-06-13 15:46:13 +0000 | |||
261 | +++ debian/patches/series 2015-03-16 19:14:28 +0000 | |||
262 | @@ -1,3 +1,4 @@ | |||
263 | 1 | fix-host-listing-live-migration.patch | ||
264 | 1 | fix-dashboard-django-wsgi.patch | 2 | fix-dashboard-django-wsgi.patch |
265 | 2 | fix-dashboard-manage.patch | 3 | fix-dashboard-manage.patch |
266 | 3 | 4 |