I'm looking for a way to get and set firewall rules on a vShield Edge firewall in a vCloud environment. My final target is to write two scripts; one that will export the firewall rules from a given vShield Edge firewall to CSV and another script that will import them from CSV into another vShield Edge firewall. This is to help with a DR scenario where we'll shift a public IP block from a public facing vShield Edge in one vCloud environment to one in another environment.
I need to do this through the vCloud API or PowerCLI because, if I do it directly at the vShield Manager, vCloud won't know about the changes that have been made. I'm not a Powershell expert by any means but I'm picking things up as I have a need for them. I've looked through several blog posts people have written and it looks as though I need to dig down into ExtensionData as there aren't get and sets for the info I'm after. I've found some info which is really close to what I'm after in this post:
This covers pulling the information from the GetNetworkConfigSection method in the Extensiondata of a vApp. The issue I have is that the vShield Edge / network I'm after information from, isn't actually in a vApp. It's a bit of a funny setup but I've got a vShield Edge firewall connected to the Internet and to an Org Network. No VMs or vApps are connected to the Org Network. Instead, I have about a dozen vApps, each with a vApp network and a vShield Edge connecting the vApp network to the Org Network. This was a strategy recommended by VMware to overcome the limitation of 10 networks on the public facing vShield Edge and works brilliantly in that respect. However... the public facing vShield Edge and Org Network are not in a vApp I can't use
Thinking about it while writing this, I guess one option would be to create another vApp and add the Org Network to it, then I might be able to get the info using GetNetworkConfigSection() but I wonder if there is a better/proper/prettier way to do it.
thanks in advance!