Copy Nsx Ip Sets from One Nsx Manager to Another Nsx Manager
In a complex Nsx Environment when you want to make sure all Environments are consistent for Firewall services (Yes we are talking about NsxIpSets or Security Groups)
At Some Point we may need to get a way to Copy Objects from One Nsx manager to Another.
Scenario : We have Two Nsx Manager Nsx01 = Primary Site and Nsx02 = DR Site
There are Change in Application IP Address (NsxIpSet) which Needs to be updated to DR site Nsx Manager as well.
If we do it for number of Objects , its going to take some time for you to do it Manually , Why not getting this done by few Lines of Code.
Below Function takes two Nsx Managers and Credentials as Parameters and updates NsxIpSet information between them. Also if NsxIpSet is not available in DR site , it gets that created.
#Author: Jitendra Singh
#Blog : www.xtra-virtual.com
#Purpose : We can Sync NsxIpSet Between two Nsx Managers using this function
#Make sure NSX module is imported on system where script is running
# Click here on how to install PowerNSX on system https://github.com/vmware/powernsx or
# You may also Add one more Credential parameter if Credentials are different for both NSX Managers