I figured I would share this NSX python script to build an entire environment. I worked with VMware a few months ago to get a lot of this going. Some of this is my code some VMware’s. But generally it builds out this environment. This is taking into assumption that the NSX manager appliance is built out connected to vcenter, clusters are prepared for NSX vibs and controllers are deployed. The click click click click has always killed me. This should take up to 5-10 minutes to run all three scripts total.

This is all within my Github page Here
Here are some screen shots of how the script works..
Create the distributed logical router

Create routing on the distributed logical router for bgp purposes

Create 4 Edge service gateways with BGP peering to the top of rack switches and DLR. BGP is created, syslog is created and firewall is disable on the edges.

Everything you need other than the network build can be found within the vsphere MOB https://vcenterip/mob – > content – > root folder.

Everything is within the github repository.
There is a A side VLAN 1085(only on ToR1) B side VLAN 1086(only on TOR2)
Each Logical switch is unicast mode
Edge firewall is disable,ECMP is enabled, Syslog is created.
This was setup in three scripts because I had to use each of these all the time to either convert a VLAN backed environment to VXLAN or swap over a OSPF environment over to a BGP environment.