def port_attach(request, network_id, port_id): attach_form, handled = AttachPort.maybe_handle(request, initial={ "network": network_id, "port": port_id}) if handled: return shortcuts.redirect('horizon:nova:networks:detail', network_id=network_id) return shortcuts.render(request, 'nova/ports/attach.html', { 'network': network_id, 'port': port_id, 'attach_form': attach_form})
def port_attach(request, network_id, port_id): attach_form, handled = AttachPort.maybe_handle(request) if handled: return shortcuts.redirect('horizon:nova:networks:detail', network_id=network_id) # Get all avaliable vifs vifs = _get_available_vifs(request) return shortcuts.render(request, 'nova/ports/attach.html', { 'network': network_id, 'port': port_id, 'attach_form': attach_form, 'vifs': vifs})
def port_attach(request, network_id, port_id): attach_form, handled = AttachPort.maybe_handle(request, initial={ "network": network_id, "port": port_id }) if handled: return shortcuts.redirect('horizon:nova:networks:detail', network_id=network_id) return shortcuts.render(request, 'nova/ports/attach.html', { 'network': network_id, 'port': port_id, 'attach_form': attach_form })