mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-06-08 21:34:36 +00:00
adds link state option for instance networks. Enable/disable link while instance running
This commit is contained in:
@@ -873,6 +873,15 @@ def instance(request, compute_id, vname):
|
||||
addlogmsg(request.user.username, instance.name, msg)
|
||||
return HttpResponseRedirect(request.get_full_path() + '#network')
|
||||
|
||||
if 'set_link_state' in request.POST:
|
||||
mac_address = request.POST.get('mac', '')
|
||||
state = request.POST.get('set_link_state')
|
||||
state = 'down' if state == 'up' else 'up'
|
||||
conn.set_link_state(mac_address, state)
|
||||
msg = _("Set Link State: {}".format(state))
|
||||
addlogmsg(request.user.username, instance.name, msg)
|
||||
return HttpResponseRedirect(request.get_full_path() + '#network')
|
||||
|
||||
if 'set_qos' in request.POST:
|
||||
qos_dir = request.POST.get('qos_direction', '')
|
||||
average = request.POST.get('qos_average') or 0
|
||||
|
||||
Reference in New Issue
Block a user