From 2e299cff3447dde6335b069d02622a3365553469 Mon Sep 17 00:00:00 2001 From: Michael Shimkus Date: Thu, 26 Sep 2024 11:42:44 -0700 Subject: [PATCH] R 2.1.3 --- .gitlab-ci.yml | 19 ++++++++++++-- package-lock.json | 38 ++++++++++++++-------------- package.json | 2 +- specs/openapi.yaml | 6 ++--- src/nodejs/constants.js | 6 ++--- src/nodejs/failover.js | 2 +- src/nodejs/schema/base_schema.json | 3 ++- test/functional/tests/shared/util.js | 11 +++++--- 8 files changed, 54 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae544341..bb70cde0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,7 +198,7 @@ test_functional_init_azure: extends: .test-install variables: PLAN: "azure_bigip_classic_ha" - PARAMETERS: "--param location=westus2 --param bigip_version=16.1.401053" + PARAMETERS: "--param location=westus2 --param bigip_version=17.1.103000" except: variables: - $TESTS_TIER == "2" @@ -312,7 +312,13 @@ test_functional_init_gcp_no_forwarding: script: # install jq - apt-get update - - apt-get install -y jq + - apt-get install -y jq openssh-client sshpass + # create ssh key + - echo "*** Configuring SSH" + - eval $(ssh-agent -s) + - echo "$SSH_KEY" | sed 's/\\n/\n/g' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh # install node (and package dependencies) - curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash - export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" @@ -320,6 +326,15 @@ test_functional_init_gcp_no_forwarding: - npm install --unsafe-perm # copying artifacts inherited from functional_test_init target to root directory - cp -a deployment/. . + - cat deployment_info.json | jq + # proactively restarting rest services + - export USERNAME=$(cat deployment_info.json | jq .instances[0].admin_username -r) && echo "USERNAME is ${USERNAME}" + - export PASSWORD=$(cat deployment_info.json | jq .instances[0].admin_password -r) && echo "PASSWORD is ${PASSWORD}" + - export MGMT_IP_1=$(cat deployment_info.json | jq .instances[0].mgmt_address -r) && echo "MGMT_IP_1 is ${MGMT_IP_1}" + - export MGMT_IP_2=$(cat deployment_info.json | jq .instances[1].mgmt_address -r) && echo "MGMT_IP_2 is ${MGMT_IP_2}" + - sshpass -p $PASSWORD ssh -o StrictHostKeyChecking=no $USERNAME@$MGMT_IP_1 "bigstart restart restnoded restjavad" + - sshpass -p $PASSWORD ssh -o StrictHostKeyChecking=no $USERNAME@$MGMT_IP_2 "bigstart restart restnoded restjavad" + - sleep 30 # executing fuctional test - validate npm run functional-test tags: diff --git a/package-lock.json b/package-lock.json index f8511914..26293cc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "f5-cloud-failover", - "version": "2.1.2", + "version": "2.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -95,9 +95,9 @@ } }, "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "requires": { "psl": "^1.1.33", @@ -143,9 +143,9 @@ }, "dependencies": { "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "requires": { "psl": "^1.1.33", @@ -219,9 +219,9 @@ } }, "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -2027,9 +2027,9 @@ "optional": true }, "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "optional": true, "requires": { "psl": "^1.1.33", @@ -2041,9 +2041,9 @@ } }, "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "requires": { "psl": "^1.1.33", "universalify": "^0.2.0", @@ -7123,9 +7123,9 @@ } }, "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "requires": { "psl": "^1.1.33", diff --git a/package.json b/package.json index 76ea95ca..e9f250c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "f5-cloud-failover", - "version": "2.1.2", + "version": "2.1.3", "author": "F5 Networks", "license": "Apache-2.0", "repository": { diff --git a/specs/openapi.yaml b/specs/openapi.yaml index d148ae4a..83a2514a 100644 --- a/specs/openapi.yaml +++ b/specs/openapi.yaml @@ -1,6 +1,6 @@ openapi: "3.0.0" info: - version: 2.1.2 + version: 2.1.3 title: Cloud Failover (CF) Extension description: F5 Cloud Failover (CFE) is an iControl LX Extension delivered as a TMOS-independent RPM file. Installing the CFE Extension on BIG-IP enables you to declaratively configure BIG-IP devices for automatic failover in cloud environments by POSTing a single JSON declaration to CF’s declarative REST API endpoint. license: @@ -23,9 +23,9 @@ paths: schema: $ref: "#/components/schemas/InformationResponse" example: - version: "2.1.2" + version: "2.1.3" release: "1" - schemaCurrent: "2.1.2" + schemaCurrent: "2.1.3" schemaMinimum: "1.0.0" "400": description: Bad Request Error diff --git a/src/nodejs/constants.js b/src/nodejs/constants.js index 9dc9e32f..37fea43e 100644 --- a/src/nodejs/constants.js +++ b/src/nodejs/constants.js @@ -124,7 +124,7 @@ module.exports = { portalUrl: 'https://portal.azure.cn', publishingProfileUrl: 'http://go.microsoft.com/fwlink/?LinkID=301774', managementEndpointUrl: 'https://management.core.chinacloudapi.cn', - resourceManagerEndpointUrl: 'https://management.chinacloudapi.cn', + resourceManagerEndpointUrl: 'https://management.chinacloudapi.cn/', sqlManagementEndpointUrl: 'https://management.core.chinacloudapi.cn:8443/', sqlServerHostnameSuffix: '.database.chinacloudapi.cn', galleryEndpointUrl: 'https://gallery.chinacloudapi.cn/', @@ -141,7 +141,7 @@ module.exports = { portalUrl: 'https://portal.azure.us', publishingProfileUrl: 'https://manage.windowsazure.us/publishsettings/index', managementEndpointUrl: 'https://management.core.usgovcloudapi.net', - resourceManagerEndpointUrl: 'https://management.usgovcloudapi.net', + resourceManagerEndpointUrl: 'https://management.usgovcloudapi.net/', sqlManagementEndpointUrl: 'https://management.core.usgovcloudapi.net:8443/', sqlServerHostnameSuffix: '.database.usgovcloudapi.net', galleryEndpointUrl: 'https://gallery.usgovcloudapi.net/', @@ -158,7 +158,7 @@ module.exports = { portalUrl: 'http://portal.microsoftazure.de/', publishingProfileUrl: 'https://manage.microsoftazure.de/publishsettings/index', managementEndpointUrl: 'https://management.core.cloudapi.de', - resourceManagerEndpointUrl: 'https://management.microsoftazure.de', + resourceManagerEndpointUrl: 'https://management.microsoftazure.de/', sqlManagementEndpointUrl: 'https://management.core.cloudapi.de:8443/', sqlServerHostnameSuffix: '.database.cloudapi.de', galleryEndpointUrl: 'https://gallery.cloudapi.de/', diff --git a/src/nodejs/failover.js b/src/nodejs/failover.js index df292868..81a7af78 100644 --- a/src/nodejs/failover.js +++ b/src/nodejs/failover.js @@ -433,7 +433,7 @@ class FailoverClient { updateActions.push(this.isRouteOperationsEnabled ? this.cloudProvider.updateRoutes({ localAddresses: addresses.localAddresses, discoverOnly: true - }) : {}); + }) : { operations: [] }); return Promise.all(updateActions) .catch((err) => { diff --git a/src/nodejs/schema/base_schema.json b/src/nodejs/schema/base_schema.json index a6f9e07f..c856bf08 100644 --- a/src/nodejs/schema/base_schema.json +++ b/src/nodejs/schema/base_schema.json @@ -117,6 +117,7 @@ "type": "string", "$comment": "IMPORTANT: In enum array, please put current schema version first, oldest-supported version last. Keep enum array sorted most-recent-first.", "enum": [ + "2.1.3", "2.1.2", "2.1.1", "2.1.0", @@ -143,7 +144,7 @@ "1.0.0", "0.9.1" ], - "default": "2.1.2" + "default": "2.1.3" }, "$schema": { "title": "Schema", diff --git a/test/functional/tests/shared/util.js b/test/functional/tests/shared/util.js index d7e01dd3..2d5975d4 100644 --- a/test/functional/tests/shared/util.js +++ b/test/functional/tests/shared/util.js @@ -155,7 +155,6 @@ module.exports = { })) }; const renderedData = mustache.render(fs.readFileSync(declarationTemplate).toString(), declarationData); - // console.log('RENDERED DATA FOR DECLARATION', declarationLocation, 'is:', renderedData); return JSON.parse(renderedData); }, @@ -294,7 +293,10 @@ module.exports = { const opts = { HOST: host, PORT: port, - AUTH_TOKEN: authToken + AUTH_TOKEN: authToken, + headers: { + 'x-f5-auth-token': authToken + } }; return new Promise((resolve, reject) => { @@ -326,7 +328,10 @@ module.exports = { const opts = { HOST: host, PORT: port, - AUTH_TOKEN: authToken + AUTH_TOKEN: authToken, + headers: { + 'x-f5-auth-token': authToken + } }; return new Promise((resolve, reject) => {