Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
An example script which will add a newly created web server into a specified region of our GeoIP setup. First the script will check if the service exists, if not it builds it from scratch (and names it "MyGeoIPService, the name is arbitrary so feel free to change it) if it does exists and are just updating it, it will check if the region exists (in this whatever the region parameter is). If it doesn't exist it will create it, if it does it will simply add the new ip address in as an A record for that region. Also add the zone and fqdn as a GeoIP node if they aren't already there (whats the point of having GeoIP set up if there is nothing taking advantage of it :-p ) The credentials are read out of a configuration file in the same directory named credentials.cfg in the format: [Dynect] user : user_name customer : customer_name password: password The script has the following usage: "python UpdateGeoIP.py zone fqdn region ip countries" zone - zone to add GeoIP to if it isn't already (ie: myzone.net) fqdn - the fully qualified domain name to add GeoIP to if it isn't already (ie: testgslb.myzone.net) region - the region to add the ip address to, this is an arbitrary unique name, if the region exists already it will be updated countries - comma seperated list (no spaces) of the 2 letter ISO-3166 country codes of the countries for the region (remember that countries cannot exist in multiple regions) ip - the ip address of the server (ie: 188.8.131.52) The library is available at: https://github.com/dyninc/Dynect-API-Python-Library