Skip to content

Commit

Permalink
feat: add new sdk method to update instance home credentials (#31)
Browse files Browse the repository at this point in the history
add new sdk method to update instance home credentials.
Apply latest python-sdk-template changes.

Signed-off-by: Silpi Dhua <silpidhua@gmail.com>
  • Loading branch information
silpidhua authored Mar 23, 2023
1 parent 6a1c85a commit 391309f
Show file tree
Hide file tree
Showing 11 changed files with 572 additions and 145 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ language: go
dist: bionic

go:
- 1.17.13
- 1.18.x
- 1.19.x
- 1.20.x

notifications:
email: true
Expand All @@ -20,7 +20,7 @@ before_install:
- pyenv global 3.8

install:
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.49.0
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.51.2
- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin

script:
Expand All @@ -37,5 +37,5 @@ deploy:
script: npm run semantic-release
skip_cleanup: true
on:
go: '1.17.13'
go: '1.18.10'
branch: master
3 changes: 3 additions & 0 deletions HOW_TO_TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
1. You must create 2 instances of Analytics Engine service - Serverless plan.
1. Provide instance home details in the 1st instance.
1. Don't provide instance home details in the 2nd instance.
1. You must have two set of HMAC Access Key and HMAC secret key - Credentials must have write access to the object storage used as instance home.

## Integration Tests

Expand All @@ -14,6 +15,8 @@
1. `IBM_ANALYTICS_ENGINE_API_INSTANCE_GUID_WO_INSTANCE_HOME`=`<Id of your Analytics Engine Service plan instance created without instance home>`
1. `IBM_ANALYTICS_ENGINE_API_HMAC_ACCESS_KEY`=`<HMAC access key of the cos instance to be used as instance home>`
1. `IBM_ANALYTICS_ENGINE_API_HMAC_SECRET_KEY`=`<HMAC secret key of the cos instance to be used as instance home>`
1. `IBM_ANALYTICS_ENGINE_API_ALTERNATE_HMAC_ACCESS_KEY`=`<HMAC access key of the cos instance to be used as instance home>`
1. `IBM_ANALYTICS_ENGINE_API_ALTERNATE_HMAC_SECRET_KEY`=`<HMAC secret key of the cos instance to be used as instance home>`
4. In root directory `ibm-iae-go-sdk/`. Run the following:
```
go test ./ibmanalyticsengineapiv3 -tags=integration -v
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GOSEC=gosec
COVERAGE = -coverprofile=coverage.txt -covermode=atomic

all: tidy test lint
travis-ci: test-cov lint scan-gosec tidy
travis-ci: tidy test-cov lint scan-gosec

test:
${GO} test `${GO} list ./...`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ IBM Analytics Engine v3 is for the Standard Serverless for Apache Spark plan

* An [IBM Cloud][ibm-cloud-onboarding] account.
* An IAM API key to allow the SDK to access your account. Create one [here](https://cloud.ibm.com/iam/apikeys).
* Go version 1.17 or above.
* Go version 1.18 or above.

## Installation
The current version of this SDK: 2.0.1
Expand Down
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
module github.com/IBM/ibm-iae-go-sdk/v2

go 1.17
go 1.18

require (
github.com/IBM/go-sdk-core/v5 v5.10.2
github.com/IBM/go-sdk-core/v5 v5.13.0
github.com/go-openapi/strfmt v0.21.3
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.20.2
github.com/stretchr/testify v1.8.0
github.com/onsi/gomega v1.27.1
github.com/stretchr/testify v1.8.1
)

require (
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-openapi/errors v0.20.2 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-openapi/errors v0.20.3 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.10.0 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
go.mongodb.org/mongo-driver v1.11.2 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 391309f

Please sign in to comment.