Netflix/denominator — pull request #121 by adriancole (2013-04-14 17:40:58+00:00)
Title: Support for read-only geo commands

pertaining to issue #90

This set of changes implements the base read-only support for geo (directional) records.

#### ResourceRecordSetWithConfig
This introduces a new type called `ResourceRecordSetWithConfig` where the generic parameter `D` could be `CNAMEData` and the `C` could be `Geo`. This type will be reused later for other configs such as `Alias` and `Weighted`. All the records in a `ResourceRecordSetWithConfig` have the same configuration. A client sees at most one ResourceRecordSetWithConfig for a record name and type using tools like dig. Essentially, ResourceRecordSetWithConfig is a server-side object unlike normal client-side round-robin.

#### Geo
This introduces a new type called `Geo`. This type contains the following fields:
* groupName: group name chosen by the user. ex. `US-East`
* regionToTerritories: region name to territories, as defined by the system. ex. `South America=[Colombia, Ecuador...` in ultradns
* noResponse: explicitly answers that the record is not present for the regions applied
* unconfiguredRegions: not added yet, but we need to express a config that applies to territories we've not explicitly selected. Without a flag like this, we need to enumerate potentially hundreds of territories just to say this is a fallback config.

### GeoResourceRecordSetApi
optionally exposed if the provider supports it. Similar to `ResourceRecordSetApi`, except that name and type are ambiguous. For example, there could be a separate rrset for the CNAME www.foo.com. for US-East and also US-West configs.

### Command-line
The command-line has been extended to add operations for the group `geo`. There are still some readability concerns to address, particularly how to represent the `regionToTerritories` multi-map and also `noResponse` or `unconfiguredRegions` configurations.
ex. below, antarctica is a `noResponse` record and formats strange as there's no "name" in this case. We should probably use a keyword instead like UNCONFIGURED. Also, you'll notice the territories are not nice. We should figure out how to format that, and suggestions are welcome.
```
$ denominator -p mock geo -z denominator.io. list
antarctica {Antarctica=[Bouvet Island, French Southern Territories, Antarctica]}
www.geo.denominator.io. CNAME 300 a.denominator.io. alazona {United States (US)=[Alaska, Arizona]}
www.geo.denominator.io. CNAME 86400 b.denominator.io. columbador {South America=[Colombia, Ecuador]}
www2.geo.denominator.io. A 300 1.1.1.1 alazona {United States (US)=[Alaska, Arizona]}
```