frapposelli/vagrant-vcloud — pull request #42 by StefanScherer (2014-04-28 19:47:04+00:00)
Title: Improve vcloud-status --all command

I have modified the `vagrant vcloud-status --all` command to fix an issue with my #PR38. It showed the vApp rules more than once due to the nested loop.
The vcloud-status command also did not show any port rules if no edge gateway is used. The changed code now works with or without the edge gateway rules. It shows at least the vApp net port forwarding rules to the VM's.

Without the edge gateway (eg. working from inside the vCloud from another 'host' VM using vagrant) it shows the vApp (10.115.4.2):

```
+---------------------+-------------------------------------+---------+
| Vagrant vCloud Director Network Map |
+---------------------+-------------------------------------+---------+
| VM Name | Destination NAT Mapping | Enabled |
+---------------------+-------------------------------------+---------+
| ssh-vm | 10.115.4.2:2205 -> 172.16.32.115:80 | true |
| ssh-vm | 10.115.4.2:2206 -> 172.16.32.115:22 | true |
| web-vm | 10.115.4.2:8080 -> 172.16.32.114:80 | true |
| web-vm | 10.115.4.2:2204 -> 172.16.32.114:22 | true |
+---------------------+-------------------------------------+---------+
| Network Name | Source NAT Mapping | Enabled |
+---------------------+-------------------------------------+---------+
+---------------------+-------------------------------------+---------+
| Rule# - Description | Firewall Rules | Enabled |
+---------------------+-------------------------------------+---------+
+---------------------+-------------------------------------+---------+
```

And from outside my vCloud I only have connection through the edge gateway it shows another vApp (10.115.4.3) built with the same Vagrantfile from another host:

```
+------------------------------------+---------------------------------------------------------+---------+
| Vagrant vCloud Director Network Map |
+------------------------------------+---------------------------------------------------------+---------+
| VM Name | Destination NAT Mapping | Enabled |
+------------------------------------+---------------------------------------------------------+---------+
| ssh-vm | 10.100.50.4:2205 -> 10.115.4.3:2205 -> 176.16.32.115:80 | true |
| ssh-vm | 10.100.50.4:2206 -> 10.115.4.3:2206 -> 176.16.32.115:22 | true |
| web-vm | 10.100.50.4:8080 -> 10.115.4.3:8080 -> 176.16.32.114:80 | true |
| web-vm | 10.100.50.4:2204 -> 10.115.4.3:2204 -> 176.16.32.114:22 | true |
+------------------------------------+---------------------------------------------------------+---------+
| Network Name | Source NAT Mapping | Enabled |
+------------------------------------+---------------------------------------------------------+---------+
| VM1-extern | 10.115.4.3 -> 10.100.50.4 | true |
+------------------------------------+---------------------------------------------------------+---------+
| Rule# - Description | Firewall Rules | Enabled |
+------------------------------------+---------------------------------------------------------+---------+
| 1 - (Allow Vagrant Communications) | allow SRC:Any:Any to DST:10.100.50.4:Any | true |
+------------------------------------+---------------------------------------------------------+---------+
```

Both vApps are running in the same vOrg.