Update godo to 0.5.0

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman 2014-12-10 09:05:47 -08:00
parent b1a5e12b51
commit 3c00d74c44
5 changed files with 17 additions and 9 deletions

4
Godeps/Godeps.json generated
View File

@ -19,8 +19,8 @@
},
{
"ImportPath": "github.com/digitalocean/godo",
"Comment": "v0.4.0-1-ga7066ec",
"Rev": "a7066ece1ff635d9fc12d123cd8a22aaf7b0062e"
"Comment": "v0.5.0",
"Rev": "5478aae80694de1d2d0e02c386bbedd201266234"
},
{
"ImportPath": "github.com/docker/docker/api",

View File

@ -62,6 +62,10 @@ type DropletCreateRequest struct {
Size string `json:"size"`
Image string `json:"image"`
SSHKeys []interface{} `json:"ssh_keys"`
Backups bool `json:"backups"`
IPv6 bool `json:"ipv6"`
PrivateNetworking bool `json:"private_networking"`
UserData string `json:"user_data"`
}
func (d DropletCreateRequest) String() string {

View File

@ -78,7 +78,10 @@ func TestNewRequest(t *testing.T) {
c := NewClient(nil)
inURL, outURL := "/foo", defaultBaseURL+"foo"
inBody, outBody := &DropletCreateRequest{Name: "l"}, `{"name":"l","region":"","size":"","image":"","ssh_keys":null}`+"\n"
inBody, outBody := &DropletCreateRequest{Name: "l"},
`{"name":"l","region":"","size":"","image":"",`+
`"ssh_keys":null,"backups":false,"ipv6":false,`+
`"private_networking":false,"user_data":""}`+"\n"
req, _ := c.NewRequest("GET", inURL, inBody)
// test relative URL was expanded

View File

@ -51,7 +51,7 @@ func (p *Pages) current() (int, error) {
// IsLastPage returns true if the current page is the last
func (l *Links) IsLastPage() bool {
if l == nil {
if l.Pages == nil {
return true
}
return l.Pages.isLast()

View File

@ -19,6 +19,7 @@ type Region struct {
Name string `json:"name,omitempty"`
Sizes []string `json:"sizes,omitempty"`
Available bool `json:"available,omitempty`
Features []string `json:"features,omitempty`
}
type regionsRoot struct {