From fdafc4ea5b007e3de60c47a9cdbe7fd109fd581f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 16:25:55 +0000 Subject: [PATCH] Bump github.com/vultr/govultr/v2 from 2.10.0 to 2.12.0 Bumps [github.com/vultr/govultr/v2](https://github.com/vultr/govultr) from 2.10.0 to 2.12.0. - [Release notes](https://github.com/vultr/govultr/releases) - [Changelog](https://github.com/vultr/govultr/blob/master/CHANGELOG.md) - [Commits](https://github.com/vultr/govultr/compare/v2.10.0...v2.12.0) --- updated-dependencies: - dependency-name: github.com/vultr/govultr/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +-- .../github.com/vultr/govultr/v2/CHANGELOG.md | 19 ++++++++++- vendor/github.com/vultr/govultr/v2/domains.go | 1 + vendor/github.com/vultr/govultr/v2/govultr.go | 2 +- .../github.com/vultr/govultr/v2/instance.go | 33 ++++++++++++++----- .../vultr/govultr/v2/load_balancer.go | 4 +-- vendor/github.com/vultr/govultr/v2/plans.go | 4 +-- vendor/modules.txt | 2 +- 9 files changed, 52 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index e18812db..5d39a3ac 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/hashicorp/hcl/v2 v2.10.1 github.com/hashicorp/packer-plugin-sdk v0.2.7 - github.com/vultr/govultr/v2 v2.10.0 + github.com/vultr/govultr/v2 v2.12.0 github.com/zclconf/go-cty v1.10.0 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f diff --git a/go.sum b/go.sum index dd9eff38..21e968ad 100644 --- a/go.sum +++ b/go.sum @@ -545,8 +545,8 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/vultr/govultr/v2 v2.10.0 h1:UG72W5sooE9zEy7p38TSnF1CJb5yzvs7bxWB/NFfAag= -github.com/vultr/govultr/v2 v2.10.0/go.mod h1:JjUljQdSZx+MELCAJvZ/JH32bJotmflnsyS0NOjb8Jg= +github.com/vultr/govultr/v2 v2.12.0 h1:sTVEsTN+nvS0SINdbtlmBAQALRcJgLzfYfshj14IaCw= +github.com/vultr/govultr/v2 v2.12.0/go.mod h1:JjUljQdSZx+MELCAJvZ/JH32bJotmflnsyS0NOjb8Jg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/vendor/github.com/vultr/govultr/v2/CHANGELOG.md b/vendor/github.com/vultr/govultr/v2/CHANGELOG.md index 69f8e861..08435271 100644 --- a/vendor/github.com/vultr/govultr/v2/CHANGELOG.md +++ b/vendor/github.com/vultr/govultr/v2/CHANGELOG.md @@ -2,6 +2,23 @@ ## GoVultr v1 changelog is located [here](https://github.com/vultr/govultr/blob/v1/CHANGELOG.md) +## [v2.12.0](https://github.com/vultr/govultr/compare/v2.11.1..v2.12.0) (2021-12-01) +### Breaking Changes +* Plans : Changed `MonthlyCost` from `int` to `float32` [192](https://github.com/vultr/govultr/pull/192) + +## [v2.11.1](https://github.com/vultr/govultr/compare/v2.11.0..v2.11.1) (2021-11-26) +### Bug fixes +* LoadBalancers : Fixed SSL struct json params to the proper API fields [189](https://github.com/vultr/govultr/pull/189) + +## [v2.11.0](https://github.com/vultr/govultr/compare/v2.10.0..v2.11.0) (2021-11-18) +### Breaking Changes +* Instances : Update call will now return `*Instance` in addition to `error` [185](https://github.com/vultr/govultr/pull/185) +* Instances : Reinstall call now allows changing of hostname and also returns `*Instance` in addition to `error` [181](https://github.com/vultr/govultr/pull/181) + +### Enhancement +* Instances : The hostname of the instance is now returned in any call that returns Instance data [187](https://github.com/vultr/govultr/pull/187) +* Domains : There is a new field called `dns_sec` which will return `enabled` or `disabled` depending on how your domain is configured [184](https://github.com/vultr/govultr/pull/184) + ## [v2.10.0](https://github.com/vultr/govultr/compare/v2.9.2..v2.10.0) (2021-11-03) ### Enhancement * Billing : Added support for billing [178](https://github.com/vultr/govultr/pull/178) @@ -101,4 +118,4 @@ ## v2.0.0 (2020-11-20) ### Initial Release * GoVultr v2.0.0 Release - Uses Vultr API v2. -* GoVultr v1.0.0 is now on [branch v1](https://github.com/vultr/govultr/tree/v1) \ No newline at end of file +* GoVultr v1.0.0 is now on [branch v1](https://github.com/vultr/govultr/tree/v1) diff --git a/vendor/github.com/vultr/govultr/v2/domains.go b/vendor/github.com/vultr/govultr/v2/domains.go index 13c16911..938cc862 100644 --- a/vendor/github.com/vultr/govultr/v2/domains.go +++ b/vendor/github.com/vultr/govultr/v2/domains.go @@ -34,6 +34,7 @@ type DomainServiceHandler struct { type Domain struct { Domain string `json:"domain,omitempty"` DateCreated string `json:"date_created,omitempty"` + DNSSec string `json:"dns_sec,omitempty"` } // DomainReq is the struct to create a domain diff --git a/vendor/github.com/vultr/govultr/v2/govultr.go b/vendor/github.com/vultr/govultr/v2/govultr.go index e3cda9e3..21b043fa 100644 --- a/vendor/github.com/vultr/govultr/v2/govultr.go +++ b/vendor/github.com/vultr/govultr/v2/govultr.go @@ -16,7 +16,7 @@ import ( ) const ( - version = "2.10.0" + version = "2.12.0" defaultBase = "https://api.vultr.com" userAgent = "govultr/" + version rateLimit = 500 * time.Millisecond diff --git a/vendor/github.com/vultr/govultr/v2/instance.go b/vendor/github.com/vultr/govultr/v2/instance.go index 3f2b48c8..c47407b8 100644 --- a/vendor/github.com/vultr/govultr/v2/instance.go +++ b/vendor/github.com/vultr/govultr/v2/instance.go @@ -15,14 +15,14 @@ const instancePath = "/v2/instances" type InstanceService interface { Create(ctx context.Context, instanceReq *InstanceCreateReq) (*Instance, error) Get(ctx context.Context, instanceID string) (*Instance, error) - Update(ctx context.Context, instanceID string, instanceReq *InstanceUpdateReq) error + Update(ctx context.Context, instanceID string, instanceReq *InstanceUpdateReq) (*Instance, error) Delete(ctx context.Context, instanceID string) error List(ctx context.Context, options *ListOptions) ([]Instance, *Meta, error) Start(ctx context.Context, instanceID string) error Halt(ctx context.Context, instanceID string) error Reboot(ctx context.Context, instanceID string) error - Reinstall(ctx context.Context, instanceID string) error + Reinstall(ctx context.Context, instanceID string, reinstallReq *ReinstallReq) (*Instance, error) MassStart(ctx context.Context, instanceList []string) error MassHalt(ctx context.Context, instanceList []string) error @@ -96,6 +96,7 @@ type Instance struct { ImageID string `json:"image_id"` FirewallGroupID string `json:"firewall_group_id"` Features []string `json:"features"` + Hostname string `json:"hostname"` } type instanceBase struct { @@ -250,6 +251,11 @@ type InstanceUpdateReq struct { FirewallGroupID string `json:"firewall_group_id,omitempty"` } +// ReinstallReq struct used to allow changes during a reinstall +type ReinstallReq struct { + Hostname string `json:"hostname,omitempty"` +} + // Create will create the server with the given parameters func (i *InstanceServiceHandler) Create(ctx context.Context, instanceReq *InstanceCreateReq) (*Instance, error) { uri := fmt.Sprintf("%s", instancePath) @@ -285,15 +291,20 @@ func (i *InstanceServiceHandler) Get(ctx context.Context, instanceID string) (*I } // Update will update the server with the given parameters -func (i *InstanceServiceHandler) Update(ctx context.Context, instanceID string, instanceReq *InstanceUpdateReq) error { +func (i *InstanceServiceHandler) Update(ctx context.Context, instanceID string, instanceReq *InstanceUpdateReq) (*Instance, error) { uri := fmt.Sprintf("%s/%s", instancePath, instanceID) req, err := i.client.NewRequest(ctx, http.MethodPatch, uri, instanceReq) if err != nil { - return err + return nil, err } - return i.client.DoWithContext(ctx, req, nil) + instance := new(instanceBase) + if err := i.client.DoWithContext(ctx, req, instance); err != nil { + return nil, err + } + + return instance.Instance, nil } // Delete an instance. All data will be permanently lost, and the IP address will be released @@ -367,15 +378,19 @@ func (i *InstanceServiceHandler) Reboot(ctx context.Context, instanceID string) } // Reinstall an instance. -func (i *InstanceServiceHandler) Reinstall(ctx context.Context, instanceID string) error { +func (i *InstanceServiceHandler) Reinstall(ctx context.Context, instanceID string, reinstallReq *ReinstallReq) (*Instance, error) { uri := fmt.Sprintf("%s/%s/reinstall", instancePath, instanceID) - req, err := i.client.NewRequest(ctx, http.MethodPost, uri, nil) + req, err := i.client.NewRequest(ctx, http.MethodPost, uri, reinstallReq) if err != nil { - return err + return nil, err } - return i.client.DoWithContext(ctx, req, nil) + instance := new(instanceBase) + if err := i.client.DoWithContext(ctx, req, instance); err != nil { + return nil, err + } + return instance.Instance, nil } // MassStart will start a list of instances the machine is already running, it will be restarted. diff --git a/vendor/github.com/vultr/govultr/v2/load_balancer.go b/vendor/github.com/vultr/govultr/v2/load_balancer.go index 0dbf5605..a7e1f87c 100644 --- a/vendor/github.com/vultr/govultr/v2/load_balancer.go +++ b/vendor/github.com/vultr/govultr/v2/load_balancer.go @@ -118,8 +118,8 @@ type LBFirewallRule struct { // SSL represents valid SSL config type SSL struct { - PrivateKey string `json:"ssl_private_key,omitempty"` - Certificate string `json:"ssl_certificate,omitempty"` + PrivateKey string `json:"private_key,omitempty"` + Certificate string `json:"certificate,omitempty"` Chain string `json:"chain,omitempty"` } diff --git a/vendor/github.com/vultr/govultr/v2/plans.go b/vendor/github.com/vultr/govultr/v2/plans.go index ec877c0c..66abfdef 100644 --- a/vendor/github.com/vultr/govultr/v2/plans.go +++ b/vendor/github.com/vultr/govultr/v2/plans.go @@ -29,7 +29,7 @@ type BareMetalPlan struct { Disk int `json:"disk"` DiskCount int `json:"disk_count"` Bandwidth int `json:"bandwidth"` - MonthlyCost int `json:"monthly_cost"` + MonthlyCost float32 `json:"monthly_cost"` Type string `json:"type"` Locations []string `json:"locations"` } @@ -42,7 +42,7 @@ type Plan struct { Disk int `json:"disk"` DiskCount int `json:"disk_count"` Bandwidth int `json:"bandwidth"` - MonthlyCost int `json:"monthly_cost"` + MonthlyCost float32 `json:"monthly_cost"` Type string `json:"type"` Locations []string `json:"locations"` } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5d968061..e1fa320a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -319,7 +319,7 @@ github.com/ulikunitz/xz github.com/ulikunitz/xz/internal/hash github.com/ulikunitz/xz/internal/xlog github.com/ulikunitz/xz/lzma -# github.com/vultr/govultr/v2 v2.10.0 +# github.com/vultr/govultr/v2 v2.12.0 ## explicit; go 1.16 github.com/vultr/govultr/v2 # github.com/zclconf/go-cty v1.10.0