currently, when fog requests all records:
* make a NodeList request
returns a list of nodes (domains)
* for each domain, make a secondary AnyRecord request for each domain
returns a list of records (without data)
The resulting Record objects do not contain the data of where the record points (address or cname). 'rdata' is nil
I've changed the process to be:
* make an AllRecord request
returns a list of records (without data)
* make a secondary request to *Record (using the type returned from the AllRecord request)
this returns a *complete* record object (including data)
The number of requests to Dynect API is the same, but the resulting objects contain all of the information.
TODO:
* Please help me integrate with fog testing
* I had to remove (comment) the API Version header, not sure what the correct value for this is
** Dynect documentation is a bit difficult to work through
I've had the problem before that Dynects api2 will fail when being called from a system that has both, IPv6 and IPv4 connectivity.
The message returned looks something like this:
```
@body="{\"status\": \"failure\", \"data\": {}, \"job_id\": 1234567890, \"msgs\": [{\"INFO\": \"login: IP address does not match current session\", \"SOURCE\": \"BLL\", \"ERR_CD\": \"INVALID_DATA\", \"LVL\": \"ERROR\"}, {\"INFO\": \"login: There was a problem with your credentials\", \"SOURCE\": \"BLL\", \"ERR_CD\": null, \"LVL\": \"INFO\"}]}", @status=400>
```
For our own (custom) library this was fixed by just moving from the 'api2.dynect.net' endpoint to 'api-v4.dynect.net'. We didn't change anything else and it just worked for us.
I just tried this locally and switching the endpoint solved the problem in fog for me.
Should facilitate the following:
require 'fog/aws'
require 'fog/compute'
require 'fog/aws/compute'
I think once you `require 'rubygems'` those should work.
further cleanup should reduce common requires (ie nokogiri)