Example #1
0
def remove_bridge(api, request, type, group, hostname):
	api.external_network_bridge_remove(hostname, type, group)
	origin = request.REQUEST.get("origin")
	if origin == "en":
		return index(request)
	else:
		import host
		return host.detail(request, hostname)
Example #2
0
def add_bridge(api, request):
	(type, group) = request.REQUEST["typegroup"].split(":")
	bridge = request.REQUEST["bridge"]
	hostn = request.REQUEST["host"]
	api.external_network_bridge_add(hostn, type, group, bridge)
	origin = request.REQUEST.get("origin")
	if origin == "en":
		return index(request)
	else:
		import host
		return host.detail(request, hostn)
Example #3
0
def remove_bridge(api, request, type, group, hostname):
	api.external_network_bridge_remove(hostname, type, group)
	import host
	return host.detail(request, hostname)
Example #4
0
def add_bridge(api, request, hostname):
	(type, group) = request.REQUEST["typegroup"].split(":")
	bridge = request.REQUEST["bridge"]
	api.external_network_bridge_add(hostname, type, group, bridge)
	import host
	return host.detail(request, hostname)