def import_keypair(request): form, handled = ImportKeypair.maybe_handle(request) if handled: return handled return shortcuts.render(request, 'nova/keypairs/import.html', { 'import_form': form, 'create_form': form })
def import_keypair(request): form, handled = ImportKeypair.maybe_handle(request) if handled: return handled return shortcuts.render(request, 'nova/keypairs/import.html', { 'import_form': form, 'create_form': form})
def import_keypair(request): form, handled = ImportKeypair.maybe_handle(request) if handled: return handled context = {'form': form} if request.is_ajax(): template = 'nova/keypairs/_import.html' context['hide'] = True else: template = 'nova/keypairs/import.html' return shortcuts.render(request, template, context)
def index(request): delete_form, handled = DeleteKeypair.maybe_handle(request) if handled: return handled create_form = CreateKeypair() import_form = ImportKeypair() try: keypairs = api.keypair_list(request) except novaclient_exceptions.ClientException, e: keypairs = [] LOG.exception("ClientException in keypair index") messages.error(request, _('Error fetching keypairs: %s') % e.message)