Merge "Change tenant to project in python code to match templates."

This commit is contained in:
Jenkins 2012-06-06 19:11:04 +00:00 committed by Gerrit Code Review
commit 69599887a1

View File

@ -49,9 +49,9 @@ class AddUser(forms.SelfHandlingForm):
data['tenant_id'], data['tenant_id'],
data['user_id'], data['user_id'],
data['role_id']) data['role_id'])
messages.success(request, _('Successfully added user to tenant.')) messages.success(request, _('Successfully added user to project.'))
except: except:
exceptions.handle(request, _('Unable to add user to tenant.')) exceptions.handle(request, _('Unable to add user to project.'))
return shortcuts.redirect('horizon:syspanel:projects:users', return shortcuts.redirect('horizon:syspanel:projects:users',
tenant_id=data['tenant_id']) tenant_id=data['tenant_id'])
@ -66,7 +66,7 @@ class CreateTenant(forms.SelfHandlingForm):
def handle(self, request, data): def handle(self, request, data):
try: try:
LOG.info('Creating tenant with name "%s"' % data['name']) LOG.info('Creating project with name "%s"' % data['name'])
api.tenant_create(request, api.tenant_create(request,
data['name'], data['name'],
data['description'], data['description'],
@ -75,7 +75,7 @@ class CreateTenant(forms.SelfHandlingForm):
_('%s was successfully created.') _('%s was successfully created.')
% data['name']) % data['name'])
except: except:
exceptions.handle(request, _('Unable to create tenant.')) exceptions.handle(request, _('Unable to create project.'))
return shortcuts.redirect('horizon:syspanel:projects:index') return shortcuts.redirect('horizon:syspanel:projects:index')
@ -90,7 +90,7 @@ class UpdateTenant(forms.SelfHandlingForm):
def handle(self, request, data): def handle(self, request, data):
try: try:
LOG.info('Updating tenant with id "%s"' % data['id']) LOG.info('Updating project with id "%s"' % data['id'])
api.tenant_update(request, api.tenant_update(request,
data['id'], data['id'],
data['name'], data['name'],
@ -100,7 +100,7 @@ class UpdateTenant(forms.SelfHandlingForm):
_('%s was successfully updated.') _('%s was successfully updated.')
% data['name']) % data['name'])
except: except:
exceptions.handle(request, _('Unable to update tenant.')) exceptions.handle(request, _('Unable to update project.'))
return shortcuts.redirect('horizon:syspanel:projects:index') return shortcuts.redirect('horizon:syspanel:projects:index')