lib/vagrant-vcloud/cap/forwarded_ports.rb in vagrant-vcloud-0.3.3 vs lib/vagrant-vcloud/cap/forwarded_ports.rb in vagrant-vcloud-0.4.0
- old
+ new
@@ -1,10 +1,9 @@
module VagrantPlugins
module VCloud
module Cap
module ForwardedPorts
-
# Reads the forwarded ports that currently exist on the machine
# itself. This raises an exception if the machine isn't running.
#
# This also may not match up with configured forwarded ports, because
# Vagrant auto port collision fixing may have taken place.
@@ -18,13 +17,11 @@
vapp_id = machine.get_vapp_id
vm_name = machine.name
vm = cnx.get_vapp(vapp_id)
myhash = vm[:vms_hash][vm_name.to_sym]
- if vm.nil?
- return
- end
+ return if vm.nil?
if cfg.network_bridge.nil?
rules = cnx.get_vapp_port_forwarding_rules(vapp_id)
rules.each do |rule|
@@ -33,11 +30,9 @@
end
end
end
result
end
-
end
end
end
end
-