-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'bitbucket/github' into release_2024-06-04
- Loading branch information
Showing
489 changed files
with
43,335 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
#### Project generation setup | ||
PROJECT_NAME=github.com/oracle/oci-go-sdk | ||
PROJECT_PATH=$(GOPATH)/src/$(PROJECT_NAME) | ||
REMOVE_AFTER_GENERATE=audit/audit_waiters.go objectstorage/objectstorage_waiters.go | ||
DOC_SERVER_URL_DEV=https:\/\/docs.cloud.oracle.com | ||
|
||
#### Versions | ||
#### If you are doing a release, do not forget to increment this versions | ||
VER_MAJOR=65 | ||
VER_MINOR=67 | ||
VER_PATCH=0 | ||
################### | ||
|
||
#### AutoTest setup | ||
AUTOTEST_DIR = autotest | ||
AUTOTEST_HELPERS = client.go configurations.go main_test.go | ||
AUTOTEST_FILES = $(notdir $(wildcard $(AUTOTEST_DIR)/*client_auto_test.go)) | ||
AUTOTEST_TARGETS = $(patsubst %_client_auto_test.go, autotest-%, $(AUTOTEST_FILES)) | ||
|
||
define HELP_MESSAGE | ||
make -f MakefileDevelopment.mk build: builds and generate the sdk | ||
make -f MakefileDevelopment.mk build-sdk: to build the sdk only | ||
make -f MakefileDevelopment.mk generate: to generate the sdk | ||
make -f MakefileDevelopment.mk list-autotest-services to list all autogenerated test targets at the service level | ||
make -f MakefileDevelopment.mk autotest-[name of the package] to run autogenerated tests | ||
make -f MakefileDevelopment.mk autotest-all runs all autogenerated tests | ||
endef | ||
|
||
|
||
.PHONY: help | ||
|
||
export HELP_MESSAGE | ||
help: | ||
@echo "$$HELP_MESSAGE" | ||
|
||
list-autotest-services: | ||
@echo $(AUTOTEST_TARGETS) | ||
|
||
test-all: build-sdk build-autotest test-sdk-only test-integ-test | ||
|
||
autotest-all: build-sdk test-sdk-only $(AUTOTEST_TARGETS) | ||
|
||
autotest: build-autotest | ||
go test -v -run $(TEST_NAME) -count 1 -timeout 3h github.com/oracle/oci-go-sdk/autotest | ||
|
||
$(AUTOTEST_TARGETS): autotest-%:% | ||
@echo Testing $(AUTOTEST_DIR)/$<_client_auto_test.go | ||
@(cd $(AUTOTEST_DIR) && go test -v $(AUTOTEST_HELPERS) $<_client_auto_test.go) | ||
|
||
generate: | ||
@echo "Cleaning and generating sdk" | ||
@(cd $(PROJECT_PATH) && make clean-generate) | ||
@echo "Cleaning autotest files" | ||
@find autotest -name \*_auto_test.go|xargs rm -f | ||
PROJECT_NAME=$(PROJECT_NAME) mvn clean install | ||
@(cd $(PROJECT_PATH) && rm -f $(REMOVE_AFTER_GENERATE)) | ||
find . -name \*.go |xargs sed -i "" "s#\"$(PROJECT_NAME)/\(v[0-9]*/\)*#\"$(PROJECT_NAME)/v$(VER_MAJOR)/#g" | ||
|
||
generate-local: generate | ||
@make pre-doc-local | ||
@make test | ||
|
||
build-autotest: | ||
@echo "building autotests" | ||
@(cd $(AUTOTEST_DIR) && gofmt -s -w . && go test -c) | ||
|
||
build-sdk: | ||
@echo "Building sdk" | ||
@(cd $(PROJECT_PATH) && make build) | ||
|
||
test-sdk-only: | ||
@echo "Testing sdk common" | ||
@(cd $(PROJECT_PATH) && make test) | ||
|
||
test-integ-test: | ||
@echo "Testing sdk integ test" | ||
@(cd $(PROJECT_PATH) && make test-integ) | ||
|
||
release-sdk: | ||
@echo "Building oci-go-sdk with major:$(VER_MAJOR) minor:$(VER_MINOR) patch:$(VER_PATCH) tag:$(VER_TAG)" | ||
@(cd $(PROJECT_PATH)) | ||
find . -name \*.go |xargs sed -i "s#\"$(PROJECT_NAME)/\(v[0-9]*/\)*#\"$(PROJECT_NAME)/v$(VER_MAJOR)/#g" | ||
@(VER_MAJOR=$(VER_MAJOR) VER_MINOR=$(VER_MINOR) VER_PATCH=$(VER_PATCH) VER_TAG=$(VER_TAG) make release) | ||
|
||
build: generate build-sdk build-autotest | ||
@(cd $(PROJECT_PATH) && make pre-doc) | ||
|
||
release: generate release-sdk build-autotest | ||
|
||
generate-pipeline: build-sdk build-autotest test-sdk-only | ||
|
||
# command used by self service pipeline to clean all generated files | ||
clean-pipeline: | ||
@echo "Cleaning generated files" | ||
@(cd $(PROJECT_PATH) && make clean-generate) | ||
@echo "Cleaning autotest files" | ||
@find autotest -name \*_auto_test.go|xargs rm -f | ||
@(cd $(PROJECT_PATH) && rm -f $(REMOVE_AFTER_GENERATE)) | ||
|
||
# doing build and lint for generated code in self-service pipeline | ||
lint-pipeline: update-import build-autotest test-sdk-only | ||
@echo "Rendering doc server to ${DOC_SERVER_URL_DEV}" | ||
find . -name \*.go |xargs sed -i 's/{{DOC_SERVER_URL}}/${DOC_SERVER_URL_DEV}/g' | ||
# Note: This should stay the old docs URL (with us-phoenix-1), because it | ||
# processes go files and changes the old URL into the new URL | ||
find . -name \*.go |xargs sed -i 's/https:\/\/docs.us-phoenix-1.oraclecloud.com/${DOC_SERVER_URL_DEV}/g' | ||
|
||
# update all imports to match latest major version | ||
update-import: | ||
find . -name \*.go |xargs sed -i "s#\"$(PROJECT_NAME)/\(v[0-9]*/\)*#\"$(PROJECT_NAME)/v$(VER_MAJOR)/#g" | ||
|
||
# clone SDK-CLI keys repo for use in integration tests | ||
build-clone-keys: | ||
./scripts/clone_key_repo.sh |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Database Service API | ||
// | ||
// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). | ||
// | ||
|
||
package database | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// AutonomousDatabasePeerCollection The object holds details about the peer Autonomous Databases for an Oracle Autonomous Database. | ||
type AutonomousDatabasePeerCollection struct { | ||
|
||
// This array holds details about Autonomous Database Peers for Oracle an Autonomous Database. | ||
Items []AutonomousDatabasePeerSummary `mandatory:"true" json:"items"` | ||
} | ||
|
||
func (m AutonomousDatabasePeerCollection) String() string { | ||
return common.PointerString(m) | ||
} | ||
|
||
// ValidateEnumValue returns an error when providing an unsupported enum value | ||
// This function is being called during constructing API request process | ||
// Not recommended for calling this function directly | ||
func (m AutonomousDatabasePeerCollection) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Database Service API | ||
// | ||
// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). | ||
// | ||
|
||
package database | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// AutonomousDatabasePeerSummary The object holds details about a peer Autonomous Database for Oracle Autonomous Database. | ||
type AutonomousDatabasePeerSummary struct { | ||
|
||
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. | ||
Id *string `mandatory:"true" json:"id"` | ||
|
||
// The name of the region where this peer Autonomous Database clone exists. | ||
Region *string `mandatory:"false" json:"region"` | ||
} | ||
|
||
func (m AutonomousDatabasePeerSummary) String() string { | ||
return common.PointerString(m) | ||
} | ||
|
||
// ValidateEnumValue returns an error when providing an unsupported enum value | ||
// This function is being called during constructing API request process | ||
// Not recommended for calling this function directly | ||
func (m AutonomousDatabasePeerSummary) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.