Skip to content

Commit 8d38d56

Browse files
authored
stack: Populate stackapi Region field (#303)
Populates the new Region field on all of the stackapi calls.
1 parent cc3415a commit 8d38d56

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

cmd/platform/stack/command.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ var stackShowCmd = &cobra.Command{
5252
RunE: func(cmd *cobra.Command, args []string) error {
5353
s, err := stackapi.Get(stackapi.GetParams{
5454
API: ecctl.Get().API,
55+
Region: ecctl.Get().Config.Region,
5556
Version: args[0],
5657
})
5758
if err != nil {
@@ -66,6 +67,7 @@ func listStackPacks(cmd *cobra.Command, args []string) error {
6667
deleted, _ := cmd.Flags().GetBool("deleted")
6768
s, err := stackapi.List(stackapi.ListParams{
6869
API: ecctl.Get().API,
70+
Region: ecctl.Get().Config.Region,
6971
Deleted: deleted,
7072
})
7173
if err != nil {
@@ -89,6 +91,7 @@ var stackUploadCmd = &cobra.Command{
8991

9092
return stackapi.Upload(stackapi.UploadParams{
9193
API: ecctl.Get().API,
94+
Region: ecctl.Get().Config.Region,
9295
StackPack: f,
9396
})
9497
},
@@ -102,6 +105,7 @@ var stackDeleteCmd = &cobra.Command{
102105
RunE: func(cmd *cobra.Command, args []string) error {
103106
return stackapi.Delete(stackapi.DeleteParams{
104107
API: ecctl.Get().API,
108+
Region: ecctl.Get().Config.Region,
105109
Version: args[0],
106110
})
107111
},

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.12
44

55
require (
66
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a
7-
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610061007-5771a049905a
7+
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610080731-ecad4ea9c617
88
github.com/go-openapi/runtime v0.19.15
99
github.com/go-openapi/strfmt v0.19.5
1010
github.com/hashicorp/go-multierror v1.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD
6161
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
6262
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610014412-d8bc0d1b9b30 h1:KlJmjQ5ZehOnYtffQ4/7vspv8rg47cckF2+etZ7MAgY=
6363
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610014412-d8bc0d1b9b30/go.mod h1:+0Q5izB9Upzmolj6Pq4AkTsBwgDbQnNpODp3qFK7erQ=
64-
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610061007-5771a049905a h1:Kt6uMlo1rtMXpHEHZBrkI1BGnTcHQhLyXloCj+jWKqI=
65-
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610061007-5771a049905a/go.mod h1:+0Q5izB9Upzmolj6Pq4AkTsBwgDbQnNpODp3qFK7erQ=
64+
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610080731-ecad4ea9c617 h1:y3zhClgtQaEZcnKpVQR0anI8LxbH6DL1swgju/flnpU=
65+
github.com/elastic/cloud-sdk-go v1.0.0-beta3.0.20200610080731-ecad4ea9c617/go.mod h1:+0Q5izB9Upzmolj6Pq4AkTsBwgDbQnNpODp3qFK7erQ=
6666
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
6767
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
6868
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=

0 commit comments

Comments
 (0)