Skip to content

Commit d432108

Browse files
committed
Merge branch 'r-2.1.3' into 'master'
R 2.1.3 See merge request automation-sdk/f5-cloud-failover!425
2 parents abdfb65 + 2e299cf commit d432108

File tree

8 files changed

+54
-33
lines changed

8 files changed

+54
-33
lines changed

.gitlab-ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ test_functional_init_azure:
198198
extends: .test-install
199199
variables:
200200
PLAN: "azure_bigip_classic_ha"
201-
PARAMETERS: "--param location=westus2 --param bigip_version=16.1.401053"
201+
PARAMETERS: "--param location=westus2 --param bigip_version=17.1.103000"
202202
except:
203203
variables:
204204
- $TESTS_TIER == "2"
@@ -312,14 +312,29 @@ test_functional_init_gcp_no_forwarding:
312312
script:
313313
# install jq
314314
- apt-get update
315-
- apt-get install -y jq
315+
- apt-get install -y jq openssh-client sshpass
316+
# create ssh key
317+
- echo "*** Configuring SSH"
318+
- eval $(ssh-agent -s)
319+
- echo "$SSH_KEY" | sed 's/\\n/\n/g' | ssh-add -
320+
- mkdir -p ~/.ssh
321+
- chmod 700 ~/.ssh
316322
# install node (and package dependencies)
317323
- curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
318324
- export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
319325
- nvm install 14 && nvm use 14
320326
- npm install --unsafe-perm
321327
# copying artifacts inherited from functional_test_init target to root directory
322328
- cp -a deployment/. .
329+
- cat deployment_info.json | jq
330+
# proactively restarting rest services
331+
- export USERNAME=$(cat deployment_info.json | jq .instances[0].admin_username -r) && echo "USERNAME is ${USERNAME}"
332+
- export PASSWORD=$(cat deployment_info.json | jq .instances[0].admin_password -r) && echo "PASSWORD is ${PASSWORD}"
333+
- export MGMT_IP_1=$(cat deployment_info.json | jq .instances[0].mgmt_address -r) && echo "MGMT_IP_1 is ${MGMT_IP_1}"
334+
- export MGMT_IP_2=$(cat deployment_info.json | jq .instances[1].mgmt_address -r) && echo "MGMT_IP_2 is ${MGMT_IP_2}"
335+
- sshpass -p $PASSWORD ssh -o StrictHostKeyChecking=no $USERNAME@$MGMT_IP_1 "bigstart restart restnoded restjavad"
336+
- sshpass -p $PASSWORD ssh -o StrictHostKeyChecking=no $USERNAME@$MGMT_IP_2 "bigstart restart restnoded restjavad"
337+
- sleep 30
323338
# executing fuctional test
324339
- validate npm run functional-test
325340
tags:

package-lock.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "f5-cloud-failover",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"author": "F5 Networks",
55
"license": "Apache-2.0",
66
"repository": {

specs/openapi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: "3.0.0"
22
info:
3-
version: 2.1.2
3+
version: 2.1.3
44
title: Cloud Failover (CF) Extension
55
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.
66
license:
@@ -23,9 +23,9 @@ paths:
2323
schema:
2424
$ref: "#/components/schemas/InformationResponse"
2525
example:
26-
version: "2.1.2"
26+
version: "2.1.3"
2727
release: "1"
28-
schemaCurrent: "2.1.2"
28+
schemaCurrent: "2.1.3"
2929
schemaMinimum: "1.0.0"
3030
"400":
3131
description: Bad Request Error

src/nodejs/constants.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = {
124124
portalUrl: 'https://portal.azure.cn',
125125
publishingProfileUrl: 'http://go.microsoft.com/fwlink/?LinkID=301774',
126126
managementEndpointUrl: 'https://management.core.chinacloudapi.cn',
127-
resourceManagerEndpointUrl: 'https://management.chinacloudapi.cn',
127+
resourceManagerEndpointUrl: 'https://management.chinacloudapi.cn/',
128128
sqlManagementEndpointUrl: 'https://management.core.chinacloudapi.cn:8443/',
129129
sqlServerHostnameSuffix: '.database.chinacloudapi.cn',
130130
galleryEndpointUrl: 'https://gallery.chinacloudapi.cn/',
@@ -141,7 +141,7 @@ module.exports = {
141141
portalUrl: 'https://portal.azure.us',
142142
publishingProfileUrl: 'https://manage.windowsazure.us/publishsettings/index',
143143
managementEndpointUrl: 'https://management.core.usgovcloudapi.net',
144-
resourceManagerEndpointUrl: 'https://management.usgovcloudapi.net',
144+
resourceManagerEndpointUrl: 'https://management.usgovcloudapi.net/',
145145
sqlManagementEndpointUrl: 'https://management.core.usgovcloudapi.net:8443/',
146146
sqlServerHostnameSuffix: '.database.usgovcloudapi.net',
147147
galleryEndpointUrl: 'https://gallery.usgovcloudapi.net/',
@@ -158,7 +158,7 @@ module.exports = {
158158
portalUrl: 'http://portal.microsoftazure.de/',
159159
publishingProfileUrl: 'https://manage.microsoftazure.de/publishsettings/index',
160160
managementEndpointUrl: 'https://management.core.cloudapi.de',
161-
resourceManagerEndpointUrl: 'https://management.microsoftazure.de',
161+
resourceManagerEndpointUrl: 'https://management.microsoftazure.de/',
162162
sqlManagementEndpointUrl: 'https://management.core.cloudapi.de:8443/',
163163
sqlServerHostnameSuffix: '.database.cloudapi.de',
164164
galleryEndpointUrl: 'https://gallery.cloudapi.de/',

src/nodejs/failover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class FailoverClient {
433433
updateActions.push(this.isRouteOperationsEnabled ? this.cloudProvider.updateRoutes({
434434
localAddresses: addresses.localAddresses,
435435
discoverOnly: true
436-
}) : {});
436+
}) : { operations: [] });
437437

438438
return Promise.all(updateActions)
439439
.catch((err) => {

src/nodejs/schema/base_schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"type": "string",
118118
"$comment": "IMPORTANT: In enum array, please put current schema version first, oldest-supported version last. Keep enum array sorted most-recent-first.",
119119
"enum": [
120+
"2.1.3",
120121
"2.1.2",
121122
"2.1.1",
122123
"2.1.0",
@@ -143,7 +144,7 @@
143144
"1.0.0",
144145
"0.9.1"
145146
],
146-
"default": "2.1.2"
147+
"default": "2.1.3"
147148
},
148149
"$schema": {
149150
"title": "Schema",

test/functional/tests/shared/util.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ module.exports = {
155155
}))
156156
};
157157
const renderedData = mustache.render(fs.readFileSync(declarationTemplate).toString(), declarationData);
158-
// console.log('RENDERED DATA FOR DECLARATION', declarationLocation, 'is:', renderedData);
159158
return JSON.parse(renderedData);
160159
},
161160

@@ -294,7 +293,10 @@ module.exports = {
294293
const opts = {
295294
HOST: host,
296295
PORT: port,
297-
AUTH_TOKEN: authToken
296+
AUTH_TOKEN: authToken,
297+
headers: {
298+
'x-f5-auth-token': authToken
299+
}
298300
};
299301

300302
return new Promise((resolve, reject) => {
@@ -326,7 +328,10 @@ module.exports = {
326328
const opts = {
327329
HOST: host,
328330
PORT: port,
329-
AUTH_TOKEN: authToken
331+
AUTH_TOKEN: authToken,
332+
headers: {
333+
'x-f5-auth-token': authToken
334+
}
330335
};
331336

332337
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)