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.
@@ -1168,29 +1168,36 @@ class CrossConnectRouter():
1168
1168
"""
1169
1169
Cross Connect Router details.
1170
1170
1171
+ :attr List[str] capabilities: (optional) Array of capabilities for this router.
1171
1172
:attr str router_name: (optional) The name of the Router.
1172
1173
:attr int total_connections: (optional) Count of existing Direct Link Dedicated
1173
1174
gateways on this router for this account.
1174
1175
"""
1175
1176
1176
1177
def __init__ (self ,
1177
1178
* ,
1179
+ capabilities : List [str ] = None ,
1178
1180
router_name : str = None ,
1179
1181
total_connections : int = None ) -> None :
1180
1182
"""
1181
1183
Initialize a CrossConnectRouter object.
1182
1184
1185
+ :param List[str] capabilities: (optional) Array of capabilities for this
1186
+ router.
1183
1187
:param str router_name: (optional) The name of the Router.
1184
1188
:param int total_connections: (optional) Count of existing Direct Link
1185
1189
Dedicated gateways on this router for this account.
1186
1190
"""
1191
+ self .capabilities = capabilities
1187
1192
self .router_name = router_name
1188
1193
self .total_connections = total_connections
1189
1194
1190
1195
@classmethod
1191
1196
def from_dict (cls , _dict : Dict ) -> 'CrossConnectRouter' :
1192
1197
"""Initialize a CrossConnectRouter object from a json dictionary."""
1193
1198
args = {}
1199
+ if 'capabilities' in _dict :
1200
+ args ['capabilities' ] = _dict .get ('capabilities' )
1194
1201
if 'router_name' in _dict :
1195
1202
args ['router_name' ] = _dict .get ('router_name' )
1196
1203
if 'total_connections' in _dict :
@@ -1205,6 +1212,8 @@ def _from_dict(cls, _dict):
1205
1212
def to_dict (self ) -> Dict :
1206
1213
"""Return a json dictionary representing this model."""
1207
1214
_dict = {}
1215
+ if hasattr (self , 'capabilities' ) and self .capabilities is not None :
1216
+ _dict ['capabilities' ] = self .capabilities
1208
1217
if hasattr (self , 'router_name' ) and self .router_name is not None :
1209
1218
_dict ['router_name' ] = self .router_name
1210
1219
if hasattr (self , 'total_connections' ) and self .total_connections is not None :
@@ -1235,7 +1244,7 @@ class Gateway():
1235
1244
1236
1245
:attr int bgp_asn: Customer BGP ASN.
1237
1246
:attr str bgp_base_cidr: (optional) (DEPRECATED) BGP base CIDR is deprecated and
1238
- no longer recognized the Direct Link APIs.
1247
+ no longer recognized by the Direct Link APIs.
1239
1248
See bgp_cer_cidr and bgp_ibm_cidr fields instead for IP related information.
1240
1249
Deprecated field bgp_base_cidr will be removed from the API specificiation after
1241
1250
15-MAR-2021.
@@ -1343,7 +1352,7 @@ def __init__(self,
1343
1352
property may expand in the future. Code and processes using this field
1344
1353
must tolerate unexpected values.
1345
1354
:param str bgp_base_cidr: (optional) (DEPRECATED) BGP base CIDR is
1346
- deprecated and no longer recognized the Direct Link APIs.
1355
+ deprecated and no longer recognized by the Direct Link APIs.
1347
1356
See bgp_cer_cidr and bgp_ibm_cidr fields instead for IP related
1348
1357
information.
1349
1358
Deprecated field bgp_base_cidr will be removed from the API specificiation
@@ -1724,10 +1733,10 @@ class GatewayMacsecConfig():
1724
1733
association key.
1725
1734
:attr int sak_expiry_time: (optional) Secure Association Key (SAK) expiry time
1726
1735
in seconds.
1727
- :attr str security_policy: (optional) Packets without MACsec headers are not
1728
- dropped when security_policy is `should_secure `.
1736
+ :attr str security_policy: (optional) Packets without MACsec headers are dropped
1737
+ when security_policy is `must_secure `.
1729
1738
:attr str status: Current status of MACsec on this gateway.
1730
- Status 'unknown ' is returned during gateway creation and deletion.
1739
+ Status 'offline ' is returned during gateway creation and deletion.
1731
1740
:attr int window_size: (optional) replay protection window size.
1732
1741
"""
1733
1742
@@ -1754,7 +1763,7 @@ def __init__(self,
1754
1763
:param GatewayMacsecConfigPrimaryCak primary_cak: desired primary
1755
1764
connectivity association key.
1756
1765
:param str status: Current status of MACsec on this gateway.
1757
- Status 'unknown ' is returned during gateway creation and deletion.
1766
+ Status 'offline ' is returned during gateway creation and deletion.
1758
1767
:param GatewayMacsecConfigActiveCak active_cak: (optional) Active
1759
1768
connectivity association key.
1760
1769
During normal operation `active_cak` will match the desired `primary_cak`.
@@ -1769,7 +1778,7 @@ def __init__(self,
1769
1778
:param int sak_expiry_time: (optional) Secure Association Key (SAK) expiry
1770
1779
time in seconds.
1771
1780
:param str security_policy: (optional) Packets without MACsec headers are
1772
- not dropped when security_policy is `should_secure `.
1781
+ dropped when security_policy is `must_secure `.
1773
1782
:param int window_size: (optional) replay protection window size.
1774
1783
"""
1775
1784
self .active = active
@@ -1889,21 +1898,20 @@ class CryptographicAlgorithmEnum(Enum):
1889
1898
1890
1899
class SecurityPolicyEnum (Enum ):
1891
1900
"""
1892
- Packets without MACsec headers are not dropped when security_policy is
1893
- `should_secure`.
1901
+ Packets without MACsec headers are dropped when security_policy is `must_secure`.
1894
1902
"""
1895
- SHOULD_SECURE = "should_secure "
1903
+ MUST_SECURE = "must_secure "
1896
1904
1897
1905
1898
1906
class StatusEnum (Enum ):
1899
1907
"""
1900
1908
Current status of MACsec on this gateway.
1901
- Status 'unknown ' is returned during gateway creation and deletion.
1909
+ Status 'offline ' is returned during gateway creation and deletion.
1902
1910
"""
1903
1911
INIT = "init"
1904
1912
PENDING = "pending"
1913
+ OFFLINE = "offline"
1905
1914
SECURED = "secured"
1906
- UNKNOWN = "unknown"
1907
1915
1908
1916
1909
1917
class GatewayMacsecConfigActiveCak ():
@@ -3424,31 +3432,39 @@ class OfferingSpeed():
3424
3432
"""
3425
3433
Speed.
3426
3434
3435
+ :attr List[str] capabilities: Array of capabilities for billing option.
3427
3436
:attr int link_speed: Link speed in megabits per second.
3428
3437
:attr bool macsec_enabled: (optional) Indicate whether speed supports MACsec.
3429
3438
Only returned for gateway type=dedicated speeds. Contact IBM support for access
3430
3439
to MACsec.
3431
3440
"""
3432
3441
3433
3442
def __init__ (self ,
3443
+ capabilities : List [str ],
3434
3444
link_speed : int ,
3435
3445
* ,
3436
3446
macsec_enabled : bool = None ) -> None :
3437
3447
"""
3438
3448
Initialize a OfferingSpeed object.
3439
3449
3450
+ :param List[str] capabilities: Array of capabilities for billing option.
3440
3451
:param int link_speed: Link speed in megabits per second.
3441
3452
:param bool macsec_enabled: (optional) Indicate whether speed supports
3442
3453
MACsec. Only returned for gateway type=dedicated speeds. Contact IBM
3443
3454
support for access to MACsec.
3444
3455
"""
3456
+ self .capabilities = capabilities
3445
3457
self .link_speed = link_speed
3446
3458
self .macsec_enabled = macsec_enabled
3447
3459
3448
3460
@classmethod
3449
3461
def from_dict (cls , _dict : Dict ) -> 'OfferingSpeed' :
3450
3462
"""Initialize a OfferingSpeed object from a json dictionary."""
3451
3463
args = {}
3464
+ if 'capabilities' in _dict :
3465
+ args ['capabilities' ] = _dict .get ('capabilities' )
3466
+ else :
3467
+ raise ValueError ('Required property \' capabilities\' not present in OfferingSpeed JSON' )
3452
3468
if 'link_speed' in _dict :
3453
3469
args ['link_speed' ] = _dict .get ('link_speed' )
3454
3470
else :
@@ -3465,6 +3481,8 @@ def _from_dict(cls, _dict):
3465
3481
def to_dict (self ) -> Dict :
3466
3482
"""Return a json dictionary representing this model."""
3467
3483
_dict = {}
3484
+ if hasattr (self , 'capabilities' ) and self .capabilities is not None :
3485
+ _dict ['capabilities' ] = self .capabilities
3468
3486
if hasattr (self , 'link_speed' ) and self .link_speed is not None :
3469
3487
_dict ['link_speed' ] = self .link_speed
3470
3488
if hasattr (self , 'macsec_enabled' ) and self .macsec_enabled is not None :
0 commit comments