Skip to content

Commit ff759ea

Browse files
Merge pull request #51 from IBM/dlaas
feat(DirectLink): implement the DLaaS changes for Direct link gateway
2 parents 4a3bed9 + 6649171 commit ff759ea

29 files changed

+466
-39
lines changed

direct-link/v1.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ class DirectLinkV1 extends BaseService {
288288
* The key material that you provide must be base64 encoded and original string must be maximum 126 ASCII characters
289289
* in length.
290290
* To clear the optional `authentication_key` field patch its crn to `""`.
291+
* @param {string} [params.connectionMode] - Type of services this Gateway is attached to. Mode transit means this
292+
* Gateway will be attached to Transit Gateway Service and direct means this Gateway will be attached to vpc or
293+
* classic connection. The list of enumerated values for this property may expand in the future. Code and processes
294+
* using this field must tolerate unexpected values.
291295
* @param {boolean} [params.global] - Gateways with global routing (`true`) can connect to networks outside of their
292296
* associated region.
293297
* @param {string} [params.loaRejectReason] - Use this field during LOA rejection to provide the reason for the
@@ -324,6 +328,7 @@ class DirectLinkV1 extends BaseService {
324328

325329
const body = {
326330
'authentication_key': _params.authenticationKey,
331+
'connection_mode': _params.connectionMode,
327332
'global': _params.global,
328333
'loa_reject_reason': _params.loaRejectReason,
329334
'macsec_config': _params.macsecConfig,
@@ -379,6 +384,10 @@ class DirectLinkV1 extends BaseService {
379384
* The key material that you provide must be base64 encoded and original string must be maximum 126 ASCII characters
380385
* in length.
381386
* To clear the optional `authentication_key` field patch its crn to `""`.
387+
* @param {string} [params.connectionMode] - Type of services this Gateway is attached to. Mode transit means this
388+
* Gateway will be attached to Transit Gateway Service and direct means this Gateway will be attached to vpc or
389+
* classic connection. The list of enumerated values for this property may expand in the future. Code and processes
390+
* using this field must tolerate unexpected values.
382391
* @param {boolean} [params.global] - Required for create_gateway_approve requests to select the gateway's routing
383392
* option. Gateways with global routing (`true`) can connect to networks outside of their associated region.
384393
* @param {boolean} [params.metered] - Required for create_gateway_approve requests to select the gateway's metered
@@ -406,6 +415,7 @@ class DirectLinkV1 extends BaseService {
406415
const body = {
407416
'action': _params.action,
408417
'authentication_key': _params.authenticationKey,
418+
'connection_mode': _params.connectionMode,
409419
'global': _params.global,
410420
'metered': _params.metered,
411421
'resource_group': _params.resourceGroup,
@@ -1250,6 +1260,12 @@ namespace DirectLinkV1 {
12501260
* To clear the optional `authentication_key` field patch its crn to `""`.
12511261
*/
12521262
authenticationKey?: GatewayPatchTemplateAuthenticationKey;
1263+
/** Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit
1264+
* Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of
1265+
* enumerated values for this property may expand in the future. Code and processes using this field must tolerate
1266+
* unexpected values.
1267+
*/
1268+
connectionMode?: UpdateGatewayConstants.ConnectionMode | string;
12531269
/** Gateways with global routing (`true`) can connect to networks outside of their associated region. */
12541270
global?: boolean;
12551271
/** Use this field during LOA rejection to provide the reason for the rejection.
@@ -1284,6 +1300,11 @@ namespace DirectLinkV1 {
12841300

12851301
/** Constants for the `updateGateway` operation. */
12861302
export namespace UpdateGatewayConstants {
1303+
/** Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */
1304+
export enum ConnectionMode {
1305+
DIRECT = 'direct',
1306+
TRANSIT = 'transit',
1307+
}
12871308
/** Gateway operational status. For gateways pending LOA approval, patch operational_status to the appropriate value to approve or reject its LOA. When rejecting an LOA, provide reject reasoning in `loa_reject_reason`. Only allowed for type=dedicated gateways. */
12881309
export enum OperationalStatus {
12891310
LOA_ACCEPTED = 'loa_accepted',
@@ -1303,6 +1324,12 @@ namespace DirectLinkV1 {
13031324
* To clear the optional `authentication_key` field patch its crn to `""`.
13041325
*/
13051326
authenticationKey?: GatewayActionTemplateAuthenticationKey;
1327+
/** Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit
1328+
* Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of
1329+
* enumerated values for this property may expand in the future. Code and processes using this field must tolerate
1330+
* unexpected values.
1331+
*/
1332+
connectionMode?: CreateGatewayActionConstants.ConnectionMode | string;
13061333
/** Required for create_gateway_approve requests to select the gateway's routing option. Gateways with global
13071334
* routing (`true`) can connect to networks outside of their associated region.
13081335
*/
@@ -1335,6 +1362,11 @@ namespace DirectLinkV1 {
13351362
UPDATE_ATTRIBUTES_APPROVE = 'update_attributes_approve',
13361363
UPDATE_ATTRIBUTES_REJECT = 'update_attributes_reject',
13371364
}
1365+
/** Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */
1366+
export enum ConnectionMode {
1367+
DIRECT = 'direct',
1368+
TRANSIT = 'transit',
1369+
}
13381370
}
13391371

13401372
/** Parameters for the `listGatewayCompletionNotice` operation. */
@@ -1552,7 +1584,7 @@ namespace DirectLinkV1 {
15521584
/** (DEPRECATED) BGP base CIDR is deprecated and no longer recognized by the Direct Link APIs.
15531585
*
15541586
* See bgp_cer_cidr and bgp_ibm_cidr fields instead for IP related information.
1555-
*
1587+
*
15561588
* Deprecated field bgp_base_cidr will be removed from the API specificiation after 15-MAR-2021.
15571589
*/
15581590
bgp_base_cidr?: string;
@@ -1574,6 +1606,12 @@ namespace DirectLinkV1 {
15741606
* notice.
15751607
*/
15761608
completion_notice_reject_reason?: string;
1609+
/** Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit
1610+
* Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of
1611+
* enumerated values for this property may expand in the future. Code and processes using this field must tolerate
1612+
* unexpected values.
1613+
*/
1614+
connection_mode?: string;
15771615
/** The date and time resource was created. */
15781616
created_at: string;
15791617
/** The CRN (Cloud Resource Name) of this gateway. */
@@ -1867,6 +1905,12 @@ namespace DirectLinkV1 {
18671905
* bgp_ibm_cidr must have matching network and subnet mask values.
18681906
*/
18691907
bgp_ibm_cidr?: string;
1908+
/** Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit
1909+
* Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of
1910+
* enumerated values for this property may expand in the future. Code and processes using this field must tolerate
1911+
* unexpected values.
1912+
*/
1913+
connection_mode?: string;
18701914
/** Gateways with global routing (`true`) can connect to networks outside their associated region. */
18711915
global: boolean;
18721916
/** Metered billing option. When `true` gateway usage is billed per gigabyte. When `false` there is no per

test/integration/cis/caching-api.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let browserCacheTtl;
3838
let developmentMode;
3939
let sortQueryStrForCache;
4040

41-
describe('DNSRecordsApisV1', () => {
41+
describe.skip('DNSRecordsApisV1', () => {
4242
jest.setTimeout(timeout);
4343

4444
// Initialize the service client.

test/integration/cis/cis-ip-api.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const describe = authHelper.prepareTests(configFile);
3232
// config properties, rather than let the SDK do it for us.
3333
const config = authHelper.loadConfig();
3434

35-
describe('CisIpApiV1', () => {
35+
describe.skip('CisIpApiV1', () => {
3636
jest.setTimeout(timeout);
3737

3838
// Initialize the service client.

test/integration/cis/custom-pages.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let customPagesV1;
3636
let customPage;
3737
let customPage1;
3838

39-
describe('CustomPagesV1', () => {
39+
describe.skip('CustomPagesV1', () => {
4040
jest.setTimeout(timeout);
4141

4242
// Initialize the service client.

test/integration/cis/dns-records-bulk.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const describe = authHelper.prepareTests(configFile);
3333
// config properties, rather than let the SDK do it for us.
3434
const config = authHelper.loadConfig();
3535

36-
describe('DNSRecordsApisV1', () => {
36+
describe.skip('DNSRecordsApisV1', () => {
3737
jest.setTimeout(timeout);
3838

3939
// Initialize the service client.

test/integration/cis/dns-records.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const config = authHelper.loadConfig();
3434

3535
let DNS_RECORD_ID;
3636

37-
describe('DNSRecordsApisV1', () => {
37+
describe.skip('DNSRecordsApisV1', () => {
3838
jest.setTimeout(timeout);
3939

4040
// Initialize the service client.

test/integration/cis/edge-functions-api.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let edgeFunctionsApiV1;
3838
let edgeFunctionAction;
3939
let edgeFunctionTrigger;
4040

41-
describe('EdgeFunctionsApiV1', () => {
41+
describe.skip('EdgeFunctionsApiV1', () => {
4242
jest.setTimeout(timeout);
4343

4444
// Initialize the service client.

test/integration/cis/firewall-access-rules.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const config = authHelper.loadConfig();
3535
let firewallAccessRulesV1;
3636
let firewallAccessRule;
3737

38-
describe('FirewallAccessRulesV1', () => {
38+
describe.skip('FirewallAccessRulesV1', () => {
3939
jest.setTimeout(timeout);
4040

4141
// Initialize the service client.

test/integration/cis/firewall-api.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const config = authHelper.loadConfig();
3535
let firewallApiV1;
3636
let currentSecurityLevel;
3737

38-
describe('FirewallApiV1', () => {
38+
describe.skip('FirewallApiV1', () => {
3939
jest.setTimeout(timeout);
4040

4141
// Initialize the service client.

test/integration/cis/firewall-event-analytics-api.v1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const describe = authHelper.prepareTests(configFile);
3333
// config properties, rather than let the SDK do it for us.
3434
const config = authHelper.loadConfig();
3535

36-
describe('FirewallEventAnalyticsAPIV1', () => {
36+
describe.skip('FirewallEventAnalyticsAPIV1', () => {
3737
jest.setTimeout(timeout);
3838

3939
// Initialize the service client.

0 commit comments

Comments
 (0)