Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPAddrRange: rename from IPAddrDTO #60

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- IPAddrRange: rename from IPAddrDTO
- Client.NewRequest: shallow-copy BaseURL to avoid retaining modifications

## [1.3.0] - 2017-02-28
Expand Down
10 changes: 5 additions & 5 deletions directional_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type AccountLevelGeoDirectionalGroupDTO struct {
Codes []string `json:"codes"`
}

// IPAddrDTO wraps an IP address range or CIDR block
type IPAddrDTO struct {
// IPAddrRange wraps an IP address range or CIDR block
type IPAddrRange struct {
Start string `json:"start,omitempty" terraform:"start"`
End string `json:"end,omitempty" terraform:"end"`
CIDR string `json:"cidr,omitempty" terraform:"cidr"`
Expand All @@ -37,9 +37,9 @@ type IPAddrDTO struct {

// AccountLevelIPDirectionalGroupDTO wraps an account-level, IP directional-group response
type AccountLevelIPDirectionalGroupDTO struct {
Name string `json:"name"`
Description string `json:"description"`
IPs []IPAddrDTO `json:"ips"`
Name string `json:"name"`
Description string `json:"description"`
IPs []IPAddrRange `json:"ips"`
}

// DirectionalPoolListDTO wraps a list of account-level directional-groups response from a index request
Expand Down
4 changes: 2 additions & 2 deletions directional_pools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ func Test_IPDirectionalPoolsService_Find(t *testing.T) {
want := AccountLevelIPDirectionalGroupDTO{
Name: "unicorn",
Description: "unicorn: a service of rainbows",
IPs: []IPAddrDTO{
IPAddrDTO{Address: "1.2.3.4"},
IPs: []IPAddrRange{
IPAddrRange{Address: "1.2.3.4"},
},
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down
6 changes: 3 additions & 3 deletions rrset.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ type DPRDataInfo struct {

// IPInfo wraps the ipInfo object of a DPRDataInfo
type IPInfo struct {
Name string `json:"name" terraform:"name"`
IsAccountLevel bool `json:"isAccountLevel,omitempty" terraform:"is_account_level"`
Ips []IPAddrDTO `json:"ips,omitempty" terraform:"-"`
Name string `json:"name" terraform:"name"`
IsAccountLevel bool `json:"isAccountLevel,omitempty" terraform:"is_account_level"`
Ips []IPAddrRange `json:"ips,omitempty" terraform:"-"`
}

// GeoInfo wraps the geoInfo object of a DPRDataInfo
Expand Down
4 changes: 2 additions & 2 deletions udnssdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ var (
testIPDPoolName = "testipdpool"
testIPDPoolAddress = "127.0.0.1"
testIPDPoolDescr = "A Test IP Directional Pool Group"
testIPAddrDTO = IPAddrDTO{Address: "127.0.0.1"}
testIPDPool = AccountLevelIPDirectionalGroupDTO{Name: "testippool", Description: "An IP Test Pool", IPs: []IPAddrDTO{IPAddrDTO{Address: "127.0.0.1"}}}
testIPAddrDTO = IPAddrRange{Address: "127.0.0.1"}
testIPDPool = AccountLevelIPDirectionalGroupDTO{Name: "testippool", Description: "An IP Test Pool", IPs: []IPAddrRange{IPAddrRange{Address: "127.0.0.1"}}}
testGeoDPool = AccountLevelGeoDirectionalGroupDTO{Name: "testgeopool", Description: "A test geo pool", Codes: []string{"US, UK"}}
testGeoDPoolName = "testgeodpool"
testGeoDPoolDescr = "A Test Geo Directional Pool Group"
Expand Down