Skip to content

Commit

Permalink
Add delegate_dataset support to instance creation (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
twhiteman committed Aug 19, 2020
1 parent f719b4e commit 328eb12
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Unreleased

## 1.8.5 (Aug 19 2020)

- Added delegate_dataset support to instance creation

## 1.8.4 (May 11 2020)

- Fix panic when testing images without TRITON_TEST set [#186]
Expand Down
3 changes: 3 additions & 0 deletions compute/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ type Instance struct {
Package string `json:"package"`
DomainNames []string `json:"dns_names"`
DeletionProtection bool `json:"deletion_protection"`
DelegateDataset bool `json:"delegate_dataset,omitempty"`
CNS InstanceCNS
}

Expand Down Expand Up @@ -290,6 +291,7 @@ type CreateInstanceInput struct {
Metadata map[string]string
Tags map[string]string //
FirewallEnabled bool //
DelegateDataset bool
CNS InstanceCNS
Volumes []InstanceVolume
}
Expand All @@ -305,6 +307,7 @@ func (input *CreateInstanceInput) toAPI() (map[string]interface{}, error) {
result := make(map[string]interface{}, numExtraParams+len(input.Metadata)+len(input.Tags))

result["firewall_enabled"] = input.FirewallEnabled
result["delegate_dataset"] = input.DelegateDataset

if input.Name != "" {
result["name"] = input.Name
Expand Down
8 changes: 4 additions & 4 deletions utils/http_debugging.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ type traceRoundTripper struct {
func (d *traceRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
d.dumpRequest(req)
res, err := d.inner.RoundTrip(req)
if err != nil {
if err != nil {
fmt.Fprintf(d.logger, "\n\tERROR for request: %v\n", err)
}
if res != nil {
}
if res != nil {
d.dumpResponse(res)
}
}
return res, err
}

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// Version represents main version number of the current release
// of the Triton-go SDK.
const Version = "1.8.4"
const Version = "1.8.5"

// Prerelease adds a pre-release marker to the version.
//
Expand Down

0 comments on commit 328eb12

Please sign in to comment.