Merge lp:~jakedahn/horizon/lp770538 into lp:~hudson-openstack/horizon/trunk

Proposed by Jake Dahn
Status: Merged
Approved by: Devin Carlen
Approved revision: 42
Merged at revision: 41
Proposed branch: lp:~jakedahn/horizon/lp770538
Merge into: lp:~hudson-openstack/horizon/trunk
Diff against target: 21 lines (+4/-0)
1 file modified
django-nova/src/django_nova/views/instances.py (+4/-0)
To merge this branch: bzr merge lp:~jakedahn/horizon/lp770538
Reviewer Review Type Date Requested Status
Devin Carlen Approve
Review via email: mp+59008@code.launchpad.net

Description of the change

This branch prevents openstack-dashboard from erroring out when a netadmin tries to modify instance details. It also adds a proper error message for when users who try to terminate instances without permission.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django-nova/src/django_nova/views/instances.py'
2--- django-nova/src/django_nova/views/instances.py 2011-04-19 12:21:54 +0000
3+++ django-nova/src/django_nova/views/instances.py 2011-04-26 00:44:22 +0000
4@@ -129,6 +129,8 @@
5 messages.error(request,
6 'Unable to terminate %s: %s' %
7 (instance_id, e.message,))
8+ except exceptions.NovaUnauthorizedError, e:
9+ messages.error(request, 'Permission Denied')
10 else:
11 messages.success(request,
12 'Instance %s has been terminated.' % instance_id)
13@@ -190,6 +192,8 @@
14 messages.error(request,
15 'Unable to update instance %s: %s' %
16 (instance_id, e.message,))
17+ except exceptions.NovaUnauthorizedError, e:
18+ messages.error(request, 'Permission Denied')
19 else:
20 messages.success(request,
21 'Instance %s has been updated.' % instance_id)

Subscribers

People subscribed via source and target branches