Support for NAT connection with cloud for VMware VMs. Fixes #322.

This commit is contained in:
grossmj
2015-10-12 17:07:39 -06:00
parent b53f0e89ce
commit 57bbd63085
2 changed files with 20 additions and 14 deletions

View File

@ -271,7 +271,7 @@ class VMwareHandler:
vmware_manager = VMware.instance()
vm = vmware_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"])
nio_type = request.json["type"]
if nio_type not in ("nio_udp", "nio_vmnet"):
if nio_type not in ("nio_udp", "nio_vmnet", "nio_nat"):
raise HTTPConflict(text="NIO of type {} is not supported".format(nio_type))
nio = vmware_manager.create_nio(None, request.json)
yield from vm.adapter_add_nio_binding(int(request.match_info["adapter_number"]), nio)