diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 49d8aabad..e0c16fadc 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -60,7 +60,7 @@ jobs: run: | cd import-export-cli # go vet ./... - ./build.sh -t apictl.go -v 4.5.0 + ./build.sh -t apictl.go -v 4.6.0 - name: Start APIM run: | @@ -71,4 +71,4 @@ jobs: - name: Test run: | cd import-export-cli/integration - go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... + go test -p 1 -timeout 0 -archive apictl-4.6.0-linux-x64.tar.gz -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... diff --git a/apim-apk-agent/pkg/managementserver/rest_server.go b/apim-apk-agent/pkg/managementserver/rest_server.go index 8a693ca09..49eaf4e8f 100644 --- a/apim-apk-agent/pkg/managementserver/rest_server.go +++ b/apim-apk-agent/pkg/managementserver/rest_server.go @@ -292,7 +292,7 @@ func createAPIYaml(apiCPEvent *APICPEvent) (string, string, string) { data := map[string]interface{}{ "type": "api", - "version": "v4.5.0", + "version": "v4.6.0", "data": map[string]interface{}{ "name": apiCPEvent.API.APIName, "context": context, @@ -589,7 +589,7 @@ func createAPIYaml(apiCPEvent *APICPEvent) (string, string, string) { if prodCount > 1 || sandCount > 1 { endpointsData = map[string]interface{}{ "type": "endpoints", - "version": "v4.5.0", + "version": "v4.6.0", "data": dataArr, } } diff --git a/import-export-cli/README.md b/import-export-cli/README.md index f3b7fb061..bb7a06565 100644 --- a/import-export-cli/README.md +++ b/import-export-cli/README.md @@ -1,5 +1,5 @@ # CLI for Importing and Exporting APIs and Applications and Managing WSO2 Micro Integrator -## For WSO2 API Manager 4.5.0 +## For WSO2 API Manager 4.6.0 Command Line tool for importing and exporting APIs/Applications/API Products in between different API environments of WSO2 API Manager and managing WSO2 Micro Integrator @@ -17,7 +17,7 @@ Command Line tool for importing and exporting APIs/Applications/API Products in - ### Building `cd` into `product-apim-tooling/import-export-cli` - Execute `./build.sh -t apictl.go -v 4.5.0 -f` to build for all platforms. + Execute `./build.sh -t apictl.go -v 4.6.0 -f` to build for all platforms. Created packages will be available at `build/target` directory @@ -69,11 +69,11 @@ Command Line tool for importing and exporting APIs/Applications/API Products in Usage: `docker build --build-arg version= -t apictl: .` - Example: `docker build --build-arg version=4.5.0.1 -t apictl:4.5.0.1 .` + Example: `docker build --build-arg version=4.6.0.1 -t apictl:4.6.0.1 .` - ### Using the Docker Image - `docker run -it -v $(pwd):/git -v ~/.wso2apictl:/root/.wso2apictl -v ~/.wso2apictl.local:/root/.wso2apictl.local apictl:4.5.0.1 ` + `docker run -it -v $(pwd):/git -v ~/.wso2apictl:/root/.wso2apictl -v ~/.wso2apictl.local:/root/.wso2apictl.local apictl:4.6.0.1 ` *** diff --git a/import-export-cli/box/resources/init/default_api.yaml b/import-export-cli/box/resources/init/default_api.yaml index d838b3b60..210cabf61 100644 --- a/import-export-cli/box/resources/init/default_api.yaml +++ b/import-export-cli/box/resources/init/default_api.yaml @@ -1,5 +1,5 @@ type: api -version: v4.5.0 +version: v4.6.0 data: name: context: diff --git a/import-export-cli/box/resources/init/default_deployment_environments.yaml b/import-export-cli/box/resources/init/default_deployment_environments.yaml index d3f38ea08..2c06636c2 100644 --- a/import-export-cli/box/resources/init/default_deployment_environments.yaml +++ b/import-export-cli/box/resources/init/default_deployment_environments.yaml @@ -1,5 +1,5 @@ type: deployment_environments -version: v4.5.0 +version: v4.6.0 data: - displayOnDevportal: true diff --git a/import-export-cli/box/resources/init/document.yaml b/import-export-cli/box/resources/init/document.yaml index 2f40adadb..a866e5cb4 100644 --- a/import-export-cli/box/resources/init/document.yaml +++ b/import-export-cli/box/resources/init/document.yaml @@ -1,5 +1,5 @@ type: document -version: v4.5.0 +version: v4.6.0 data: name: AWSSecurityDocs type: OTHER diff --git a/import-export-cli/cmd/testdata/MyProduct-1.0.0-malformed/APIs/PizzaShackAPI-1.0.0/api.yaml b/import-export-cli/cmd/testdata/MyProduct-1.0.0-malformed/APIs/PizzaShackAPI-1.0.0/api.yaml index 02ddc67f2..b96849533 100644 --- a/import-export-cli/cmd/testdata/MyProduct-1.0.0-malformed/APIs/PizzaShackAPI-1.0.0/api.yaml +++ b/import-export-cli/cmd/testdata/MyProduct-1.0.0-malformed/APIs/PizzaShackAPI-1.0.0/api.yaml @@ -1,5 +1,5 @@ type: api -version: v4.5.0 +version: v4.6.0 data: id: 39325037-1508-4398-a358-e551927ff075 name: PizzaShackAPI diff --git a/import-export-cli/cmd/testdata/MyProduct-1.0.0/APIs/PizzaShackAPI-1.0.0/api.yaml b/import-export-cli/cmd/testdata/MyProduct-1.0.0/APIs/PizzaShackAPI-1.0.0/api.yaml index 02ddc67f2..b96849533 100644 --- a/import-export-cli/cmd/testdata/MyProduct-1.0.0/APIs/PizzaShackAPI-1.0.0/api.yaml +++ b/import-export-cli/cmd/testdata/MyProduct-1.0.0/APIs/PizzaShackAPI-1.0.0/api.yaml @@ -1,5 +1,5 @@ type: api -version: v4.5.0 +version: v4.6.0 data: id: 39325037-1508-4398-a358-e551927ff075 name: PizzaShackAPI diff --git a/import-export-cli/cmd/testdata/PizzaShackAPI-1.0.0/api.yaml b/import-export-cli/cmd/testdata/PizzaShackAPI-1.0.0/api.yaml index 02ddc67f2..b96849533 100644 --- a/import-export-cli/cmd/testdata/PizzaShackAPI-1.0.0/api.yaml +++ b/import-export-cli/cmd/testdata/PizzaShackAPI-1.0.0/api.yaml @@ -1,5 +1,5 @@ type: api -version: v4.5.0 +version: v4.6.0 data: id: 39325037-1508-4398-a358-e551927ff075 name: PizzaShackAPI diff --git a/import-export-cli/docs/apictl_export_api.md b/import-export-cli/docs/apictl_export_api.md index 3ddba054c..081c9109b 100644 --- a/import-export-cli/docs/apictl_export_api.md +++ b/import-export-cli/docs/apictl_export_api.md @@ -23,15 +23,16 @@ without deployment environments will be exported. ### Options ``` - -e, --environment string Environment to which the API should be exported - --format string File format of exported archive(json or yaml) (default "YAML") - -h, --help help for api - --latest Export the latest revision of the API - -n, --name string Name of the API to be exported - --preserve-status Preserve API status when exporting. Otherwise API will be exported in CREATED status (default true) - -r, --provider string Provider of the API - --rev string Revision number of the API to be exported - -v, --version string Version of the API to be exported + -e, --environment string Environment to which the API should be exported + --format string File format of exported archive(json or yaml) (default "YAML") + -h, --help help for api + --latest Export the latest revision of the API + -n, --name string Name of the API to be exported + --preserve-credentials Preserve endpoint credentials when exporting. Otherwise credentials will not be exported + --preserve-status Preserve API status when exporting. Otherwise API will be exported in CREATED status (default true) + -r, --provider string Provider of the API + --rev string Revision number of the API to be exported + -v, --version string Version of the API to be exported ``` ### Options inherited from parent commands diff --git a/import-export-cli/docs/apictl_export_apis.md b/import-export-cli/docs/apictl_export_apis.md index 2c39494fe..93a70795d 100644 --- a/import-export-cli/docs/apictl_export_apis.md +++ b/import-export-cli/docs/apictl_export_apis.md @@ -21,12 +21,13 @@ NOTE: The flag (--environment (-e)) is mandatory ### Options ``` - --all Export working copy and all revisions for the APIs in the environments - -e, --environment string Environment from which the APIs should be exported - --force Clean all the previously exported APIs of the given target tenant, in the given environment if any, and to export APIs from beginning - --format string File format of exported archives(json or yaml) (default "YAML") - -h, --help help for apis - --preserve-status Preserve API status when exporting. Otherwise API will be exported in CREATED status (default true) + --all Export working copy and all revisions for the APIs in the environments + -e, --environment string Environment from which the APIs should be exported + --force Clean all the previously exported APIs of the given target tenant, in the given environment if any, and to export APIs from beginning + --format string File format of exported archives(json or yaml) (default "YAML") + -h, --help help for apis + --preserve-credentials Preserve endpoint credentials when exporting. Otherwise credentials will not be exported + --preserve-status Preserve API status when exporting. Otherwise API will be exported in CREATED status (default true) ``` ### Options inherited from parent commands diff --git a/import-export-cli/docs/apictl_export_apps.md b/import-export-cli/docs/apictl_export_apps.md new file mode 100644 index 000000000..846a2aa2e --- /dev/null +++ b/import-export-cli/docs/apictl_export_apps.md @@ -0,0 +1,41 @@ +## apictl export apps + +Export Applications + +### Synopsis + +Export Applications of a given tenant from a specified environment + +``` +apictl export apps (--environment --format --force) [flags] +``` + +### Examples + +``` +apictl export apps -e dev --force +apictl export apps -e prod +NOTE: The flag (--environment (-e)) is mandatory +``` + +### Options + +``` + -e, --environment string Environment from which the Applications should be exported + --force Clean all the previously exported Apps of the given target tenant, in the given environment if any, and to export Apps from beginning + --format string File format of exported archive (json or yaml) (default "YAML") + -h, --help help for apps + --with-keys Export keys for the applications +``` + +### Options inherited from parent commands + +``` + -k, --insecure Allow connections to SSL endpoints without certs + --verbose Enable verbose mode +``` + +### SEE ALSO + +* [apictl export](apictl_export.md) - Export an API/API Product/Application/Policy in an environment + diff --git a/import-export-cli/impl/importAPIProduct_test.go b/import-export-cli/impl/importAPIProduct_test.go index 44e3b2c8f..5558293f9 100644 --- a/import-export-cli/impl/importAPIProduct_test.go +++ b/import-export-cli/impl/importAPIProduct_test.go @@ -33,7 +33,7 @@ func TestExtractAPIProductInfoWithCorrectJSON(t *testing.T) { // Correct json content := `{ "type": "api_product", - "version": "v4.5.0", + "version": "v4.6.0", "data": { "id": "e4d0c1be-44e9-43ad-b434-f8e2f02dad11", "name": "APIProductName", @@ -51,7 +51,7 @@ func TestExtractAPIProductInfoWhenDataTagMissing(t *testing.T) { // When ID tag missing content := `{ "type": "api_product", - "version": "v4.5.0" + "version": "v4.6.0" }` apiProduct, err := extractAPIProductDefinition([]byte(content)) assert.Nil(t, err, "Should return nil error") @@ -62,7 +62,7 @@ func TestExtractAPIProductInfoWithMalformedJSON(t *testing.T) { // Malformed json content := `{ "type": "api_product", - "version": "v4.5.0", + "version": "v4.6.0", "data": { "id": "e4d0c1be-44e9-43ad-b434-f8e2f02dad11", "name": "APIProductName", diff --git a/import-export-cli/impl/importAPI_test.go b/import-export-cli/impl/importAPI_test.go index 5157d6057..820be1e8b 100644 --- a/import-export-cli/impl/importAPI_test.go +++ b/import-export-cli/impl/importAPI_test.go @@ -32,7 +32,7 @@ func TestExtractAPIInfoWithCorrectJSON(t *testing.T) { // Correct json content := `{ "type": "api", - "version": "v4.5.0", + "version": "v4.6.0", "data": { "id": "e4d0c1be-44e9-43ad-b434-f8e2f02dad11", "name": "APIName", @@ -52,7 +52,7 @@ func TestExtractAPIInfoWhenDataTagMissing(t *testing.T) { // When ID tag missing content := `{ "type": "api", - "version": "v4.5.0" + "version": "v4.6.0" }` api, err := extractAPIDefinition([]byte(content)) diff --git a/import-export-cli/integration/README.md b/import-export-cli/integration/README.md index fdc10ad06..477cd9d61 100644 --- a/import-export-cli/integration/README.md +++ b/import-export-cli/integration/README.md @@ -52,7 +52,7 @@ devops-rest-api-version: v0 The version of the apictl that is being integration tested. ``` -apictl-version: 4.5.0 +apictl-version: 4.6.0 ``` @@ -95,7 +95,7 @@ apictl-version: 4.5.0 ``` go test -p 1 -timeout 0 -archive -example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz +example: go test -p 1 -timeout 0 -archive apictl-4.6.0-linux-x64.tar.gz ``` @@ -104,7 +104,7 @@ example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz ``` go test -p 1 -timeout 0 -archive -run -example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz -run TestVersion +example: go test -p 1 -timeout 0 -archive apictl-4.6.0-linux-x64.tar.gz -run TestVersion ``` - Print verbose output @@ -112,7 +112,7 @@ example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz -run Tes ``` go test -p 1 -timeout 0 -archive -v -example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz -v +example: go test -p 1 -timeout 0 -archive apictl-4.6.0-linux-x64.tar.gz -v ``` - Print http transport request/responses @@ -120,7 +120,7 @@ example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz -v ``` go test -p 1 -timeout 0 -archive -logtransport -example: go test -p 1 -timeout 0 -archive apictl-4.5.0-linux-x64.tar.gz -logtransport +example: go test -p 1 -timeout 0 -archive apictl-4.6.0-linux-x64.tar.gz -logtransport ``` --- diff --git a/import-export-cli/integration/ci-resources/start-apim.sh b/import-export-cli/integration/ci-resources/start-apim.sh index e0095153c..a83bdd44f 100755 --- a/import-export-cli/integration/ci-resources/start-apim.sh +++ b/import-export-cli/integration/ci-resources/start-apim.sh @@ -10,14 +10,14 @@ done if [ -z "$DOWNLOAD_LINK" ] then - APIM_DOWNLOAD='https://wso2.org/jenkins/job/products/job/product_apim/job/product-apim/lastStableBuild/org.wso2.am$wso2am/artifact/org.wso2.am/wso2am/4.5.0-SNAPSHOT/wso2am-4.5.0-SNAPSHOT.zip' + APIM_DOWNLOAD='https://wso2.org/jenkins/job/products/job/product_apim/job/product-apim/lastStableBuild/org.wso2.am$wso2am/artifact/org.wso2.am/wso2am/4.6.0-SNAPSHOT/wso2am-4.6.0-SNAPSHOT.zip' else APIM_DOWNLOAD=$DOWNLOAD_LINK fi if [ -z "$NAME" ] then - APIM_PACK=wso2am-4.5.0-SNAPSHOT + APIM_PACK=wso2am-4.6.0-SNAPSHOT else APIM_PACK=$NAME fi diff --git a/import-export-cli/integration/config.yaml b/import-export-cli/integration/config.yaml index 83127d148..63a59c6b3 100644 --- a/import-export-cli/integration/config.yaml +++ b/import-export-cli/integration/config.yaml @@ -19,4 +19,4 @@ admin-rest-api-version: v4 devportal-rest-api-version: v3 publisher-rest-api-version: v4 devops-rest-api-version: v0 -apictl-version: 4.5.0 +apictl-version: 4.6.0 diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/Doc2/document.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/Doc2/document.yaml index 9d8fd42b5..a986ea9b2 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/Doc2/document.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/Doc2/document.yaml @@ -1,5 +1,5 @@ type: document -version: v4.5.0 +version: v4.6.0 data: documentId: 99343207-6374-4518-9ee2-91305feb2b69 name: Doc2 diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v1.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v1.yaml index ccef87011..7ed056498 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v1.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v1.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessage diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v2.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v2.yaml index 372e74250..6593bc0cc 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v2.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstSampleCaseArtifacts/customAddLogMessage_v2.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessage diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/Doc1/document.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/Doc1/document.yaml index c96fa2fc4..97184fc25 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/Doc1/document.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/Doc1/document.yaml @@ -1,5 +1,5 @@ type: document -version: v4.5.0 +version: v4.6.0 data: documentId: 5d79aead-eeb3-43b9-84eb-51a965e383ed name: Doc1 diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/customAddLogMessage_v1_api.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/customAddLogMessage_v1_api.yaml index d097eaf71..51b37d35d 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/customAddLogMessage_v1_api.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevFirstUpdatedSampleCaseArtifacts/customAddLogMessage_v1_api.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessage diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseMalformedOperationPolicyArtifacts/customAddLogMessage/customAddLogMessage.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseMalformedOperationPolicyArtifacts/customAddLogMessage/customAddLogMessage.yaml index 1135136a6..cb8cde459 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseMalformedOperationPolicyArtifacts/customAddLogMessage/customAddLogMessage.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseMalformedOperationPolicyArtifacts/customAddLogMessage/customAddLogMessage.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: name: customAddLogMessageTestOperationPolicy version: v1 diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v1.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v1.yaml index 467b83e6b..da95d5a79 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v1.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v1.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessageTestOperationPolicy diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v2.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v2.yaml index f8850252f..ac7a1911e 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v2.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifacts/customAddLogMessage_v2.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessageTestOperationPolicy diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifactsWithInconsistentFileNames/customAddLogMessage/customAddLogMessage1.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifactsWithInconsistentFileNames/customAddLogMessage/customAddLogMessage1.yaml index 467b83e6b..da95d5a79 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifactsWithInconsistentFileNames/customAddLogMessage/customAddLogMessage1.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DevSampleCaseOperationPolicyArtifactsWithInconsistentFileNames/customAddLogMessage/customAddLogMessage1.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessageTestOperationPolicy diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/DynamicDataSampleCaseArtifacts/dynamicAddLogMessage_v1_api.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/DynamicDataSampleCaseArtifacts/dynamicAddLogMessage_v1_api.yaml index 2e7eddc11..0641a887a 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/DynamicDataSampleCaseArtifacts/dynamicAddLogMessage_v1_api.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/DynamicDataSampleCaseArtifacts/dynamicAddLogMessage_v1_api.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: dynamicAddLogMessage diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/TestSynapseChoreoConnectPolicyArtifacts/testSynapseChoreoConnectPolicy.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/TestSynapseChoreoConnectPolicyArtifacts/testSynapseChoreoConnectPolicy.yaml index 54f9f3d25..80733888a 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/TestSynapseChoreoConnectPolicyArtifacts/testSynapseChoreoConnectPolicy.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/TestSynapseChoreoConnectPolicyArtifacts/testSynapseChoreoConnectPolicy.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: testSynapseChoreoConnectPolicy diff --git a/import-export-cli/integration/testdata/TestArtifactDirectory/customAddLogMessage/customAddLogMessage.yaml b/import-export-cli/integration/testdata/TestArtifactDirectory/customAddLogMessage/customAddLogMessage.yaml index 467b83e6b..da95d5a79 100644 --- a/import-export-cli/integration/testdata/TestArtifactDirectory/customAddLogMessage/customAddLogMessage.yaml +++ b/import-export-cli/integration/testdata/TestArtifactDirectory/customAddLogMessage/customAddLogMessage.yaml @@ -1,5 +1,5 @@ type: operation_policy_specification -version: v4.5.0 +version: v4.6.0 data: category: Mediation name: customAddLogMessageTestOperationPolicy diff --git a/import-export-cli/integration/testdata/sample-api.yaml b/import-export-cli/integration/testdata/sample-api.yaml index 8cbbfeafe..8de7b9642 100644 --- a/import-export-cli/integration/testdata/sample-api.yaml +++ b/import-export-cli/integration/testdata/sample-api.yaml @@ -13,7 +13,7 @@ # limitations under the License. type: api # Type of the exported artifact using APICTL -version: v4.5.0 # API Manager version +version: v4.6.0 # API Manager version data: # Contains the meta data of the API id: 28114236-515c-4f40-82e4-6a016e632008 ## API UUID name: PizzaShackAPI # Name of the API without Spaces [required] diff --git a/import-export-cli/integration/testdata/sample-revisioned-api.yaml b/import-export-cli/integration/testdata/sample-revisioned-api.yaml index 01c2c9169..4591285fe 100644 --- a/import-export-cli/integration/testdata/sample-revisioned-api.yaml +++ b/import-export-cli/integration/testdata/sample-revisioned-api.yaml @@ -13,7 +13,7 @@ # limitations under the License. type: api # Type of the exported artifact using APICTL -version: v4.5.0 # API Manager version +version: v4.6.0 # API Manager version data: # Contains the meta data of the API id: 28114236-515c-4f40-82e4-6a016e632008 ## API UUID name: PizzaShackAPI # Name of the API without Spaces [required] diff --git a/import-export-cli/integration/testutils/policy_testUtils.go b/import-export-cli/integration/testutils/policy_testUtils.go index 289b3eee4..965f44a99 100644 --- a/import-export-cli/integration/testutils/policy_testUtils.go +++ b/import-export-cli/integration/testutils/policy_testUtils.go @@ -263,7 +263,7 @@ func createExportedThrottlePolicyFile(t *testing.T, client *apim.Client, policyT } } - exportedPolicy.Version = "v4.5.0" + exportedPolicy.Version = "v4.6.0" policyData := client.GenerateSampleThrottlePolicyData(policyType) policyMap, _ := PolicyStructToMap(policyData) var yamlMap yaml.MapSlice diff --git a/import-export-cli/resources/README.html b/import-export-cli/resources/README.html index 9b077b58e..8d976c3f0 100644 --- a/import-export-cli/resources/README.html +++ b/import-export-cli/resources/README.html @@ -1,5 +1,5 @@

CLI for Importing and Exporting APIs and Applications and Managing WSO2 Micro Integrator

-

For WSO2 API Manager 4.5.0

+

For WSO2 API Manager 4.6.0

Command Line tool for importing and exporting APIs/Applications/API Products in between different API environments of WSO2 API Manager and managing WSO2 Micro Integrator

Getting Started

    diff --git a/import-export-cli/shell-completions/apictl_bash_completions.sh b/import-export-cli/shell-completions/apictl_bash_completions.sh index 5731b89cf..8179c46f3 100644 --- a/import-export-cli/shell-completions/apictl_bash_completions.sh +++ b/import-export-cli/shell-completions/apictl_bash_completions.sh @@ -1510,6 +1510,8 @@ _apictl_export_api() local_nonpersistent_flags+=("--name") local_nonpersistent_flags+=("--name=") local_nonpersistent_flags+=("-n") + flags+=("--preserve-credentials") + local_nonpersistent_flags+=("--preserve-credentials") flags+=("--preserve-status") local_nonpersistent_flags+=("--preserve-status") flags+=("--provider=") @@ -1643,6 +1645,8 @@ _apictl_export_apis() flags+=("-h") local_nonpersistent_flags+=("--help") local_nonpersistent_flags+=("-h") + flags+=("--preserve-credentials") + local_nonpersistent_flags+=("--preserve-credentials") flags+=("--preserve-status") local_nonpersistent_flags+=("--preserve-status") flags+=("--insecure")