Skip to content

Commit c513172

Browse files
Merge pull request #56 from IBM/bgp-bfd
feat(DirectLink): add the changes to updated BGP parameters - IP and ASN, Also enable/edit the BFD parameters
2 parents a647f93 + 2ada138 commit c513172

File tree

8 files changed

+1277
-38
lines changed

8 files changed

+1277
-38
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ language: node_js
22

33
sudo: false
44

5+
node_js:
6+
- 12
7+
- 14
8+
59
before_install:
10+
- echo -e "machine github.ibm.com\n login $GH_TOKEN" > ~/.netrc
611
- '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $encrypted_3d8a3eb98382_key -iv $encrypted_3d8a3eb98382_iv -in transit.env.enc -out transit.env -d || true'
712
- '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $encrypted_6de0fb2f002f_key -iv $encrypted_6de0fb2f002f_iv -in directlink.env.enc -out directlink.env -d || true'
813
- '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $encrypted_fc092b9428d6_key -iv $encrypted_fc092b9428d6_iv -in cis.env.enc -out cis.env -d || true'
914
- '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $encrypted_89a9eb4f9417_key -iv $encrypted_89a9eb4f9417_iv -in dns.env.enc -out dns.env -d || true'
1015

11-
jobs:
12-
include:
13-
- stage: Node JS 12
14-
node_js: 12
15-
1616
script:
1717
- npm run build
1818
- npm run test-travis || travis_terminate 1
@@ -24,7 +24,6 @@ after_success:
2424
- npm run report-coverage
2525
# - scripts/jsdoc/publish.sh - currently in progress
2626

27-
# To enable semantic-release, uncomment this section.
2827
deploy:
2928
- provider: script
3029
skip_cleanup: true

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)