Skip to content

Commit daa4105

Browse files
feat(DirectLink): add the changes to updated BGP parameters - IP and ASN, Also enable/edit the BFD parameters
1 parent a647f93 commit daa4105

File tree

6 files changed

+1271
-31
lines changed

6 files changed

+1271
-31
lines changed

direct-link-provider/v2.ts

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -328,6 +328,20 @@ class DirectLinkProviderV2 extends BaseService {
328328
*
329329
* @param {Object} params - The parameters to send to the service.
330330
* @param {string} params.id - Direct Link Connect gateway identifier.
331+
* @param {number} [params.bgpAsn] - The autonomous system number (ASN) of Border Gateway Protocol (BGP) configuration
332+
* for the IBM side of the DL 2.0 gateway.
333+
* @param {string} [params.bgpCerCidr] - BGP customer edge router CIDR is the new CIDR (Classless Inter-Domain
334+
* Routing) value to be updated on customer edge router for the DL 2.0 gateway. Customer edge IP and IBM IP should be
335+
* in the same network. Updating customer edge router CIDR should be accompanied with IBM CIDR in the request. Update
336+
* customer edge router IP to a valid bgp_cer_cidr and bgp_ibm_cidr CIDR, the value must reside in one of
337+
* "10.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr and
338+
* bgp_ibm_cidr must have matching network and subnet mask values.
339+
* @param {string} [params.bgpIbmCidr] - BGP IBM CIDR is the new CIDR (Classless Inter-Domain Routing) value to be
340+
* updated on IBM edge router for the DL 2.0 gateway. IBM IP and customer edge IP should be in the same network.
341+
* Updating IBM CIDR should be accompanied with customer edge router CIDR in the request. Update IBM CIDR to a valid
342+
* bgp_cer_cidr and bgp_ibm_cidr CIDR, the value must reside in one of "10.254.0.0/16", "172.16.0.0/12",
343+
* "192.168.0.0/16", "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr and bgp_ibm_cidr must have matching
344+
* network and subnet mask values.
331345
* @param {string} [params.name] - The unique user-defined name for this gateway.
332346
* @param {number} [params.speedMbps] - Gateway speed in megabits per second.
333347
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -344,6 +358,9 @@ class DirectLinkProviderV2 extends BaseService {
344358
}
345359

346360
const body = {
361+
'bgp_asn': _params.bgpAsn,
362+
'bgp_cer_cidr': _params.bgpCerCidr,
363+
'bgp_ibm_cidr': _params.bgpIbmCidr,
347364
'name': _params.name,
348365
'speed_mbps': _params.speedMbps
349366
};
@@ -576,6 +593,26 @@ namespace DirectLinkProviderV2 {
576593
export interface UpdateProviderGatewayParams {
577594
/** Direct Link Connect gateway identifier. */
578595
id: string;
596+
/** The autonomous system number (ASN) of Border Gateway Protocol (BGP) configuration for the IBM side of the DL
597+
* 2.0 gateway.
598+
*/
599+
bgpAsn?: number;
600+
/** BGP customer edge router CIDR is the new CIDR (Classless Inter-Domain Routing) value to be updated on
601+
* customer edge router for the DL 2.0 gateway. Customer edge IP and IBM IP should be in the same network. Updating
602+
* customer edge router CIDR should be accompanied with IBM CIDR in the request. Update customer edge router IP to
603+
* a valid bgp_cer_cidr and bgp_ibm_cidr CIDR, the value must reside in one of "10.254.0.0/16", "172.16.0.0/12",
604+
* "192.168.0.0/16", "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr and bgp_ibm_cidr must have matching
605+
* network and subnet mask values.
606+
*/
607+
bgpCerCidr?: string;
608+
/** BGP IBM CIDR is the new CIDR (Classless Inter-Domain Routing) value to be updated on IBM edge router for the
609+
* DL 2.0 gateway. IBM IP and customer edge IP should be in the same network. Updating IBM CIDR should be
610+
* accompanied with customer edge router CIDR in the request. Update IBM CIDR to a valid bgp_cer_cidr and
611+
* bgp_ibm_cidr CIDR, the value must reside in one of "10.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16",
612+
* "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr and bgp_ibm_cidr must have matching network and subnet
613+
* mask values.
614+
*/
615+
bgpIbmCidr?: string;
579616
/** The unique user-defined name for this gateway. */
580617
name?: string;
581618
/** Gateway speed in megabits per second. */

0 commit comments

Comments
 (0)