This script gets all events of pending IPs and duplicated IPs from VMware NSX SpoofGuard and decides to approve or ignore the request based on VMs data on Apache CloudStack. It uses a caching mechanism for processing requests, so it will only call CloudStack if there is a new request from VMware NSX SpoofGuard.
- Get the script and install dependencies
git clone https://github.com/aleskxyz/cloudstack-spoofguard-manager.git
cd cloudstack-spoofguard-manager
pip install -r requirements.txt
- Edit the
config.yml
file and fill it with appropriate data:
nsx:
url: https://nsx_url
username: nsx_username
password: nsx_password
policyName: spoofguard_policy_name
cloudstack:
url: https://cloudstack_url/client/api
apiKey: cloudstack_api_ky
secretKey: cloudstack_secret_key
cache:
databasePath: './cache.sqlite'
- Create a cronjob task for running the script every minute:
* * * * * root /path/to/main.py