1
1
# coding: utf-8
2
2
3
- # (C) Copyright IBM Corp. 2020 .
3
+ # (C) Copyright IBM Corp. 2021 .
4
4
#
5
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
6
# you may not use this file except in compliance with the License.
@@ -324,6 +324,9 @@ def get_provider_gateway(self,
324
324
def update_provider_gateway (self ,
325
325
id : str ,
326
326
* ,
327
+ bgp_asn : int = None ,
328
+ bgp_cer_cidr : str = None ,
329
+ bgp_ibm_cidr : str = None ,
327
330
name : str = None ,
328
331
speed_mbps : int = None ,
329
332
** kwargs
@@ -336,6 +339,26 @@ def update_provider_gateway(self,
336
339
change_request and require approval from the client.
337
340
338
341
:param str id: Direct Link Connect gateway identifier.
342
+ :param int bgp_asn: (optional) The autonomous system number (ASN) of Border
343
+ Gateway Protocol (BGP) configuration for the IBM side of the DL 2.0
344
+ gateway.
345
+ :param str bgp_cer_cidr: (optional) BGP customer edge router CIDR is the
346
+ new CIDR (Classless Inter-Domain Routing) value to be updated on customer
347
+ edge router for the DL 2.0 gateway. Customer edge IP and IBM IP should be
348
+ in the same network. Updating customer edge router CIDR should be
349
+ accompanied with IBM CIDR in the request. Update customer edge router IP to
350
+ a valid bgp_cer_cidr and bgp_ibm_cidr CIDR, the value must reside in one of
351
+ "10.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16" or an
352
+ owned public CIDR. bgp_cer_cidr and bgp_ibm_cidr must have matching
353
+ network and subnet mask values.
354
+ :param str bgp_ibm_cidr: (optional) BGP IBM CIDR is the new CIDR (Classless
355
+ Inter-Domain Routing) value to be updated on IBM edge router for the DL 2.0
356
+ gateway. IBM IP and customer edge IP should be in the same network.
357
+ Updating IBM CIDR should be accompanied with customer edge router CIDR in
358
+ the request. Update IBM CIDR to a valid bgp_cer_cidr and bgp_ibm_cidr CIDR,
359
+ the value must reside in one of "10.254.0.0/16", "172.16.0.0/12",
360
+ "192.168.0.0/16", "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr
361
+ and bgp_ibm_cidr must have matching network and subnet mask values.
339
362
:param str name: (optional) The unique user-defined name for this gateway.
340
363
:param int speed_mbps: (optional) Gateway speed in megabits per second.
341
364
:param dict headers: A `dict` containing the request headers
@@ -356,6 +379,9 @@ def update_provider_gateway(self,
356
379
}
357
380
358
381
data = {
382
+ 'bgp_asn' : bgp_asn ,
383
+ 'bgp_cer_cidr' : bgp_cer_cidr ,
384
+ 'bgp_ibm_cidr' : bgp_ibm_cidr ,
359
385
'name' : name ,
360
386
'speed_mbps' : speed_mbps
361
387
}
@@ -481,7 +507,7 @@ class ProviderGateway():
481
507
:attr str bgp_ibm_cidr: (optional) BGP IBM CIDR.
482
508
:attr str bgp_status: (optional) Gateway BGP status.
483
509
The list of enumerated values for this property may expand in the future. Code
484
- and processes using this field must tolerate unexpected values.
510
+ and processes using this field must tolerate unexpected values.
485
511
:attr ProviderGatewayChangeRequest change_request: (optional)
486
512
:attr datetime created_at: The date and time resource was created.
487
513
:attr str crn: (optional) The CRN (Cloud Resource Name) of this gateway.
@@ -490,7 +516,7 @@ class ProviderGateway():
490
516
:attr str name: The unique user-defined name for this gateway.
491
517
:attr str operational_status: Gateway operational status.
492
518
The list of enumerated values for this property may expand in the future. Code
493
- and processes using this field must tolerate unexpected values.
519
+ and processes using this field must tolerate unexpected values.
494
520
:attr ProviderGatewayPortReference port: Port identifier for the gateway.
495
521
:attr bool provider_api_managed: Set to `true` for gateways created through the
496
522
Direct Link Provider APIs.
@@ -534,7 +560,7 @@ def __init__(self,
534
560
:param str name: The unique user-defined name for this gateway.
535
561
:param str operational_status: Gateway operational status.
536
562
The list of enumerated values for this property may expand in the future.
537
- Code and processes using this field must tolerate unexpected values.
563
+ Code and processes using this field must tolerate unexpected values.
538
564
:param ProviderGatewayPortReference port: Port identifier for the gateway.
539
565
:param bool provider_api_managed: Set to `true` for gateways created
540
566
through the Direct Link Provider APIs.
@@ -546,7 +572,7 @@ def __init__(self,
546
572
:param str bgp_ibm_cidr: (optional) BGP IBM CIDR.
547
573
:param str bgp_status: (optional) Gateway BGP status.
548
574
The list of enumerated values for this property may expand in the future.
549
- Code and processes using this field must tolerate unexpected values.
575
+ Code and processes using this field must tolerate unexpected values.
550
576
:param ProviderGatewayChangeRequest change_request: (optional)
551
577
:param str crn: (optional) The CRN (Cloud Resource Name) of this gateway.
552
578
:param int vlan: (optional) VLAN allocated for this gateway.
@@ -697,7 +723,7 @@ class BgpStatusEnum(Enum):
697
723
"""
698
724
Gateway BGP status.
699
725
The list of enumerated values for this property may expand in the future. Code and
700
- processes using this field must tolerate unexpected values.
726
+ processes using this field must tolerate unexpected values.
701
727
"""
702
728
ACTIVE = "active"
703
729
CONNECT = "connect"
@@ -709,8 +735,9 @@ class OperationalStatusEnum(Enum):
709
735
"""
710
736
Gateway operational status.
711
737
The list of enumerated values for this property may expand in the future. Code and
712
- processes using this field must tolerate unexpected values.
738
+ processes using this field must tolerate unexpected values.
713
739
"""
740
+ CONFIGURING = "configuring"
714
741
CREATE_PENDING = "create_pending"
715
742
CREATE_REJECTED = "create_rejected"
716
743
DELETE_PENDING = "delete_pending"
0 commit comments