From fce355eda267f00881070971ddceb4878569398f Mon Sep 17 00:00:00 2001 From: Fabio Rapposelli Date: Wed, 9 Apr 2014 18:54:01 +0100 Subject: [PATCH 1/2] Fixing Issue #32 and Version Bump to v0.2.2 --- lib/vagrant-vcloud/action.rb | 10 +++++++--- lib/vagrant-vcloud/version.rb | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/vagrant-vcloud/action.rb b/lib/vagrant-vcloud/action.rb index f6f133a..313dcfc 100644 --- a/lib/vagrant-vcloud/action.rb +++ b/lib/vagrant-vcloud/action.rb @@ -3,6 +3,8 @@ module VagrantPlugins module VCloud + # This module dictates the actions to be performed by Vagrant when called + # with a specific command module Action include Vagrant::Action::Builtin @@ -69,9 +71,6 @@ def self.action_halt b.use Call, IsPaused do |env, b2| b2.use Resume if env[:result] end - b.use Call, IsBridged do |env, b2| - b2.use UnmapPortForwardings unless env[:bridged_network] - end b.use PowerOff end end @@ -106,6 +105,11 @@ def self.action_destroy b2.use Call, IsRunning do |env2, b3| # If the VM is running, must power off b3.use action_halt if env2[:result] + # Check if the network is bridged + b3.use Call, IsBridged do |env3, b4| + # if it's not, delete port forwardings. + b4.use UnmapPortForwardings unless env3[:bridged_network] + end b3.use Destroy end else diff --git a/lib/vagrant-vcloud/version.rb b/lib/vagrant-vcloud/version.rb index 707e1ee..1cb4400 100644 --- a/lib/vagrant-vcloud/version.rb +++ b/lib/vagrant-vcloud/version.rb @@ -1,5 +1,5 @@ module VagrantPlugins module VCloud - VERSION = '0.2.1' + VERSION = '0.2.2' end end From a0dc2cd3cbc5c32a0a76f9f9406ea073472cce29 Mon Sep 17 00:00:00 2001 From: Fabio Rapposelli Date: Wed, 9 Apr 2014 18:58:40 +0100 Subject: [PATCH 2/2] updated README file --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7297bef..1b59f15 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ [Vagrant](http://www.vagrantup.com) provider for VMware vCloud Director® ============= -[Version 0.2.1](https://github.com/frapposelli/vagrant-vcloud/releases/tag/v0.2.1) has been released! +[Version 0.2.2](https://github.com/frapposelli/vagrant-vcloud/releases/tag/v0.2.2) has been released! ------------- Please note that this software is still Alpha/Beta quality and is not recommended for production usage. Right now a [Precise32](http://vagrant.tsugliani.fr/precise32.box) is available for use, or you can roll your own as you please, make sure to install VMware tools in it. +Features of Version 0.2.2 are: + +- Fixed Issue #32 - Port Forwarding rules are deleted when Halting a VM. + Features of Version 0.2.1 are: - Critical Bugfixes