 	*
 	* @param {string} vm
 	* @param {number} nic
-	* @param {string} network
+	* @param {string} netname
 	* @param {function(?err)} callback
 ###
-exports.set_hostonly = (vm, nic, network, callback) ->
-	command.exec 'modifyvm', vm, "--nic#{nic}", 'hostonly', "--hostonlyadapter#{nic}", network, (err, code, output) ->
+exports.set_hostonly = (vm, nic, netname, callback) ->
+	command.exec 'modifyvm', vm, "--nic#{nic}", 'hostonly', "--hostonlyadapter#{nic}", netname, (err, code, output) ->
 		return callback err if err
 		return callback new Error "cannot set hostonly network for nic #{nic} on #{vm}" if code > 0
 		return do callback if callback

exports.set_nat = (vm, nic, callback) ->
	command.exec 'modifyvm', vm, "--nic#{nic}", 'nat', (err, code, output) ->
		return callback err if err
		return callback new Error "cannot set nat network for nic #{nic} on #{vm}" if code > 0
		return do callback if callback
		
			
			continue if not match
			
			index = parseInt(match[1]) + 1
			path = match[2]
			oref = ref = adaptors["Adaptor #{index}"] ?= {}
			
			for key in path.split('/')
				path = key
				oref = ref
				ref = ref[path] ?= {}
				
			oref[path] = val.value
			
		callback null, adaptors if callback

