diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6bac1bb --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +bin/ + +# Test binary, build wiith `go test -c` +*.test + +# Output of the go coverage tool +*.out +.coverage/ + +# Various user specific files +.DS_Store +.idea/ +.vimrc +*.swp +.vscode/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..9fed2e0 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.opendev.org +port=29418 +project=airship/go-redfish.git diff --git a/Makefile b/Makefile index 41abbdb..b9964e4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: code-gen code-gen: rm -rf client - openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id Nordix -o client/ -p enumClassPrefix=true + openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" --git-repo-id go-redfish/client --git-user-id airship --git-host opendev.org -o client/ -p enumClassPrefix=true mkdir -p api go run api_generator.go | gofmt > api/service_interface.go go generate api/service_interface.go diff --git a/README.md b/README.md index 4b1dc59..a60a626 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ To use `go-redfish` library in go code, you just need to import the library as b import ( "fmt" - redfish "github.com/Nordix/go-redfish/client" + redfish "opendev.org/airship/go-redfish/client" ) ``` @@ -28,7 +28,7 @@ cfg := &redfish.Configuration{ redfishApi := redfish.NewAPIClient(cfg).DefaultApi ``` -Use `redfishApi` to interact with redfish server. This object contains get, set and list functions for different redfish resources. There are loose validations on the client side for the required paramaters of a certain API. In case of any error e.g. missing a required parameter; then server will generate the error. To see the available actions for API endpoints see [Endpoint Reference](https://github.com/Nordix/go-redfish/tree/master/client#documentation-for-api-endpoints) and [Model Definitions](https://github.com/Nordix/go-redfish/tree/master/client#documentation-for-models). See following examples for different operations. +Use `redfishApi` to interact with redfish server. This object contains get, set and list functions for different redfish resources. There are loose validations on the client side for the required paramaters of a certain API. In case of any error e.g. missing a required parameter; then server will generate the error. To see the available actions for API endpoints see [Endpoint Reference](https://opendev.org/airship/go-redfish/tree/master/client#documentation-for-api-endpoints) and [Model Definitions](https://opendev.org/airship/go-redfish/tree/master/client#documentation-for-models). See following examples for different operations. ## Examples ## diff --git a/api/mocks/RedfishAPI.go b/api/mocks/RedfishAPI.go index cf192dd..cb51be0 100644 --- a/api/mocks/RedfishAPI.go +++ b/api/mocks/RedfishAPI.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - client "github.com/Nordix/go-redfish/client" + client "opendev.org/airship/go-redfish/client" http "net/http" diff --git a/api/service_interface.go b/api/service_interface.go index 21afb7c..8d82cbb 100644 --- a/api/service_interface.go +++ b/api/service_interface.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - client "github.com/Nordix/go-redfish/client" + client "opendev.org/airship/go-redfish/client" ) //go:generate mockery -name=RedfishAPI -output ./mocks diff --git a/api_generator.go b/api_generator.go index 9a67dc2..18aacc8 100644 --- a/api_generator.go +++ b/api_generator.go @@ -4,7 +4,7 @@ import ( "fmt" "reflect" - . "github.com/Nordix/go-redfish/client" + . "opendev.org/airship/go-redfish/client" ) func main() { @@ -16,7 +16,7 @@ import ( "context" "net/http" - client "github.com/Nordix/go-redfish/client" + client "opendev.org/airship/go-redfish/client" ) //go:generate mockery -name=RedfishAPI -output ./mocks diff --git a/client/go.mod b/client/go.mod index 1f9aa54..25e0dc4 100644 --- a/client/go.mod +++ b/client/go.mod @@ -1,8 +1,5 @@ -module github.com/Nordix/go-redfish/client +module opendev.org/airship/go-redfish/client -require ( - github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6 - golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a -) +require golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a go 1.13