Hello community, here is the log from the commit of package openstack-dashboard for openSUSE:Factory checked in at 2013-01-30 22:22:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openstack-dashboard (Old) and /work/SRC/openSUSE:Factory/.openstack-dashboard.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openstack-dashboard", Maintainer is "radma...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/openstack-dashboard/openstack-dashboard.changes 2013-01-29 06:46:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.openstack-dashboard.new/openstack-dashboard.changes 2013-01-30 22:22:40.000000000 +0100 @@ -0,0 +1,15 @@ +-------------------------------------------------------------------- +Fri Jan 25 11:04:28 UTC 2013 - bwiedem...@suse.de + +- Update to version 2012.2.2+git.1359111868.20fa0fc: + + Pin docutils to 0.9.1, fix pep8 errors + + Fix bug 1055929 - Can not display usage data for Quota Summary. + + Revert "Temp fix for api/keystone.py" + + Specify floating ips table action column's width + + Allow setting nova quotas to unlimited + + Add a check for unlimited quotas + + Avoid cinder calls, when cinder is unavailable + + Don't inherit from base.html in 500 error page + + Don't show the EC2 Credentials panel if there is no EC2 service +- Drop horizon-ssl.patch: merged upstream. + Old: ---- horizon-ssl.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openstack-dashboard.spec ++++++ --- /var/tmp/diff_new_pack.vlb21t/_old 2013-01-30 22:22:41.000000000 +0100 +++ /var/tmp/diff_new_pack.vlb21t/_new 2013-01-30 22:22:41.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package openstack-dashboard # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,8 +19,8 @@ %define component horizon Name: openstack-dashboard -Version: 2012.2.2+git.1355916357.da9a19c -Release: 0 +Version: 2012.2.2+git.1359111868.20fa0fc +Release: 1 License: Apache-2.0 Summary: OpenStack Dashboard (Horizon) Url: http://wiki.openstack.org/OpenStackDashboard @@ -32,8 +32,6 @@ Patch1: horizon-user-email.patch # backport https://review.openstack.org/#/c/5204/7/horizon/tests/testsettings.py,unified Patch2: horizon-minimumpwlen.patch -# PATCH-FIX-OPENSUSE: Backport of several SSL-related fixes -Patch3: horizon-ssl.patch BuildRequires: apache2 BuildRequires: fdupes BuildRequires: openstack-macros @@ -133,7 +131,6 @@ %setup -q -n horizon-2012.2.2 #patch1 -p1 %patch2 -p1 -%patch3 -p1 %openstack_cleanup_prep %build ++++++ horizon-stable-folsom.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/AUTHORS new/horizon-2012.2.2/AUTHORS --- old/horizon-2012.2.2/AUTHORS 2012-11-30 02:35:48.000000000 +0100 +++ new/horizon-2012.2.2/AUTHORS 2013-01-23 22:42:55.000000000 +0100 @@ -38,7 +38,9 @@ jeffjapan <jeffja...@gmail.com> Jeffrey Wilcox <jeffja...@gmail.com> Jesse Andrews <anotherje...@gmail.com> +Jiang Yong <jiangyong...@gmail.com> Jim Yeh <lemonla...@gmail.com> +Joe Gordon <j...@cloudscaling.com> Joe Heck <he...@mac.com> John Postlethwait <john.postlethw...@nebula.com> Joseph Heck <he...@mac.com> @@ -50,6 +52,7 @@ Ken Pepple <ken.pep...@gmail.com> Ke Wu <ke...@ibeca.me> Ke WU <ke...@ibeca.me> +Kylin CG <kylin7...@gmail.com> Lin Hua Cheng <lin-hua.ch...@hp.com> lrqrun <lrq...@gmail.com> lzyeval <lzye...@gmail.com> @@ -77,6 +80,7 @@ Tomasz 'Zen' Napierala <tom...@napierala.org> Tom Fifield <fifie...@unimelb.edu.au> Tres Henry <t...@treshenry.net> +Victoria MartÃnez de la Cruz <vickym...@gmail.com> Vincent Untz <vu...@suse.com> Vishvananda Ishaya <vishvana...@gmail.com> yuanke wei <weiyuanke...@gmail.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/ChangeLog new/horizon-2012.2.2/ChangeLog --- old/horizon-2012.2.2/ChangeLog 2012-11-30 02:35:48.000000000 +0100 +++ new/horizon-2012.2.2/ChangeLog 2013-01-23 22:42:55.000000000 +0100 @@ -1,3 +1,175 @@ +commit 20fa0fcaa55074359f2db7e5eea64b9342a8fa75 +Author: Julie Pichon <jpic...@redhat.com> +Date: Mon Jan 21 14:47:16 2013 +0000 + + Don't show the EC2 Credentials panel if there is no EC2 service + + Fixes bug #1102411 + + Change-Id: I2454b415ac99f19349f4a19a1358fc75d8307fba + + horizon/dashboards/settings/ec2/panel.py | 1 + + 1 file changed, 1 insertion(+) + +commit 13c4a320a552d63091be2bfd85dea381ca90abbb +Merge: 61cbd9b 0b1c553 +Author: Jenkins <jenk...@review.openstack.org> +Date: Fri Jan 18 11:11:00 2013 +0000 + + Merge "Don't inherit from base.html in 500 error page" into stable/folsom + +commit 61cbd9bf07b23e038ca8a6e8a71f35178030fd12 +Merge: 570fcb5 476072d +Author: Jenkins <jenk...@review.openstack.org> +Date: Thu Jan 17 18:47:43 2013 +0000 + + Merge "Avoid cinder calls, when cinder is unavailable" into stable/folsom + +commit 570fcb5e4348d2486b2ac5491d129411ca919a9e +Merge: 5cafced ebc5e6d +Author: Jenkins <jenk...@review.openstack.org> +Date: Wed Jan 16 23:22:26 2013 +0000 + + Merge "Add a check for unlimited quotas" into stable/folsom + +commit 5cafced9735292f9f4fc061b4ed711d97886746b +Merge: 9a8f630 e19a218 +Author: Jenkins <jenk...@review.openstack.org> +Date: Wed Jan 16 23:07:52 2013 +0000 + + Merge "Allow setting nova quotas to unlimited" into stable/folsom + +commit 9a8f630497ee61e7d53d82d4be929b41ad797a42 +Merge: 1d1fa85 2f959c6 +Author: Jenkins <jenk...@review.openstack.org> +Date: Wed Jan 16 22:40:27 2013 +0000 + + Merge "Specify floating ips table action column's width" into stable/folsom + +commit ebc5e6db042cbd3ba16fc06ddfb8a785dea238cb +Author: Victoria MartÃnez de la Cruz <vickym...@gmail.com> +Date: Fri Jan 11 17:43:35 2013 -0300 + + Add a check for unlimited quotas + + This extra check will prevent Horizon to + misunderstand "-1" value when tallying quotas, + setting the "Available" field to inf + instead of 0. + + Change-Id: Idfeb9a10b8ce8eea1a39b3d48dffe08d6450fadd + Fixes: bug #1084976 + + horizon/api/nova.py | 2 +- + horizon/tests/api_tests/nova_tests.py | 51 +++++++++++++++++++++++++++++++++ + 2 files changed, 52 insertions(+), 1 deletion(-) + +commit 476072d49a41cd8461aa302591f828627760b67e +Author: Matthias Runge <mru...@redhat.com> +Date: Tue Dec 18 14:00:48 2012 +0100 + + Avoid cinder calls, when cinder is unavailable + + When a volume service is not available, then a cinder client can not + be created. This patch skips the calls, so that dashboard doesn't + break any more. + + This is a backport to Folsom release, as this turned out to be a major + issue. + Fixes bug 1084137 + + Change-Id: I8f2f8b0b131b4bb5319d74f6da48671f146d7e00 + + horizon/api/base.py | 9 ++++ + horizon/api/nova.py | 22 ++++++-- + .../dashboards/nova/images_and_snapshots/views.py | 14 +++-- + horizon/test.py | 10 ++++ + horizon/tests/api_tests/cinder_tests.py | 56 ++++++++++++++++++++ + 5 files changed, 101 insertions(+), 10 deletions(-) + +commit e19a2189fd8c1ea6413e23049152edcce25c304c +Author: Joe Gordon <j...@cloudscaling.com> +Date: Wed Jan 9 12:15:04 2013 -0800 + + Allow setting nova quotas to unlimited + + To set a quota to unlimited it is set to -1 + + Fix bug 1082489 + + Change-Id: I2e1e53f6a5a33f2b248decc9d94f5a430f383508 + + horizon/dashboards/syspanel/projects/workflows.py | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +commit 0b1c5536dfd80f071d8e3e92b71dc7eca0b1d325 +Author: Matthias Runge <mru...@redhat.com> +Date: Wed Nov 14 18:30:39 2012 +1100 + + Don't inherit from base.html in 500 error page + + For server errors, the context passed to the template is empty, + so things like STATIC_URL and context processors don't work. + + Fixes bug 1067206 for the folsom branch. + + This has been adapted to folsom release and is a backport from master. + + Change-Id: I5cd60523360d71b088226e4d0f87d88bac8a8df3 + + horizon/templatetags/horizon.py | 6 ++ + openstack_dashboard/templates/500.html | 103 +++++++++++++++++++------ + openstack_dashboard/test/error_pages_urls.py | 7 ++ + openstack_dashboard/test/tests/error_pages.py | 34 ++++++++ + openstack_dashboard/urls.py | 5 ++ + 5 files changed, 131 insertions(+), 24 deletions(-) + +commit 1d1fa854dd54b9b27b7eb67e195c0a7cdeaeba08 +Merge: bda071a 817d628 +Author: Jenkins <jenk...@review.openstack.org> +Date: Mon Jan 7 00:42:13 2013 +0000 + + Merge "Revert "Temp fix for api/keystone.py"" into stable/folsom + +commit bda071af186cf75ff7fc437af294c259ca48d26c +Merge: 69147a6 9060885 +Author: Jenkins <jenk...@review.openstack.org> +Date: Mon Jan 7 00:27:56 2013 +0000 + + Merge "Fix bug 1055929 - Can not display usage data for Quota Summary." into stable/folsom + +commit 2f959c6efeffad6f4413335dfd3c9e330c3d8e31 +Author: Jiang Yong <jiangyong...@gmail.com> +Date: Wed Dec 5 18:15:47 2012 +0800 + + Specify floating ips table action column's width + + Fixes bug 1081875 + + Change-Id: Id92a1c7afa829ef2ff8e973919900cf7cb7c59e9 + + .../static/dashboard/less/horizon.less | 3 +++ + 1 file changed, 3 insertions(+) + +commit 69147a6b20961a665487c67a603588cea435d92d +Author: Julie Pichon <jpic...@redhat.com> +Date: Wed Dec 19 11:30:27 2012 -0500 + + Pin docutils to 0.9.1, fix pep8 errors + + Docutils 0.10 breaks manpage generation in sphinx 1.1.3. A fix to + sphinx has been merged, but not yet released (scheduled for dec + 24-31). In the mean time, we should pin docutils to 0.9.1. + + Also fixes new pep8 errors as reported by pep8 1.3.4. + + Change-Id: Icedae7bf70c7feaf9f1631c3a2cc3bea67570956 + + horizon/dashboards/nova/containers/tables.py | 2 +- + horizon/dashboards/syspanel/networks/forms.py | 2 +- + tools/test-requires | 1 + + 3 files changed, 3 insertions(+), 2 deletions(-) + commit da9a19c7a9aad6c57eb3540438342ca6bbada036 Author: Mark McLoughlin <mar...@redhat.com> Date: Thu Nov 29 21:35:07 2012 +0000 @@ -20,6 +192,31 @@ horizon/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +commit 9060885a5661f0c1786dd6feea8f07e45776e410 +Author: Kylin CG <kylin7...@gmail.com> +Date: Fri Oct 12 17:04:40 2012 +0800 + + Fix bug 1055929 - Can not display usage data for Quota Summary. + + Change-Id: I051e97f14375714d22303ad44a9f0b16aa7d6c51 + + .../templates/horizon/common/_quota_summary.html | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 817d6289ab903de463bb533a23e74ed5c5d886ed +Author: Sascha Peilicke <sasc...@suse.de> +Date: Tue Nov 27 16:06:17 2012 +0100 + + Revert "Temp fix for api/keystone.py" + + This reverts commit d0403e9318660e6cfa42c02c6be3b2b800548593. + https://review.openstack.org/#/c/9582 was merged in July. + + Change-Id: I24929f9b48cde53cc9d0c27a57dc078e0e9a5579 + + horizon/api/keystone.py | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + commit 7f038bddc26e5bf8fe99f598a2a2369725da2ddc Merge: 65c2ab8 53954a7 Author: Jenkins <jenk...@review.openstack.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/api/base.py new/horizon-2012.2.2/horizon/api/base.py --- old/horizon-2012.2.2/horizon/api/base.py 2012-11-30 02:32:29.000000000 +0100 +++ new/horizon-2012.2.2/horizon/api/base.py 2013-01-23 22:40:11.000000000 +0100 @@ -116,3 +116,12 @@ raise exceptions.ServiceCatalogException(service_type) else: raise exceptions.ServiceCatalogException(service_type) + + +def is_service_enabled(request, service_type, service_name=None): + service = get_service_from_catalog(request.user.service_catalog, + service_type) + if service and service_name: + return service['name'] == service_name + else: + return service is not None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/api/keystone.py new/horizon-2012.2.2/horizon/api/keystone.py --- old/horizon-2012.2.2/horizon/api/keystone.py 2012-11-30 02:32:29.000000000 +0100 +++ new/horizon-2012.2.2/horizon/api/keystone.py 2013-01-23 22:40:11.000000000 +0100 @@ -112,13 +112,11 @@ conn = getattr(request, cache_attr) else: endpoint = _get_endpoint_url(request, endpoint_type) - # FIXME(ttrifonov): temporarily commented, - # as the fix in Keystone is not merged yet - #insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) + insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) LOG.debug("Creating a new keystoneclient connection to %s." % endpoint) conn = keystone_client.Client(token=user.token.id, - endpoint=endpoint) - # insecure=insecure) + endpoint=endpoint, + insecure=insecure) setattr(request, cache_attr, conn) return conn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/api/nova.py new/horizon-2012.2.2/horizon/api/nova.py --- old/horizon-2012.2.2/horizon/api/nova.py 2012-11-30 02:32:29.000000000 +0100 +++ new/horizon-2012.2.2/horizon/api/nova.py 2013-01-23 22:40:11.000000000 +0100 @@ -210,15 +210,21 @@ def cinderclient(request): insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) + cinder_url = "" + try: + cinder_url = url_for(request, 'volume') + except exceptions.ServiceCatalogException: + LOG.debug('no volume service configured.') + return None LOG.debug('cinderclient connection created using token "%s" and url "%s"' % - (request.user.token.id, url_for(request, 'volume'))) + (request.user.token.id, cinder_url)) c = cinder_client.Client(request.user.username, request.user.token.id, project_id=request.user.tenant_id, - auth_url=url_for(request, 'volume'), + auth_url=cinder_url, insecure=insecure) c.client.auth_token = request.user.token.id - c.client.management_url = url_for(request, 'volume') + c.client.management_url = cinder_url return c @@ -455,7 +461,7 @@ usages[usage]['quota'] = getattr(quotas, usage) - if usages[usage]['quota'] is None: + if usages[usage]['quota'] is None or usages[usage]['quota'] == -1: usages[usage]['quota'] = float("inf") usages[usage]['available'] = float("inf") elif type(usages[usage]['quota']) is str: @@ -513,7 +519,10 @@ To see all volumes in the cloud as an admin you can pass in a special search option: {'all_tenants': 1} """ - return cinderclient(request).volumes.list(search_opts=search_opts) + c_client = cinderclient(request) + if c_client is None: + return [] + return c_client.volumes.list(search_opts=search_opts) def volume_get(request, volume_id): @@ -565,7 +574,10 @@ def volume_snapshot_list(request): - return cinderclient(request).volume_snapshots.list() + c_client = cinderclient(request) + if c_client is None: + return [] + return c_client.volume_snapshots.list() def volume_snapshot_create(request, volume_id, name, description): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/dashboards/nova/containers/tables.py new/horizon-2012.2.2/horizon/dashboards/nova/containers/tables.py --- old/horizon-2012.2.2/horizon/dashboards/nova/containers/tables.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/dashboards/nova/containers/tables.py 2013-01-23 22:40:11.000000000 +0100 @@ -53,7 +53,7 @@ # completion url if current_container in self.success_ids: return self.success_url - return request.get_full_path() + return request.get_full_path() class CreateContainer(tables.LinkAction): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/dashboards/nova/images_and_snapshots/views.py new/horizon-2012.2.2/horizon/dashboards/nova/images_and_snapshots/views.py --- old/horizon-2012.2.2/horizon/dashboards/nova/images_and_snapshots/views.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/dashboards/nova/images_and_snapshots/views.py 2013-01-23 22:40:11.000000000 +0100 @@ -28,6 +28,7 @@ from django.utils.translation import ugettext_lazy as _ from horizon import api +from horizon.api.base import is_service_enabled from horizon import exceptions from horizon import tables from horizon import tabs @@ -74,12 +75,15 @@ return snaps def get_volume_snapshots_data(self): - try: - snapshots = api.volume_snapshot_list(self.request) - except: + if is_service_enabled(self.request, 'volume'): + try: + snapshots = api.volume_snapshot_list(self.request) + except: + snapshots = [] + exceptions.handle(self.request, _("Unable to retrieve " + "volume snapshots.")) + else: snapshots = [] - exceptions.handle(self.request, _("Unable to retrieve " - "volume snapshots.")) return snapshots diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/dashboards/settings/ec2/panel.py new/horizon-2012.2.2/horizon/dashboards/settings/ec2/panel.py --- old/horizon-2012.2.2/horizon/dashboards/settings/ec2/panel.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/dashboards/settings/ec2/panel.py 2013-01-23 22:40:11.000000000 +0100 @@ -23,6 +23,7 @@ class EC2Panel(horizon.Panel): name = _("EC2 Credentials") slug = 'ec2' + permissions = ('openstack.services.ec2',) dashboard.Settings.register(EC2Panel) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/dashboards/syspanel/networks/forms.py new/horizon-2012.2.2/horizon/dashboards/syspanel/networks/forms.py --- old/horizon-2012.2.2/horizon/dashboards/syspanel/networks/forms.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/dashboards/syspanel/networks/forms.py 2013-01-23 22:40:11.000000000 +0100 @@ -40,7 +40,7 @@ def _instantiate(cls, request, *args, **kwargs): return cls(request, *args, **kwargs) - def __init__(self, request, *args, **kwargs): + def __init__(self, request, *args, **kwargs): super(CreateNetwork, self).__init__(request, *args, **kwargs) tenant_choices = [('', _("Select a project"))] for tenant in api.keystone.tenant_list(request, admin=True): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/dashboards/syspanel/projects/workflows.py new/horizon-2012.2.2/horizon/dashboards/syspanel/projects/workflows.py --- old/horizon-2012.2.2/horizon/dashboards/syspanel/projects/workflows.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/dashboards/syspanel/projects/workflows.py 2013-01-23 22:40:11.000000000 +0100 @@ -33,16 +33,18 @@ class UpdateProjectQuotaAction(workflows.Action): ifcb_label = _("Injected File Content Bytes") - metadata_items = forms.IntegerField(min_value=0, label=_("Metadata Items")) - cores = forms.IntegerField(min_value=0, label=_("VCPUs")) - instances = forms.IntegerField(min_value=0, label=_("Instances")) - injected_files = forms.IntegerField(min_value=0, label=_("Injected Files")) - injected_file_content_bytes = forms.IntegerField(min_value=0, + metadata_items = forms.IntegerField(min_value=-1, + label=_("Metadata Items")) + cores = forms.IntegerField(min_value=-1, label=_("VCPUs")) + instances = forms.IntegerField(min_value=-1, label=_("Instances")) + injected_files = forms.IntegerField(min_value=-1, + label=_("Injected Files")) + injected_file_content_bytes = forms.IntegerField(min_value=-1, label=ifcb_label) - volumes = forms.IntegerField(min_value=0, label=_("Volumes")) - gigabytes = forms.IntegerField(min_value=0, label=_("Gigabytes")) - ram = forms.IntegerField(min_value=0, label=_("RAM (MB)")) - floating_ips = forms.IntegerField(min_value=0, label=_("Floating IPs")) + volumes = forms.IntegerField(min_value=-1, label=_("Volumes")) + gigabytes = forms.IntegerField(min_value=-1, label=_("Gigabytes")) + ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)")) + floating_ips = forms.IntegerField(min_value=-1, label=_("Floating IPs")) class Meta: name = _("Quota") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/templates/horizon/common/_quota_summary.html new/horizon-2012.2.2/horizon/templates/horizon/common/_quota_summary.html --- old/horizon-2012.2.2/horizon/templates/horizon/common/_quota_summary.html 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/templates/horizon/common/_quota_summary.html 2013-01-23 22:40:11.000000000 +0100 @@ -2,12 +2,12 @@ <div class="quota-dynamic"> <h3>{% trans "Quota Summary" %}</h3> - <strong>{% trans "Used" %}<span> {{ usage.quota.instances.used|intcomma }} </span> {% trans "of" %} <span> {{ usage.quota.instances.quota|intcomma }} </span>{% trans "Available Instances" %} </strong> - {% horizon_progress_bar usage.quota.instances.used usage.quota.instances.quota %} + <strong>{% trans "Used" %}<span> {{ usage.quotas.instances.used|intcomma }} </span> {% trans "of" %} <span> {{ usage.quotas.instances.quota|intcomma }} </span>{% trans "Available Instances" %} </strong> + {% horizon_progress_bar usage.quotas.instances.used usage.quotas.instances.quota %} - <strong>{% trans "Used" %} <span> {{ usage.quota.cores.used|intcomma }} </span>{% trans "of" %}<span> {{ usage.quota.cores.quota|intcomma }} </span>{% trans "Available vCPUs" %} </strong> - {% horizon_progress_bar usage.quota.cores.used usage.quota.cores.quota %} + <strong>{% trans "Used" %} <span> {{ usage.quotas.cores.used|intcomma }} </span>{% trans "of" %}<span> {{ usage.quotas.cores.quota|intcomma }} </span>{% trans "Available vCPUs" %} </strong> + {% horizon_progress_bar usage.quotas.cores.used usage.quotas.cores.quota %} - <strong>{% trans "Used" %} <span> {{ usage.quota.ram.used|intcomma }} MB </span>{% trans "of" %}<span> {{ usage.quota.ram.quota|intcomma }} MB </span>{% trans "Available RAM" %} </strong> - {% horizon_progress_bar usage.quota.ram.used usage.quota.ram.quota %} + <strong>{% trans "Used" %} <span> {{ usage.quotas.ram.used|intcomma }} MB </span>{% trans "of" %}<span> {{ usage.quotas.ram.quota|intcomma }} MB </span>{% trans "Available RAM" %} </strong> + {% horizon_progress_bar usage.quotas.ram.used usage.quotas.ram.quota %} </div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/templatetags/horizon.py new/horizon-2012.2.2/horizon/templatetags/horizon.py --- old/horizon-2012.2.2/horizon/templatetags/horizon.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/templatetags/horizon.py 2013-01-23 22:40:11.000000000 +0100 @@ -21,6 +21,7 @@ from django.utils.translation import ugettext as _ from horizon.base import Horizon +from django.conf import settings register = template.Library() @@ -135,3 +136,8 @@ nodelist = parser.parse(('endjstemplate',)) parser.delete_first_token() return JSTemplateNode(nodelist) + + +@register.assignment_tag +def load_config(): + return getattr(settings, 'HORIZON_CONFIG', {}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/test.py new/horizon-2012.2.2/horizon/test.py --- old/horizon-2012.2.2/horizon/test.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/test.py 2013-01-23 22:40:11.000000000 +0100 @@ -36,6 +36,7 @@ from novaclient.v1_1 import client as nova_client from quantumclient.v2_0 import client as quantum_client from swiftclient import client as swift_client +from cinderclient import client as cinder_client from selenium.webdriver.firefox.webdriver import WebDriver @@ -293,12 +294,14 @@ self._original_keystoneclient = api.keystone.keystoneclient self._original_novaclient = api.nova.novaclient self._original_quantumclient = api.quantum.quantumclient + self._original_cinderclient = api.nova.cinderclient # Replace the clients with our stubs. api.glance.glanceclient = lambda request: self.stub_glanceclient() api.keystone.keystoneclient = fake_keystoneclient api.nova.novaclient = lambda request: self.stub_novaclient() api.quantum.quantumclient = lambda request: self.stub_quantumclient() + api.nova.cinderclient = lambda request: self.stub_cinderclient() def tearDown(self): super(APITestCase, self).tearDown() @@ -306,6 +309,7 @@ api.nova.novaclient = self._original_novaclient api.keystone.keystoneclient = self._original_keystoneclient api.quantum.quantumclient = self._original_quantumclient + api.nova.cinderclient = self._original_cinderclient def stub_novaclient(self): if not hasattr(self, "novaclient"): @@ -313,6 +317,12 @@ self.novaclient = self.mox.CreateMock(nova_client.Client) return self.novaclient + def stub_cinderclient(self): + if not hasattr(self, "cinderclient"): + self.mox.StubOutWithMock(cinder_client, 'Client') + self.cinderclient = self.mox.CreateMock(cinder_client.Client) + return self.cinderclient + def stub_keystoneclient(self): if not hasattr(self, "keystoneclient"): self.mox.StubOutWithMock(keystone_client, 'Client') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/tests/api_tests/cinder_tests.py new/horizon-2012.2.2/horizon/tests/api_tests/cinder_tests.py --- old/horizon-2012.2.2/horizon/tests/api_tests/cinder_tests.py 1970-01-01 01:00:00.000000000 +0100 +++ new/horizon-2012.2.2/horizon/tests/api_tests/cinder_tests.py 2013-01-23 22:40:11.000000000 +0100 @@ -0,0 +1,56 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2012 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from horizon import api +from horizon import test + + +class CinderApiTests(test.APITestCase): + def test_volume_list(self): + search_opts = {'all_tenants': 1} + volumes = self.volumes.list() + cinderclient = self.stub_cinderclient() + cinderclient.volumes = self.mox.CreateMockAnything() + cinderclient.volumes.list(search_opts=search_opts,).AndReturn(volumes) + self.mox.ReplayAll() + + # No assertions are necessary. Verification is handled by mox. + api.nova.volume_list(self.request, search_opts=search_opts) + + def test_volume_snapshot_list(self): + volume_snapshots = self.volume_snapshots.list() + cinderclient = self.stub_cinderclient() + cinderclient.volume_snapshots = self.mox.CreateMockAnything() + cinderclient.volume_snapshots.list().AndReturn(volume_snapshots) + self.mox.ReplayAll() + + api.nova.volume_snapshot_list(self.request) + + def test_volume_snapshot_list_no_volume_configured(self): + # remove volume from service catalog + catalog = self.service_catalog + for service in catalog: + if service["type"] == "volume": + self.service_catalog.remove(service) + volume_snapshots = self.volume_snapshots.list() + + cinderclient = self.stub_cinderclient() + cinderclient.volume_snapshots = self.mox.CreateMockAnything() + cinderclient.volume_snapshots.list().AndReturn(volume_snapshots) + self.mox.ReplayAll() + + api.nova.volume_snapshot_list(self.request) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon/tests/api_tests/nova_tests.py new/horizon-2012.2.2/horizon/tests/api_tests/nova_tests.py --- old/horizon-2012.2.2/horizon/tests/api_tests/nova_tests.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/horizon/tests/api_tests/nova_tests.py 2013-01-23 22:40:11.000000000 +0100 @@ -204,3 +204,54 @@ 'quota': 10}} self.assertEquals(quota_usages, expected_output) + + @test.create_stubs({api.nova: ('volume_list', + 'server_list', + 'flavor_list', + 'tenant_floating_ip_list', + 'tenant_quota_get',)}) + def test_tenant_quota_usages_unlimited_quota(self): + inf_quota = self.quotas.first() + inf_quota.ram = -1 + + api.nova.flavor_list(IsA(http.HttpRequest)) \ + .AndReturn(self.flavors.list()) + api.nova.tenant_quota_get(IsA(http.HttpRequest), '1') \ + .AndReturn(inf_quota) + api.nova.tenant_floating_ip_list(IsA(http.HttpRequest)) \ + .AndReturn(self.floating_ips.list()) + api.nova.server_list(IsA(http.HttpRequest)) \ + .AndReturn(self.servers.list()) + api.nova.volume_list(IsA(http.HttpRequest)) \ + .AndReturn(self.volumes.list()) + + self.mox.ReplayAll() + + quota_usages = api.tenant_quota_usages(self.request) + expected_output = {'gigabytes': { + 'used': 80, + 'flavor_fields': [], + 'quota': 1000}, + 'ram': { + 'available': float("inf"), + 'used': 1024, + 'flavor_fields': ['ram'], + 'quota': float("inf")}, + 'floating_ips': { + 'used': 2, + 'flavor_fields': [], + 'quota': 1}, + 'instances': { + 'used': 2, + 'flavor_fields': [], + 'quota': 10}, + 'volumes': { + 'used': 3, + 'flavor_fields': [], + 'quota': 1}, + 'cores': { + 'used': 2, + 'flavor_fields': ['vcpus'], + 'quota': 10}} + + self.assertEquals(quota_usages, expected_output) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/horizon.egg-info/SOURCES.txt new/horizon-2012.2.2/horizon.egg-info/SOURCES.txt --- old/horizon-2012.2.2/horizon.egg-info/SOURCES.txt 2012-11-30 02:35:50.000000000 +0100 +++ new/horizon-2012.2.2/horizon.egg-info/SOURCES.txt 2013-01-23 22:42:57.000000000 +0100 @@ -628,6 +628,7 @@ horizon/tests/workflows_tests.py horizon/tests/api_tests/__init__.py horizon/tests/api_tests/base_tests.py +horizon/tests/api_tests/cinder_tests.py horizon/tests/api_tests/glance_tests.py horizon/tests/api_tests/keystone_tests.py horizon/tests/api_tests/nova_tests.py @@ -783,7 +784,9 @@ openstack_dashboard/templates/500.html openstack_dashboard/templates/_stylesheets.html openstack_dashboard/test/__init__.py +openstack_dashboard/test/error_pages_urls.py openstack_dashboard/test/settings.py +openstack_dashboard/test/tests/error_pages.py openstack_dashboard/wsgi/django.wsgi tools/install_venv.py tools/pip-requires diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/openstack_dashboard/static/dashboard/less/horizon.less new/horizon-2012.2.2/openstack_dashboard/static/dashboard/less/horizon.less --- old/horizon-2012.2.2/openstack_dashboard/static/dashboard/less/horizon.less 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/openstack_dashboard/static/dashboard/less/horizon.less 2013-01-23 22:40:11.000000000 +0100 @@ -823,6 +823,9 @@ min-width: 140px; min-height: 20px; } +#floating_ips td.actions_column { + width: 180px; +} td.actions_column .row_actions a, td.actions_column .row_actions input, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/openstack_dashboard/templates/500.html new/horizon-2012.2.2/openstack_dashboard/templates/500.html --- old/horizon-2012.2.2/openstack_dashboard/templates/500.html 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/openstack_dashboard/templates/500.html 2013-01-23 22:40:02.000000000 +0100 @@ -1,27 +1,82 @@ -{% extends "base.html" %} -{% load i18n %} +{% load branding i18n staticfiles %} +{% load load_config from horizon %} -{% block title %} - {% trans "Internal Server Error" %}{% endblock %} +{% load_config as HORIZON_CONFIG %} -{% block content %} - <div id="right_content"> - <div id="page_head"> - <h2 id="page_heading">{% trans "Internal Server Error" %}</h2> - <p id="page_description">{% trans "An unexpected error occurred while processing your request. Please try your request again." %}</p> - </div> - </div> -{% endblock %} -{% block sidebar %} - <div id="sidebar"> - <ul id="navigation"> - {% block nav_home %} - <li><h3><a href="{% url index %}">{% trans "Home" %}</a></h3></li> - {% endblock %} - - {% block nav_projects %} - <li><h3><a href="{% url index %}">{% trans "Projects" %}</a></h3></li> - {% endblock %} - </ul> - </div> <!-- end sidebar --> -{% endblock %} +{% comment %} + + NB: The context for 500 pages is an empty dict. + Don't add any content here that depends on things from + the context. + +{% endcomment %} + +<!DOCTYPE html> +<html> + <head> + <meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> + <link rel="shortcut icon" href="{% static "dashboard/img/favicon.ico" %}"/> + <title>{% trans "Server error" %} - {% site_branding %}</title> + {% block css %} + <style> + a { + color: #43a1d6; + text-decoration: none; + } + body { + color: rgb(106, 106, 106); + text-align: center; + font-weight: normal; + background: none repeat scroll 0% 0% rgb(250, 250, 250); + } + div#container { + position: absolute; + top: 80px; + padding-top: 170px; + margin: 0px 0px 0px -196px; + left: 50%; + width: 390px; + + background: url("{% static "dashboard/img/logo.png" %}") no-repeat scroll center 35px padding-box rgb(255, 255, 255); + border: 1px solid rgb(225, 225, 225); + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + + box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3); + } + h2 { + font-weight: normal; + } + div#container > div { + padding: 25px; + } + </style> + {% endblock %} + </head> + <body id="{% block body_id %}{% endblock %}"> + {% block page_header %}{% endblock %} + {% block content %} + <div id="container"> + <div id="text"> + {% block text %} + <h2>{% trans "Something went wrong!" %}</h2> + <p>{% trans "An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator." %}</p> + {% endblock %} + </div> + <div id="links"> + {% block links %} + <p><a href="/">{% trans "Home" %}</a></p> + <p><a href="{{ HORIZON_CONFIG.help_url }}">{% trans "Help" %}</a></p> + {% endblock %} + </div> + </div> + {% endblock %} + {% block footer %}{% endblock %} + {% block js %}{% endblock %} + </body> +</html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/openstack_dashboard/test/error_pages_urls.py new/horizon-2012.2.2/openstack_dashboard/test/error_pages_urls.py --- old/horizon-2012.2.2/openstack_dashboard/test/error_pages_urls.py 1970-01-01 01:00:00.000000000 +0100 +++ new/horizon-2012.2.2/openstack_dashboard/test/error_pages_urls.py 2013-01-23 22:40:11.000000000 +0100 @@ -0,0 +1,7 @@ +from django.conf.urls import patterns, url, include + +from openstack_dashboard.urls import urlpatterns + +urlpatterns += patterns('', + (r'^500/$', 'django.views.defaults.server_error') +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/openstack_dashboard/test/tests/error_pages.py new/horizon-2012.2.2/openstack_dashboard/test/tests/error_pages.py --- old/horizon-2012.2.2/openstack_dashboard/test/tests/error_pages.py 1970-01-01 01:00:00.000000000 +0100 +++ new/horizon-2012.2.2/openstack_dashboard/test/tests/error_pages.py 2013-01-23 22:40:11.000000000 +0100 @@ -0,0 +1,34 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright (c) 2012 OpenStack, LLC. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from os import path + +from django.conf import settings + +from horizon import exceptions +from openstack_dashboard.test import helpers as test + + +class ErrorPageTests(test.TestCase): + """ Tests for error pages """ + urls = 'openstack_dashboard.test.error_pages_urls' + + def test_500_error(self): + TEMPLATE_DIRS = (path.join(settings.ROOT_PATH, 'templates'),) + with self.settings(TEMPLATE_DIRS=TEMPLATE_DIRS): + response = self.client.get('/500/') + self.assertTrue('Server error' in response.content) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/openstack_dashboard/urls.py new/horizon-2012.2.2/openstack_dashboard/urls.py --- old/horizon-2012.2.2/openstack_dashboard/urls.py 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/openstack_dashboard/urls.py 2013-01-23 22:40:11.000000000 +0100 @@ -42,3 +42,8 @@ # development. Only active if DEBUG==True and the URL prefix is a local # path. Production media should NOT be served by Django. urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + +if settings.DEBUG: + urlpatterns += patterns('', + url(r'^500/$', 'django.views.defaults.server_error') + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/horizon-2012.2.2/tools/test-requires new/horizon-2012.2.2/tools/test-requires --- old/horizon-2012.2.2/tools/test-requires 2012-11-30 02:32:30.000000000 +0100 +++ new/horizon-2012.2.2/tools/test-requires 2013-01-23 22:40:11.000000000 +0100 @@ -16,3 +16,4 @@ # Docs Requirements sphinx +docutils==0.9.1 # for bug 1091333, remove after sphinx >1.1.3 is released. -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org