]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Removed patches.
authorThomas Goirand <thomas@goirand.fr>
Tue, 28 Jan 2014 15:51:01 +0000 (23:51 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 28 Jan 2014 15:51:34 +0000 (23:51 +0800)
Change-Id: I0d1b1ea6c0ae16a35178dcd5715342ffa13a2741

Rewritten-From: f76263a5d6a8051aee67f1ad6fd87fd9577d8101

xenial/debian/patches/fix-call-of-coverage-command.patch [deleted file]
xenial/debian/patches/keyerror-688254.patch [deleted file]
xenial/debian/patches/launch-from-volume-with-valid-volume-size.patch [deleted file]
xenial/debian/patches/python-m-coverage-take2.patch [deleted file]
xenial/debian/patches/series

diff --git a/xenial/debian/patches/fix-call-of-coverage-command.patch b/xenial/debian/patches/fix-call-of-coverage-command.patch
deleted file mode 100644 (file)
index b3be6e2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Description: Use python -m coverage instead of just coverage
-Author: Thomas Goirand <zigo@debian.org>
-Forwarded: no
-Last-Update: 2013-12-18
-
-Index: horizon/run_tests.sh
-===================================================================
---- horizon.orig/run_tests.sh  2014-01-18 15:13:54.000000000 +0800
-+++ horizon/run_tests.sh       2014-01-18 15:13:59.000000000 +0800
-@@ -310,8 +310,8 @@
-   if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
-     export NOSE_HTML_OUT_FILE='horizon_nose_results.html'
-   fi
--  ${command_wrapper} coverage erase
--  ${command_wrapper} coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts
-+  ${command_wrapper} python -m coverage erase
-+  ${command_wrapper} python -m coverage run -p $root/manage.py test horizon --settings=horizon.test.settings $testopts
-   # get results of the Horizon tests
-   HORIZON_RESULT=$?
-@@ -326,9 +326,9 @@
-   if [ $with_coverage -eq 1 ]; then
-     echo "Generating coverage reports"
--    ${command_wrapper} coverage combine
--    ${command_wrapper} coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*'
--    ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
-+    ${command_wrapper} python -m coverage combine
-+    ${command_wrapper} python -m coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*'
-+    ${command_wrapper} python -m coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports
-   fi
-   # Remove the leftover coverage files from the -p flag earlier.
-   rm -f .coverage.*
diff --git a/xenial/debian/patches/keyerror-688254.patch b/xenial/debian/patches/keyerror-688254.patch
deleted file mode 100644 (file)
index 282ce1b..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-Description: Fixes a Keyerror when displaying Instances & Volumes
- .
- bug 1053488 prevents the display of the Instances & Volumes page for
- every account with administrative permissions, once a volume has been
- created and attached to an instance. While there are workarounds (
- such as using an unprivileged account to display the same page ), it
- affects almost all admin users deploying the current release of
- horizon in Essex.
- .
- The source of the problem is that the relevant portion of code loops
- over all existing volumes while it only has access to the instances
- that are owned by the current tenant. As a consequence, it fails to
- find the instance to which a volume is attached when it does not
- belong to the current tenant.
- .
- A possible fix would be to change the behaviour of the volume list
- API so that it only returns the volumes of the current tenant even
- when the user has administrative rights. However, this would be a
- user visible change that may have side effects beyond the current
- bug.
- .
- The proposed patch catches the lookup error when the instance is not
- found for a given volume and creates a fake instance object which
- will only be used to display the name "UNKNOWN".
- .
- The associated test re-creates the conditions and derives from
- the class that will give administrative permissions to the test
- user. However, since the data is created from fixed data instead of
- being actually retrieved from the API, this derivation is only
- included to illustrate the purpose of the test.
- .
- Once 2012.1.2 is released, this patch should be dropped, if
- https://bugs.launchpad.net/horizon/+bug/1053488
- has been fixed in stable/essex. 
- . 
-Author: Loic Dachary <loic@debian.org>
-Reviewed-by: 
-Last-Update: 2012-09-21
-Applied-Upstream: 
-Bug-Debian: http://bugs.debian.org/688254
-Bug-Ubuntu: https://launchpad.net/bugs/1053488
-
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: http://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>
-
-diff --git a/horizon/dashboards/nova/instances_and_volumes/tests.py b/horizon/dashboards/nova/instances_and_volumes/tests.py
-index 9cee9a0..eb17f7f 100644
---- a/horizon/dashboards/nova/instances_and_volumes/tests.py
-+++ b/horizon/dashboards/nova/instances_and_volumes/tests.py
-@@ -28,6 +28,56 @@ from horizon import api
- from horizon import test
-+class AdminInstancesAndVolumesViewTest(test.BaseAdminViewTests):
-+    def test_attached_volume(self):
-+        """ When the user has admin rights, all volumes are returned by
-+        api.volume_list(), including those with attachments to
-+        instances that are not owned by the current tenant.
-+        """
-+        instance_not_returned_by_server_list = "5"
-+        volumes = deepcopy(self.volumes.list())
-+        attached_volume = deepcopy(self.volumes.list()[0])
-+        attached_volume.id = "2"
-+        attached_volume.display_name = "Volume2 name"
-+        attached_volume.size = "80"
-+        attached_volume.status = "in-use"
-+        attached_volume.attachments = [{"server_id":
-+                                        instance_not_returned_by_server_list,
-+                                        "device": "/dev/hdn"}]
-+        volumes.append(attached_volume)
-+
-+        self.mox.StubOutWithMock(api, 'server_list')
-+        self.mox.StubOutWithMock(api, 'volume_list')
-+        api.server_list(IsA(http.HttpRequest)).AndReturn(self.servers.list())
-+        api.volume_list(IsA(http.HttpRequest)).AndReturn(volumes)
-+
-+        self.mox.ReplayAll()
-+
-+        res = self.client.get(
-+            reverse('horizon:nova:instances_and_volumes:index'))
-+
-+        self.assertTemplateUsed(res,
-+            'nova/instances_and_volumes/index.html')
-+        instances = res.context['instances_table'].data
-+        resp_volumes = res.context['volumes_table'].data
-+
-+        self.assertItemsEqual(instances, self.servers.list())
-+        self.assertItemsEqual(resp_volumes, volumes)
-+
-+        self.assertContains(res, ">Volume name<", 1, 200)
-+        self.assertContains(res, ">40 GB<", 1, 200)
-+        self.assertContains(res, ">Available<", 1, 200)
-+
-+        self.assertContains(res, ">Volume2 name<", 1, 200)
-+        self.assertContains(res, ">80 GB<", 1, 200)
-+        self.assertContains(res, ">In-Use<", 1, 200)
-+        self.assertContains(res,
-+                            ">Instance UNKNOWN (" +
-+                            instance_not_returned_by_server_list +
-+                            ")</a>&nbsp;on /dev/hdn",
-+                            1, 200)
-+
-+
- class InstancesAndVolumesViewTest(test.TestCase):
-     def test_index(self):
-         self.mox.StubOutWithMock(api, 'server_list')
-diff --git a/horizon/dashboards/nova/instances_and_volumes/views.py b/horizon/dashboards/nova/instances_and_volumes/views.py
-index 5eb9300..d1d5c06 100644
---- a/horizon/dashboards/nova/instances_and_volumes/views.py
-+++ b/horizon/dashboards/nova/instances_and_volumes/views.py
-@@ -71,7 +71,13 @@ class IndexView(tables.MultiTableView):
-                                     self._get_instances()])
-             for volume in volumes:
-                 for att in volume.attachments:
--                    att['instance'] = instances[att['server_id']]
-+                    try:
-+                        att['instance'] = instances[att['server_id']]
-+                    except:
-+                        class FakeInstance:
-+                            name = 'UNKNOWN'
-+                        att['instance'] = FakeInstance()
-+
-         except novaclient_exceptions.ClientException, e:
-             volumes = []
-             LOG.exception("ClientException in volume index")
diff --git a/xenial/debian/patches/launch-from-volume-with-valid-volume-size.patch b/xenial/debian/patches/launch-from-volume-with-valid-volume-size.patch
deleted file mode 100644 (file)
index 13377b4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-Description: Launch from volume with valid volume size
-Author: Sascha Peilicke <saschpe@suse.de>
-Origin: upstream, https://review.openstack.org/gitweb?p=openstack/horizon.git;a=patch;h=fd2291bd28a5a4331d9a7baf961c76effd17b85a
-Bug-Debian: http://bugs.debian.org/699906
-Bug-Ubuntu: https://launchpad.net/bugs/1047568
-Date: 2012-10-18
-
-diff --git a/AUTHORS b/AUTHORS
-index 4110431..677253f 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -41,6 +41,7 @@ Monty Taylor <mordred@inaugust.com>
- Neil Johnston <onewheeldrive.net@gmail.com>
- Paul McMillan <paul.mcmillan@nebula.com>
- Sam Morrison <sorrison@gmail.com>
-+Sascha Peilicke <saschpe@suse.de>
- Stephane Angot <sa@hydre.org>
- termie <github@anarkystic.com>
- Thierry Carrez <thierry@openstack.org>
-diff --git a/horizon/dashboards/nova/images_and_snapshots/images/forms.py b/horizon/dashboards/nova/images_and_snapshots/images/forms.py
-index bc4851d..a6cdbad 100644
---- a/horizon/dashboards/nova/images_and_snapshots/images/forms.py
-+++ b/horizon/dashboards/nova/images_and_snapshots/images/forms.py
-@@ -164,7 +164,7 @@ class LaunchForm(forms.SelfHandlingForm):
-                 else:
-                     delete_on_terminate = 0
-                 dev_mapping = {data['device_name']:
--                        ("%s::%s" % (data['volume'], delete_on_terminate))}
-+                        ("%s:%s" % (data['volume'], delete_on_terminate))}
-             else:
-                 dev_mapping = None
-diff --git a/horizon/dashboards/nova/images_and_snapshots/images/tests.py b/horizon/dashboards/nova/images_and_snapshots/images/tests.py
-index aa02325..3615288 100644
---- a/horizon/dashboards/nova/images_and_snapshots/images/tests.py
-+++ b/horizon/dashboards/nova/images_and_snapshots/images/tests.py
-@@ -118,8 +118,8 @@ class ImageViewTests(test.TestCase):
-         sec_group = self.security_groups.first()
-         USER_DATA = 'user data'
-         device_name = u'vda'
--        volume_choice = "%s:vol" % volume.id
--        block_device_mapping = {device_name: u"%s::0" % volume_choice}
-+        volume_choice = "%s:vol:%s" % (volume.id, volume.size)
-+        block_device_mapping = {device_name: u"%s:0" % volume_choice}
-         self.mox.StubOutWithMock(api, 'image_get_meta')
-         self.mox.StubOutWithMock(api, 'flavor_list')
-@@ -269,7 +269,7 @@ class ImageViewTests(test.TestCase):
-         sec_group = self.security_groups.first()
-         USER_DATA = 'user data'
-         device_name = u'vda'
--        volume_choice = "%s:vol" % volume.id
-+        volume_choice = "%s:vol:%s" % (volume.id, volume.size)
-         self.mox.StubOutWithMock(api, 'image_get_meta')
-         self.mox.StubOutWithMock(api, 'flavor_list')
-diff --git a/horizon/dashboards/nova/images_and_snapshots/images/views.py b/horizon/dashboards/nova/images_and_snapshots/images/views.py
-index 1803f97..0b6ec5c 100644
---- a/horizon/dashboards/nova/images_and_snapshots/images/views.py
-+++ b/horizon/dashboards/nova/images_and_snapshots/images/views.py
-@@ -117,7 +117,7 @@ class LaunchView(forms.ModalFormView):
-             else:
-                 vol_type = "vol"
-                 visible_label = _("Volume")
--            return (("%s:%s" % (volume.id, vol_type)),
-+            return (("%s:%s:%s" % (volume.id, vol_type, volume.size)),
-                     ("%s - %s GB (%s)" % (volume.display_name,
-                                          volume.size,
-                                          visible_label)))
--- 
-1.7.9.5
-
diff --git a/xenial/debian/patches/python-m-coverage-take2.patch b/xenial/debian/patches/python-m-coverage-take2.patch
deleted file mode 100644 (file)
index d019f46..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-Description: <short summary of the patch>
- TODO: Put a short summary on the line above and replace this paragraph
- with a longer explanation of this change. Complete the meta-information
- with other relevant fields (see below for details). To make it easier, the
- information below has been extracted from the changelog. Adjust it or drop
- it.
- .
- horizon (2013.2.1-1) unstable; urgency=medium
- .
-   * New upstream release.
-   * Removes patch now applied upstream for CVE-2013-6858.
-   * (build-)depends needs python-iso8601 >= 0.1.8.
-   * Added a patch to use python -m coverage instead of just coverage.
-Author: Thomas Goirand <zigo@debian.org>
-
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: http://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>
-
-Index: horizon/run_tests.sh
-===================================================================
---- horizon.orig/run_tests.sh  2014-01-18 15:13:43.000000000 +0800
-+++ horizon/run_tests.sh       2014-01-18 15:13:43.000000000 +0800
-@@ -320,7 +320,7 @@
-   if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
-     export NOSE_HTML_OUT_FILE='dashboard_nose_results.html'
-   fi
--  ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts
-+  ${command_wrapper} python -m coverage run -p $root/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings $testopts
-   # get results of the openstack_dashboard tests
-   DASHBOARD_RESULT=$?
index a9f105c57daeee5d9025096d9cd01756567fd04b..e883b0358c2035eff2581538e242ec72baf1c5fe 100644 (file)
@@ -1,5 +1,3 @@
 fix-dashboard-django-wsgi.patch
 fix-dashboard-manage.patch
 fixed-horizon-MANIFEST.in.patch
-fix-call-of-coverage-command.patch
-python-m-coverage-take2.patch