@@ -7283,6 +7283,10 @@ class RouteReport():
7283
7283
"""
7284
7284
route report.
7285
7285
7286
+ :attr List[RouteReportAdvertisedRoute] advertised_routes: (optional) Array of
7287
+ connection prefixes advertised to the on-prem network. This parameter is not
7288
+ returned when the route report was generated prior to inclusion of this
7289
+ parameter.
7286
7290
:attr datetime created_at: Date and time route report was requested.
7287
7291
:attr List[RouteReportRoute] gateway_routes: Array of local/direct routes.
7288
7292
:attr str id: Report identifier.
@@ -7307,6 +7311,7 @@ def __init__(self,
7307
7311
status : str ,
7308
7312
virtual_connection_routes : List ['RouteReportConnection' ],
7309
7313
* ,
7314
+ advertised_routes : List ['RouteReportAdvertisedRoute' ] = None ,
7310
7315
updated_at : datetime = None ) -> None :
7311
7316
"""
7312
7317
Initialize a RouteReport object.
@@ -7323,9 +7328,14 @@ def __init__(self,
7323
7328
must tolerate unexpected values.
7324
7329
:param List[RouteReportConnection] virtual_connection_routes: Array of
7325
7330
routes on virtual connections.
7331
+ :param List[RouteReportAdvertisedRoute] advertised_routes: (optional) Array
7332
+ of connection prefixes advertised to the on-prem network. This parameter is
7333
+ not returned when the route report was generated prior to inclusion of this
7334
+ parameter.
7326
7335
:param datetime updated_at: (optional) Date and time route report was last
7327
7336
modified.
7328
7337
"""
7338
+ self .advertised_routes = advertised_routes
7329
7339
self .created_at = created_at
7330
7340
self .gateway_routes = gateway_routes
7331
7341
self .id = id
@@ -7339,6 +7349,8 @@ def __init__(self,
7339
7349
def from_dict (cls , _dict : Dict ) -> 'RouteReport' :
7340
7350
"""Initialize a RouteReport object from a json dictionary."""
7341
7351
args = {}
7352
+ if 'advertised_routes' in _dict :
7353
+ args ['advertised_routes' ] = [RouteReportAdvertisedRoute .from_dict (v ) for v in _dict .get ('advertised_routes' )]
7342
7354
if 'created_at' in _dict :
7343
7355
args ['created_at' ] = string_to_datetime (_dict .get ('created_at' ))
7344
7356
else :
@@ -7379,6 +7391,14 @@ def _from_dict(cls, _dict):
7379
7391
def to_dict (self ) -> Dict :
7380
7392
"""Return a json dictionary representing this model."""
7381
7393
_dict = {}
7394
+ if hasattr (self , 'advertised_routes' ) and self .advertised_routes is not None :
7395
+ advertised_routes_list = []
7396
+ for v in self .advertised_routes :
7397
+ if isinstance (v , dict ):
7398
+ advertised_routes_list .append (v )
7399
+ else :
7400
+ advertised_routes_list .append (v .to_dict ())
7401
+ _dict ['advertised_routes' ] = advertised_routes_list
7382
7402
if hasattr (self , 'created_at' ) and self .created_at is not None :
7383
7403
_dict ['created_at' ] = datetime_to_string (self .created_at )
7384
7404
if hasattr (self , 'gateway_routes' ) and self .gateway_routes is not None :
@@ -7448,6 +7468,72 @@ class StatusEnum(str, Enum):
7448
7468
PENDING = 'pending'
7449
7469
7450
7470
7471
+ class RouteReportAdvertisedRoute ():
7472
+ """
7473
+ Route advertised to the on-prem network.
7474
+
7475
+ :attr str as_path: The BGP AS path of the route.
7476
+ :attr str prefix: prefix.
7477
+ """
7478
+
7479
+ def __init__ (self ,
7480
+ as_path : str ,
7481
+ prefix : str ) -> None :
7482
+ """
7483
+ Initialize a RouteReportAdvertisedRoute object.
7484
+
7485
+ :param str as_path: The BGP AS path of the route.
7486
+ :param str prefix: prefix.
7487
+ """
7488
+ self .as_path = as_path
7489
+ self .prefix = prefix
7490
+
7491
+ @classmethod
7492
+ def from_dict (cls , _dict : Dict ) -> 'RouteReportAdvertisedRoute' :
7493
+ """Initialize a RouteReportAdvertisedRoute object from a json dictionary."""
7494
+ args = {}
7495
+ if 'as_path' in _dict :
7496
+ args ['as_path' ] = _dict .get ('as_path' )
7497
+ else :
7498
+ raise ValueError ('Required property \' as_path\' not present in RouteReportAdvertisedRoute JSON' )
7499
+ if 'prefix' in _dict :
7500
+ args ['prefix' ] = _dict .get ('prefix' )
7501
+ else :
7502
+ raise ValueError ('Required property \' prefix\' not present in RouteReportAdvertisedRoute JSON' )
7503
+ return cls (** args )
7504
+
7505
+ @classmethod
7506
+ def _from_dict (cls , _dict ):
7507
+ """Initialize a RouteReportAdvertisedRoute object from a json dictionary."""
7508
+ return cls .from_dict (_dict )
7509
+
7510
+ def to_dict (self ) -> Dict :
7511
+ """Return a json dictionary representing this model."""
7512
+ _dict = {}
7513
+ if hasattr (self , 'as_path' ) and self .as_path is not None :
7514
+ _dict ['as_path' ] = self .as_path
7515
+ if hasattr (self , 'prefix' ) and self .prefix is not None :
7516
+ _dict ['prefix' ] = self .prefix
7517
+ return _dict
7518
+
7519
+ def _to_dict (self ):
7520
+ """Return a json dictionary representing this model."""
7521
+ return self .to_dict ()
7522
+
7523
+ def __str__ (self ) -> str :
7524
+ """Return a `str` version of this RouteReportAdvertisedRoute object."""
7525
+ return json .dumps (self .to_dict (), indent = 2 )
7526
+
7527
+ def __eq__ (self , other : 'RouteReportAdvertisedRoute' ) -> bool :
7528
+ """Return `true` when self and other are equal, false otherwise."""
7529
+ if not isinstance (other , self .__class__ ):
7530
+ return False
7531
+ return self .__dict__ == other .__dict__
7532
+
7533
+ def __ne__ (self , other : 'RouteReportAdvertisedRoute' ) -> bool :
7534
+ """Return `true` when self and other are not equal, false otherwise."""
7535
+ return not self == other
7536
+
7451
7537
class RouteReportCollection ():
7452
7538
"""
7453
7539
route reports.
@@ -7514,22 +7600,24 @@ class RouteReportConnection():
7514
7600
"""
7515
7601
Routes of a virtual connection.
7516
7602
7517
- :attr List[RouteReportRoute] routes: Array of virtual connection's routes.
7603
+ :attr List[RouteReportVirtualConnectionRoute] routes: Array of virtual
7604
+ connection's routes.
7518
7605
:attr str virtual_connection_id: (optional) ID of virtual connection.
7519
7606
:attr str virtual_connection_name: (optional) name of virtual connection.
7520
7607
:attr str virtual_connection_type: (optional) type of virtual connection.
7521
7608
"""
7522
7609
7523
7610
def __init__ (self ,
7524
- routes : List ['RouteReportRoute ' ],
7611
+ routes : List ['RouteReportVirtualConnectionRoute ' ],
7525
7612
* ,
7526
7613
virtual_connection_id : str = None ,
7527
7614
virtual_connection_name : str = None ,
7528
7615
virtual_connection_type : str = None ) -> None :
7529
7616
"""
7530
7617
Initialize a RouteReportConnection object.
7531
7618
7532
- :param List[RouteReportRoute] routes: Array of virtual connection's routes.
7619
+ :param List[RouteReportVirtualConnectionRoute] routes: Array of virtual
7620
+ connection's routes.
7533
7621
:param str virtual_connection_id: (optional) ID of virtual connection.
7534
7622
:param str virtual_connection_name: (optional) name of virtual connection.
7535
7623
:param str virtual_connection_type: (optional) type of virtual connection.
@@ -7544,7 +7632,7 @@ def from_dict(cls, _dict: Dict) -> 'RouteReportConnection':
7544
7632
"""Initialize a RouteReportConnection object from a json dictionary."""
7545
7633
args = {}
7546
7634
if 'routes' in _dict :
7547
- args ['routes' ] = [RouteReportRoute .from_dict (v ) for v in _dict .get ('routes' )]
7635
+ args ['routes' ] = [RouteReportVirtualConnectionRoute .from_dict (v ) for v in _dict .get ('routes' )]
7548
7636
else :
7549
7637
raise ValueError ('Required property \' routes\' not present in RouteReportConnection JSON' )
7550
7638
if 'virtual_connection_id' in _dict :
@@ -7601,27 +7689,33 @@ class RouteReportOnPremRoute():
7601
7689
"""
7602
7690
on-prem route.
7603
7691
7692
+ :attr str as_path: (optional) The BGP AS path of the route.
7604
7693
:attr str next_hop: (optional) Next hop address.
7605
7694
:attr str prefix: (optional) prefix.
7606
7695
"""
7607
7696
7608
7697
def __init__ (self ,
7609
7698
* ,
7699
+ as_path : str = None ,
7610
7700
next_hop : str = None ,
7611
7701
prefix : str = None ) -> None :
7612
7702
"""
7613
7703
Initialize a RouteReportOnPremRoute object.
7614
7704
7705
+ :param str as_path: (optional) The BGP AS path of the route.
7615
7706
:param str next_hop: (optional) Next hop address.
7616
7707
:param str prefix: (optional) prefix.
7617
7708
"""
7709
+ self .as_path = as_path
7618
7710
self .next_hop = next_hop
7619
7711
self .prefix = prefix
7620
7712
7621
7713
@classmethod
7622
7714
def from_dict (cls , _dict : Dict ) -> 'RouteReportOnPremRoute' :
7623
7715
"""Initialize a RouteReportOnPremRoute object from a json dictionary."""
7624
7716
args = {}
7717
+ if 'as_path' in _dict :
7718
+ args ['as_path' ] = _dict .get ('as_path' )
7625
7719
if 'next_hop' in _dict :
7626
7720
args ['next_hop' ] = _dict .get ('next_hop' )
7627
7721
if 'prefix' in _dict :
@@ -7636,6 +7730,8 @@ def _from_dict(cls, _dict):
7636
7730
def to_dict (self ) -> Dict :
7637
7731
"""Return a json dictionary representing this model."""
7638
7732
_dict = {}
7733
+ if hasattr (self , 'as_path' ) and self .as_path is not None :
7734
+ _dict ['as_path' ] = self .as_path
7639
7735
if hasattr (self , 'next_hop' ) and self .next_hop is not None :
7640
7736
_dict ['next_hop' ] = self .next_hop
7641
7737
if hasattr (self , 'prefix' ) and self .prefix is not None :
@@ -7793,6 +7889,83 @@ def __ne__(self, other: 'RouteReportRoute') -> bool:
7793
7889
"""Return `true` when self and other are not equal, false otherwise."""
7794
7890
return not self == other
7795
7891
7892
+ class RouteReportVirtualConnectionRoute ():
7893
+ """
7894
+ A route originating from an attached virtual connection.
7895
+
7896
+ :attr bool active: (optional) Indicates whether the route is the preferred path
7897
+ of the prefix.
7898
+ :attr str local_preference: (optional) The local preference of the route. This
7899
+ attribute can manipulate the chosen path on routes.
7900
+ :attr str prefix: prefix.
7901
+ """
7902
+
7903
+ def __init__ (self ,
7904
+ prefix : str ,
7905
+ * ,
7906
+ active : bool = None ,
7907
+ local_preference : str = None ) -> None :
7908
+ """
7909
+ Initialize a RouteReportVirtualConnectionRoute object.
7910
+
7911
+ :param str prefix: prefix.
7912
+ :param bool active: (optional) Indicates whether the route is the preferred
7913
+ path of the prefix.
7914
+ :param str local_preference: (optional) The local preference of the route.
7915
+ This attribute can manipulate the chosen path on routes.
7916
+ """
7917
+ self .active = active
7918
+ self .local_preference = local_preference
7919
+ self .prefix = prefix
7920
+
7921
+ @classmethod
7922
+ def from_dict (cls , _dict : Dict ) -> 'RouteReportVirtualConnectionRoute' :
7923
+ """Initialize a RouteReportVirtualConnectionRoute object from a json dictionary."""
7924
+ args = {}
7925
+ if 'active' in _dict :
7926
+ args ['active' ] = _dict .get ('active' )
7927
+ if 'local_preference' in _dict :
7928
+ args ['local_preference' ] = _dict .get ('local_preference' )
7929
+ if 'prefix' in _dict :
7930
+ args ['prefix' ] = _dict .get ('prefix' )
7931
+ else :
7932
+ raise ValueError ('Required property \' prefix\' not present in RouteReportVirtualConnectionRoute JSON' )
7933
+ return cls (** args )
7934
+
7935
+ @classmethod
7936
+ def _from_dict (cls , _dict ):
7937
+ """Initialize a RouteReportVirtualConnectionRoute object from a json dictionary."""
7938
+ return cls .from_dict (_dict )
7939
+
7940
+ def to_dict (self ) -> Dict :
7941
+ """Return a json dictionary representing this model."""
7942
+ _dict = {}
7943
+ if hasattr (self , 'active' ) and self .active is not None :
7944
+ _dict ['active' ] = self .active
7945
+ if hasattr (self , 'local_preference' ) and self .local_preference is not None :
7946
+ _dict ['local_preference' ] = self .local_preference
7947
+ if hasattr (self , 'prefix' ) and self .prefix is not None :
7948
+ _dict ['prefix' ] = self .prefix
7949
+ return _dict
7950
+
7951
+ def _to_dict (self ):
7952
+ """Return a json dictionary representing this model."""
7953
+ return self .to_dict ()
7954
+
7955
+ def __str__ (self ) -> str :
7956
+ """Return a `str` version of this RouteReportVirtualConnectionRoute object."""
7957
+ return json .dumps (self .to_dict (), indent = 2 )
7958
+
7959
+ def __eq__ (self , other : 'RouteReportVirtualConnectionRoute' ) -> bool :
7960
+ """Return `true` when self and other are equal, false otherwise."""
7961
+ if not isinstance (other , self .__class__ ):
7962
+ return False
7963
+ return self .__dict__ == other .__dict__
7964
+
7965
+ def __ne__ (self , other : 'RouteReportVirtualConnectionRoute' ) -> bool :
7966
+ """Return `true` when self and other are not equal, false otherwise."""
7967
+ return not self == other
7968
+
7796
7969
class UpdateRouteFilterTemplate ():
7797
7970
"""
7798
7971
The route filter update template.
0 commit comments