Пример #1
0
def rename(request, network_id):
    rename_form, handled = RenameNetwork.maybe_handle(request)
    network_details = api.quantum_network_details(request, network_id)

    if handled:
        return shortcuts.redirect('horizon:nova:networks:index')

    return shortcuts.render(request,
                            'nova/networks/rename.html', {
                                'network': network_details,
                                'rename_form': rename_form})
Пример #2
0
def rename(request, network_id):
    network_details = api.quantum_network_details(request, network_id)
    network = network_details['network']

    rename_form, handled = RenameNetwork.maybe_handle(request, initial={
                                                'network': network['id'],
                                                'new_name': network['name']})

    if handled:
        return shortcuts.redirect('horizon:nova:networks:index')

    return shortcuts.render(request,
                            'nova/networks/rename.html', {
                                'network': network,
                                'rename_form': rename_form})
Пример #3
0
def rename(request, network_id):
    network_details = api.quantum_network_details(request, network_id)
    network = network_details['network']

    rename_form, handled = RenameNetwork.maybe_handle(request,
                                                      initial={
                                                          'network':
                                                          network['id'],
                                                          'new_name':
                                                          network['name']
                                                      })

    if handled:
        return shortcuts.redirect('horizon:nova:networks:index')

    return shortcuts.render(request, 'nova/networks/rename.html', {
        'network': network,
        'rename_form': rename_form
    })