Skip to content

Commit 18df5c9

Browse files
Sandeep SSandeep S
authored andcommitted
Chore : update location order of custom resolver
1 parent cc98b72 commit 18df5c9

File tree

5 files changed

+337
-513
lines changed

5 files changed

+337
-513
lines changed

dns-svcs/v1.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import {
2424
Authenticator,
2525
BaseService,
2626
getAuthenticatorFromEnvironment,
27-
UserOptions,
2827
validateParams,
28+
UserOptions,
2929
} from 'ibm-cloud-sdk-core';
3030
import { getSdkHeaders } from '../lib/common';
3131

@@ -3016,7 +3016,7 @@ class DnsSvcsV1 extends BaseService {
30163016
* @param {string} params.instanceId - The unique identifier of a service instance.
30173017
* @param {string} params.resolverId - The unique identifier of a custom resolver.
30183018
* @param {string} [params.zone] - zone name.
3019-
* @param {SecondaryZoneSourceInputItem[]} [params.transferFrom] - The source configuration of secondary zone input.
3019+
* @param {string[]} [params.transferFrom] - The source configuration of secondary zone input.
30203020
* @param {string} [params.description] - Descriptive text of the secondary zone.
30213021
* @param {boolean} [params.enabled] - Enable/Disable the secondary zone.
30223022
* @param {string} [params.xCorrelationId] - Uniquely identifying a request.
@@ -3209,7 +3209,7 @@ class DnsSvcsV1 extends BaseService {
32093209
* @param {string} params.szId - The unique identifier of a secondary zone.
32103210
* @param {string} [params.description] - Descriptive text of the secondary zone.
32113211
* @param {boolean} [params.enabled] - Enable/Disable the secondary zone.
3212-
* @param {SecondaryZoneSourceInputItem[]} [params.transferFrom] - The source configuration of secondary zone input.
3212+
* @param {string[]} [params.transferFrom] - The source configuration of secondary zone input.
32133213
* @param {string} [params.xCorrelationId] - Uniquely identifying a request.
32143214
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
32153215
* @returns {Promise<DnsSvcsV1.Response<DnsSvcsV1.SecondaryZone>>}
@@ -4945,7 +4945,7 @@ namespace DnsSvcsV1 {
49454945
/** zone name. */
49464946
zone?: string;
49474947
/** The source configuration of secondary zone input. */
4948-
transferFrom?: SecondaryZoneSourceInputItem[];
4948+
transferFrom?: string[];
49494949
/** Descriptive text of the secondary zone. */
49504950
description?: string;
49514951
/** Enable/Disable the secondary zone. */
@@ -4996,7 +4996,7 @@ namespace DnsSvcsV1 {
49964996
/** Enable/Disable the secondary zone. */
49974997
enabled?: boolean;
49984998
/** The source configuration of secondary zone input. */
4999-
transferFrom?: SecondaryZoneSourceInputItem[];
4999+
transferFrom?: string[];
50005000
/** Uniquely identifying a request. */
50015001
xCorrelationId?: string;
50025002
headers?: OutgoingHttpHeaders;
@@ -5249,20 +5249,6 @@ namespace DnsSvcsV1 {
52495249
export interface ResourceRecordUpdateInputRdata {
52505250
}
52515251

5252-
/** The source address of secondary zone. */
5253-
export interface SecondaryZoneSourceInputItem {
5254-
/** The address of secondary zone. */
5255-
address?: string;
5256-
}
5257-
5258-
/** The source address of secondary zone. */
5259-
export interface SecondaryZoneTransferFromItem {
5260-
/** The address of secondary zone. */
5261-
address?: string;
5262-
/** The port number of secondary zone. */
5263-
port?: number;
5264-
}
5265-
52665252
/** Access request. */
52675253
export interface AccessRequest {
52685254
/** Access request ID. */
@@ -5822,7 +5808,7 @@ namespace DnsSvcsV1 {
58225808
/** Enable/Disable the secondary zone. */
58235809
enabled?: boolean;
58245810
/** The source configuration of secondary zone output. */
5825-
transfer_from?: SecondaryZoneTransferFromItem[];
5811+
transfer_from?: string[];
58265812
/** The time when a secondary zone is created. */
58275813
created_on?: string;
58285814
/** The recent time when a secondary zone is modified. */

test/integration/transit-gateway.v1.test.js

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -127,26 +127,26 @@ describe.skip('TransitGatewayApisV1', () => {
127127
expect(response.status).toBe(200);
128128
const { result } = response || {};
129129
const gateways = result.transit_gateways;
130-
130+
131131
for (let i = 0; i < gateways.length; i++) {
132132
const gtwID = gateways[i].id;
133133
const gtwName = gateways[i].name;
134-
134+
135135
if (gtwName.includes('NODE-SDK') === true) {
136136
const response = await transitGateway.listTransitGatewayConnections({
137137
transitGatewayId: gtwID,
138138
});
139139
expect(response.status).toBe(200);
140140
const { result } = response || {};
141141
const connections = result.connections;
142-
142+
143143
if (connections.length > 0) {
144144
const connIDs = [];
145145
for (let j = 0; j < connections.length; j++) {
146146
if (connections[j].status.includes('delet') === false) {
147147
const connID = connections[j].id;
148148
const connName = connections[j].name;
149-
149+
150150
// Delete GRE Connections first.
151151
if (connName.includes('GRE-NODE') === true) {
152152
const response = await transitGateway.deleteTransitGatewayConnection({
@@ -208,17 +208,17 @@ describe.skip('TransitGatewayApisV1', () => {
208208
expect(response.status).toBe(204);
209209
}
210210
}
211-
}
211+
}
212212
done();
213213
} catch (err) {
214214
done(err);
215215
}
216216
});
217217
});
218218

219-
/////////////////////////////////////////////////////////////////////////////
219+
// ///////////////////////////////////////////////////////////////////////////
220220
// Transit Locations Tests //
221-
/////////////////////////////////////////////////////////////////////////////
221+
// ///////////////////////////////////////////////////////////////////////////
222222

223223
describe('LIST Transit Locations', () => {
224224
test('successfully lists the gateway locations', async done => {
@@ -267,9 +267,9 @@ describe.skip('TransitGatewayApisV1', () => {
267267
});
268268
});
269269

270-
///////////////////////////////////////////////////////////////////////////////
270+
// /////////////////////////////////////////////////////////////////////////////
271271
// Transit Gateway Tests //
272-
///////////////////////////////////////////////////////////////////////////////
272+
// /////////////////////////////////////////////////////////////////////////////
273273

274274
describe('CREATE Transit Gateway', () => {
275275
test('should successfully create a gateway', async done => {
@@ -427,9 +427,9 @@ describe.skip('TransitGatewayApisV1', () => {
427427
});
428428
});
429429

430-
///////////////////////////////////////////////////////////////////////////////
430+
// /////////////////////////////////////////////////////////////////////////////
431431
// Transit Gateway Connections Tests //
432-
///////////////////////////////////////////////////////////////////////////////
432+
// /////////////////////////////////////////////////////////////////////////////
433433

434434
describe('CREATE Transit Gateway Connection', () => {
435435
test('successfully creates CLASSIC connection', async done => {
@@ -489,11 +489,11 @@ describe.skip('TransitGatewayApisV1', () => {
489489
PREFIX_FILTERS_DEFAULT_INSTANCE = 'permit';
490490
PREFIX_FILTERS_INSTANCE = [
491491
{
492-
"action": PREFIX_FILTERS_DEFAULT_INSTANCE,
493-
"ge": 24,
494-
"le": 32,
495-
"prefix": "192.168.100.0/24"
496-
}
492+
'action': PREFIX_FILTERS_DEFAULT_INSTANCE,
493+
'ge': 24,
494+
'le': 32,
495+
'prefix': '192.168.100.0/24',
496+
},
497497
];
498498

499499
try {
@@ -767,7 +767,7 @@ describe.skip('TransitGatewayApisV1', () => {
767767
describe('UPDATE Transit Gateway Connection', () => {
768768
test('successfully update a VPC connection name by instance id', async done => {
769769
VPC_CONN_INSTANCE_NAME = 'UPDATED-' + VPC_CONN_INSTANCE_NAME;
770-
PREFIX_FILTERS_DEFAULT_INSTANCE = "deny"
770+
PREFIX_FILTERS_DEFAULT_INSTANCE = 'deny';
771771
try {
772772
const response = await transitGateway.updateTransitGatewayConnection({
773773
transitGatewayId: GATEWAY_INSTANCE_ID,
@@ -864,7 +864,7 @@ describe.skip('TransitGatewayApisV1', () => {
864864
done();
865865
});
866866
});
867-
867+
868868
describe('LIST Gateway Connections', () => {
869869
test('should list all the connections for a gateway', async done => {
870870
try {
@@ -910,7 +910,7 @@ describe.skip('TransitGatewayApisV1', () => {
910910
test('should fail to list gateway connections', async done => {
911911
try {
912912
await transitGateway.listTransitGatewayConnections({
913-
transitGatewayId: "bad-gateway-id-123",
913+
transitGatewayId: 'bad-gateway-id-123',
914914
});
915915
} catch (err) {
916916
expect(err.status).toEqual(404);
@@ -921,10 +921,10 @@ describe.skip('TransitGatewayApisV1', () => {
921921
});
922922
});
923923

924-
///////////////////////////////////////////////////////////////////////////////
924+
// /////////////////////////////////////////////////////////////////////////////
925925
// Transit Connection Prefix-Filters Tests //
926-
///////////////////////////////////////////////////////////////////////////////
927-
926+
// /////////////////////////////////////////////////////////////////////////////
927+
928928
describe('CREATE Connection Prefix Filter', () => {
929929
test('should successfully create a prefix filter', async done => {
930930
try {
@@ -933,7 +933,7 @@ describe.skip('TransitGatewayApisV1', () => {
933933
id: VPC_CONN_INSTANCE_ID,
934934
action: 'permit',
935935
before: PREFIX_FILTERS_BEFORE_INSTANCE,
936-
prefix: "192.168.111.0/12",
936+
prefix: '192.168.111.0/12',
937937
ge: 12,
938938
le: 22,
939939
});
@@ -949,7 +949,7 @@ describe.skip('TransitGatewayApisV1', () => {
949949
PF_INSTANCE_ID = result.id;
950950

951951
done();
952-
} catch (err) {
952+
} catch (err) {
953953
done(err);
954954
}
955955
});
@@ -958,9 +958,9 @@ describe.skip('TransitGatewayApisV1', () => {
958958
try {
959959
await transitGateway.createTransitGatewayConnectionPrefixFilter({
960960
transitGatewayId: GATEWAY_INSTANCE_ID,
961-
id: "bad-conn-id-123",
961+
id: 'bad-conn-id-123',
962962
action: 'deny',
963-
prefix: "192.168.111.0/12",
963+
prefix: '192.168.111.0/12',
964964
});
965965
} catch (err) {
966966
expect(err.status).toEqual(404);
@@ -989,9 +989,9 @@ describe.skip('TransitGatewayApisV1', () => {
989989
expect(result.ge).toEqual(12);
990990
expect(result.le).toEqual(22);
991991
expect(result.action).toEqual('permit');
992-
expect(result.prefix).toEqual("192.168.111.0/12");
992+
expect(result.prefix).toEqual('192.168.111.0/12');
993993
expect(result.before).toEqual(PREFIX_FILTERS_BEFORE_INSTANCE);
994-
994+
995995
done();
996996
} catch (err) {
997997
done(err);
@@ -1022,7 +1022,7 @@ describe.skip('TransitGatewayApisV1', () => {
10221022
id: VPC_CONN_INSTANCE_ID,
10231023
filterId: PF_INSTANCE_ID,
10241024
action: 'deny',
1025-
prefix: "192.168.112.1/18",
1025+
prefix: '192.168.112.1/18',
10261026
ge: 18,
10271027
le: 24,
10281028
});
@@ -1036,8 +1036,8 @@ describe.skip('TransitGatewayApisV1', () => {
10361036
expect(result.ge).toEqual(18);
10371037
expect(result.le).toEqual(24);
10381038
expect(result.action).toEqual('deny');
1039-
expect(result.prefix).toEqual("192.168.112.1/18");
1040-
1039+
expect(result.prefix).toEqual('192.168.112.1/18');
1040+
10411041
done();
10421042
} catch (err) {
10431043
done(err);
@@ -1053,7 +1053,9 @@ describe.skip('TransitGatewayApisV1', () => {
10531053
});
10541054
} catch (err) {
10551055
expect(err.status).toEqual(400);
1056-
expect(err.message).toEqual('The information given was invalid, malformed, or missing a required field.');
1056+
expect(err.message).toEqual(
1057+
'The information given was invalid, malformed, or missing a required field.'
1058+
);
10571059
done();
10581060
}
10591061
done();
@@ -1080,20 +1082,20 @@ describe.skip('TransitGatewayApisV1', () => {
10801082
expect(prefixFilters[i].ge).toEqual(18);
10811083
expect(prefixFilters[i].le).toEqual(24);
10821084
expect(prefixFilters[i].action).toEqual('deny');
1083-
expect(prefixFilters[i].prefix).toEqual("192.168.112.1/18");
1085+
expect(prefixFilters[i].prefix).toEqual('192.168.112.1/18');
10841086
expect(prefixFilters[i].before).toEqual(PREFIX_FILTERS_BEFORE_INSTANCE);
10851087
foundPF1 = true;
10861088
} else if (prefixFilters[i].id === PREFIX_FILTERS_BEFORE_INSTANCE) {
10871089
expect(prefixFilters[i].ge).toEqual(24);
10881090
expect(prefixFilters[i].le).toEqual(32);
10891091
expect(prefixFilters[i].action).toEqual('permit');
1090-
expect(prefixFilters[i].prefix).toEqual("192.168.100.0/24");
1092+
expect(prefixFilters[i].prefix).toEqual('192.168.100.0/24');
10911093
foundPF2 = true;
1092-
}
1094+
}
10931095
}
10941096
expect(foundPF1).toEqual(true);
10951097
expect(foundPF2).toEqual(true);
1096-
1098+
10971099
done();
10981100
} catch (err) {
10991101
done(err);
@@ -1115,9 +1117,9 @@ describe.skip('TransitGatewayApisV1', () => {
11151117
});
11161118
});
11171119

1118-
///////////////////////////////////////////////////////////////////////////////
1120+
// /////////////////////////////////////////////////////////////////////////////
11191121
// Transit Gateway Route Reports Tests //
1120-
///////////////////////////////////////////////////////////////////////////////
1122+
// /////////////////////////////////////////////////////////////////////////////
11211123

11221124
describe('CREATE Gateway Route Report', () => {
11231125
test('should successfully create a route report', async done => {
@@ -1277,9 +1279,9 @@ describe.skip('TransitGatewayApisV1', () => {
12771279
});
12781280
});
12791281

1280-
///////////////////////////////////////////////////////////////////////////////
1282+
// /////////////////////////////////////////////////////////////////////////////
12811283
// DELETE Connection Prefix-Filters Test //
1282-
///////////////////////////////////////////////////////////////////////////////
1284+
// /////////////////////////////////////////////////////////////////////////////
12831285

12841286
describe('DELETE Connection Prefix Filter', () => {
12851287
test('successfully delete prefix filter by instanceID', async done => {
@@ -1333,10 +1335,10 @@ describe.skip('TransitGatewayApisV1', () => {
13331335
done();
13341336
});
13351337
});
1336-
1337-
///////////////////////////////////////////////////////////////////////////////
1338+
1339+
// /////////////////////////////////////////////////////////////////////////////
13381340
// DELETE Transit Gateway Route Report Test //
1339-
///////////////////////////////////////////////////////////////////////////////
1341+
// /////////////////////////////////////////////////////////////////////////////
13401342

13411343
describe('DELETE Gateway Route Report', () => {
13421344
test('successfully delete route report by instanceID', async done => {
@@ -1388,9 +1390,9 @@ describe.skip('TransitGatewayApisV1', () => {
13881390
});
13891391
});
13901392

1391-
///////////////////////////////////////////////////////////////////////////////
1393+
// /////////////////////////////////////////////////////////////////////////////
13921394
// DELETE Transit Gateway Connection Tests //
1393-
///////////////////////////////////////////////////////////////////////////////
1395+
// /////////////////////////////////////////////////////////////////////////////
13941396

13951397
describe('DELETE Transit Gateway Connection', () => {
13961398
test('successfully delete GRE Connection by instanceID', async done => {
@@ -1544,9 +1546,9 @@ describe.skip('TransitGatewayApisV1', () => {
15441546
});
15451547
});
15461548

1547-
///////////////////////////////////////////////////////////////////////////////
1549+
// /////////////////////////////////////////////////////////////////////////////
15481550
// DELETE Transit Gateway Tests //
1549-
///////////////////////////////////////////////////////////////////////////////
1551+
// /////////////////////////////////////////////////////////////////////////////
15501552

15511553
describe('DELETE Transit Gateway', () => {
15521554
test('successfully delete gateway by instanceID', async done => {

0 commit comments

Comments
 (0)