Skip to content

Commit b35e0e0

Browse files
CLOUDP-86339: update region step in quickstart to use correctly the atlas service (#645)
1 parent 14ae63c commit b35e0e0

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/spf13/viper v1.7.1
2525
github.com/stretchr/testify v1.7.0
2626
github.com/tangzero/inflector v1.0.0
27-
go.mongodb.org/atlas v0.7.3-0.20210329080711-50ae4381af6f
27+
go.mongodb.org/atlas v0.7.3-0.20210330132131-9297afb20e18
2828
go.mongodb.org/ops-manager v0.18.1-0.20210330081921-8eafa855b149
2929
golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a // indirect
3030
golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyh
243243
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
244244
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
245245
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
246-
go.mongodb.org/atlas v0.7.3-0.20210329080711-50ae4381af6f h1:lT5d8KrJYMOdiXbHsEd5fGJlBc71mVD4GnheebcRyDs=
247246
go.mongodb.org/atlas v0.7.3-0.20210329080711-50ae4381af6f/go.mod h1:MMWDsc2akjTDSG4tVQrxv/82p3QbBnqeELbtTl45sbg=
247+
go.mongodb.org/atlas v0.7.3-0.20210330132131-9297afb20e18 h1:3sDlRQrpqjeVZjrNxMZSKJEhGFL6iuroY3MjDqhn9y0=
248+
go.mongodb.org/atlas v0.7.3-0.20210330132131-9297afb20e18/go.mod h1:MMWDsc2akjTDSG4tVQrxv/82p3QbBnqeELbtTl45sbg=
248249
go.mongodb.org/ops-manager v0.18.1-0.20210330081921-8eafa855b149 h1:/vg09kKcTDVuRHSGtRQe/nhkd6XQud2uWdd46xzZAec=
249250
go.mongodb.org/ops-manager v0.18.1-0.20210330081921-8eafa855b149/go.mod h1:w9v20jgrQQ9HYievQfMReSPPLvXcQYkp9R4sNUsdZxk=
250251
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=

internal/cli/atlas/quickstart/quick_start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (opts *Opts) askClusterOptions() error {
281281
}
282282

283283
func (opts *Opts) defaultRegions() ([]string, error) {
284-
cloudProviders, err := opts.store.CloudProviderRegions(opts.ConfigProjectID(), opts.Provider, tier, false)
284+
cloudProviders, err := opts.store.CloudProviderRegions(opts.ConfigProjectID(), tier, []*string{&opts.Provider})
285285

286286
if err != nil {
287287
return nil, err

internal/mocks/mock_cloud_provider_regions.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/mocks/mock_clusters.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/store/cloud_provider_regions.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ import (
2525
//go:generate mockgen -destination=../mocks/mock_cloud_provider_regions.go -package=mocks github.com/mongodb/mongocli/internal/store CloudProviderRegionsLister
2626

2727
type CloudProviderRegionsLister interface {
28-
CloudProviderRegions(string, string, string, bool) (*atlas.CloudProviders, error)
28+
CloudProviderRegions(string, string, []*string) (*atlas.CloudProviders, error)
2929
}
3030

3131
// CloudProviderRegions encapsulates the logic to manage different cloud providers
32-
func (s *Store) CloudProviderRegions(projectID, provierName, tier string, crossCloudProvider bool) (*atlas.CloudProviders, error) {
32+
func (s *Store) CloudProviderRegions(projectID, tier string, providerName []*string) (*atlas.CloudProviders, error) {
3333
options := &atlas.CloudProviderRegionsOptions{
34-
Provider: provierName,
35-
Tier: tier,
36-
CrossCloudProvider: crossCloudProvider,
34+
Providers: providerName,
35+
Tier: tier,
3736
}
3837
switch s.service {
3938
case config.CloudService:

0 commit comments

Comments
 (0)