Skip to content

Commit fa9bf00

Browse files
committed
Revert "feat: refresh SDK to include latest spec changes"
This reverts commit 26d8948.
1 parent 26d8948 commit fa9bf00

File tree

2 files changed

+59
-78
lines changed

2 files changed

+59
-78
lines changed

ibm_cloud_networking_services/direct_link_apis_v1.py

Lines changed: 48 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,15 @@ def create_gateway_action(self,
355355
356356
:param str id: Direct Link Connect gateway identifier.
357357
:param str action: Action request.
358-
:param bool global_: (optional) Required for create_gateway_approve
359-
requests to select the gateway's routing option. Gateways with global
360-
routing (`true`) can connect to networks outside of their associated
361-
region.
362-
:param bool metered: (optional) Required for create_gateway_approve
363-
requests to select the gateway's metered billing option. When `true`
364-
gateway usage is billed per gigabyte. When `false` there is no per
365-
gigabyte usage charge, instead a flat rate is charged for the gateway.
358+
:param bool global_: (optional) Set for create_gateway_approve requests to
359+
select the gateway's routing option. Gateways with global routing (`true`)
360+
can connect to networks outside of their associated region.
361+
:param bool metered: (optional) Set for create_gateway_approve requests to
362+
select the gateway's metered billing option. When `true` gateway usage is
363+
billed per gigabyte. When `false` there is no per gigabyte usage charge,
364+
instead a flat rate is charged for the gateway.
366365
:param ResourceGroupIdentity resource_group: (optional) Set for
367-
create_gateway_approve requests to select the gateway's resource group. If
368-
unspecified on create_gateway_approve, the account's [default resource
369-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is
370-
used.
366+
create_gateway_approve requests to select the gateway's resource group.
371367
:param List[object] updates: (optional) Specify attribute updates being
372368
approved or rejected, update_attributes_approve and
373369
update_attributes_reject actions must provide an updates field that matches
@@ -1099,31 +1095,31 @@ class CrossConnectRouter():
10991095
"""
11001096
Cross Connect Router details.
11011097
1102-
:attr str router_name: (optional) The name of the Router.
1098+
:attr str name: (optional) The name of the Router.
11031099
:attr int total_connections: (optional) Count of existing Direct Link Dedicated
11041100
gateways on this router for this account.
11051101
"""
11061102

11071103
def __init__(self,
11081104
*,
1109-
router_name: str = None,
1105+
name: str = None,
11101106
total_connections: int = None) -> None:
11111107
"""
11121108
Initialize a CrossConnectRouter object.
11131109
1114-
:param str router_name: (optional) The name of the Router.
1110+
:param str name: (optional) The name of the Router.
11151111
:param int total_connections: (optional) Count of existing Direct Link
11161112
Dedicated gateways on this router for this account.
11171113
"""
1118-
self.router_name = router_name
1114+
self.name = name
11191115
self.total_connections = total_connections
11201116

11211117
@classmethod
11221118
def from_dict(cls, _dict: Dict) -> 'CrossConnectRouter':
11231119
"""Initialize a CrossConnectRouter object from a json dictionary."""
11241120
args = {}
1125-
if 'router_name' in _dict:
1126-
args['router_name'] = _dict.get('router_name')
1121+
if 'name' in _dict:
1122+
args['name'] = _dict.get('name')
11271123
if 'total_connections' in _dict:
11281124
args['total_connections'] = _dict.get('total_connections')
11291125
return cls(**args)
@@ -1136,8 +1132,8 @@ def _from_dict(cls, _dict):
11361132
def to_dict(self) -> Dict:
11371133
"""Return a json dictionary representing this model."""
11381134
_dict = {}
1139-
if hasattr(self, 'router_name') and self.router_name is not None:
1140-
_dict['router_name'] = self.router_name
1135+
if hasattr(self, 'name') and self.name is not None:
1136+
_dict['name'] = self.name
11411137
if hasattr(self, 'total_connections') and self.total_connections is not None:
11421138
_dict['total_connections'] = self.total_connections
11431139
return _dict
@@ -1512,7 +1508,6 @@ class OperationalStatusEnum(str, Enum):
15121508
AWAITING_COMPLETION_NOTICE = 'awaiting_completion_notice'
15131509
AWAITING_LOA = 'awaiting_loa'
15141510
CREATE_PENDING = 'create_pending'
1515-
CREATE_REJECTED = 'create_rejected'
15161511
COMPLETION_NOTICE_APPROVED = 'completion_notice_approved'
15171512
COMPLETION_NOTICE_RECEIVED = 'completion_notice_received'
15181513
COMPLETION_NOTICE_REJECTED = 'completion_notice_rejected'
@@ -1736,7 +1731,8 @@ class GatewayTemplate():
17361731
:attr str name: The unique user-defined name for this gateway.
17371732
:attr ResourceGroupIdentity resource_group: (optional) Resource group for this
17381733
resource. If unspecified, the account's [default resource
1739-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
1734+
group](https://console.bluemix.net/apidocs/resource-manager#introduction) is
1735+
used.
17401736
:attr int speed_mbps: Gateway speed in megabits per second.
17411737
:attr str type: Gateway type.
17421738
"""
@@ -1774,8 +1770,8 @@ def __init__(self,
17741770
ommitted and a CIDR will be selected automatically.
17751771
:param ResourceGroupIdentity resource_group: (optional) Resource group for
17761772
this resource. If unspecified, the account's [default resource
1777-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is
1778-
used.
1773+
group](https://console.bluemix.net/apidocs/resource-manager#introduction)
1774+
is used.
17791775
"""
17801776
msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format(
17811777
", ".join(['GatewayTemplateGatewayTypeDedicatedTemplate', 'GatewayTemplateGatewayTypeConnectTemplate']))
@@ -2124,59 +2120,45 @@ class LocationOutput():
21242120
"""
21252121
location.
21262122
2127-
:attr str billing_location: (optional) Billing location. Only present for
2128-
locations where provisioning is enabled.
2123+
:attr str billing_location: Billing location.
21292124
:attr str building_colocation_owner: (optional) Building colocation owner. Only
2130-
present for offering_type=dedicated locations where provisioning is enabled.
2125+
present for offering_type=dedicated locations.
21312126
:attr str display_name: Location long name.
21322127
:attr str location_type: Location type.
21332128
:attr str market: Location market.
2134-
:attr str market_geography: (optional) Location geography. Only present for
2135-
locations where provisioning is enabled.
2136-
:attr bool mzr: (optional) Is location a multi-zone region (MZR). Only present
2137-
for locations where provisioning is enabled.
2129+
:attr str market_geography: Location geography.
2130+
:attr bool mzr: Is location a multi-zone region (MZR).
21382131
:attr str name: Location short name.
21392132
:attr str offering_type: Location offering type.
2140-
:attr bool provision_enabled: Indicates for the specific offering_type whether
2141-
this location supports gateway provisioning.
2142-
:attr str vpc_region: (optional) Location's VPC region. Only present for
2143-
locations where provisioning is enabled.
2133+
:attr str vpc_region: (optional) Location's VPC region.
21442134
"""
21452135

21462136
def __init__(self,
2137+
billing_location: str,
21472138
display_name: str,
21482139
location_type: str,
21492140
market: str,
2141+
market_geography: str,
2142+
mzr: bool,
21502143
name: str,
21512144
offering_type: str,
2152-
provision_enabled: bool,
21532145
*,
2154-
billing_location: str = None,
21552146
building_colocation_owner: str = None,
2156-
market_geography: str = None,
2157-
mzr: bool = None,
21582147
vpc_region: str = None) -> None:
21592148
"""
21602149
Initialize a LocationOutput object.
21612150
2151+
:param str billing_location: Billing location.
21622152
:param str display_name: Location long name.
21632153
:param str location_type: Location type.
21642154
:param str market: Location market.
2155+
:param str market_geography: Location geography.
2156+
:param bool mzr: Is location a multi-zone region (MZR).
21652157
:param str name: Location short name.
21662158
:param str offering_type: Location offering type.
2167-
:param bool provision_enabled: Indicates for the specific offering_type
2168-
whether this location supports gateway provisioning.
2169-
:param str billing_location: (optional) Billing location. Only present for
2170-
locations where provisioning is enabled.
21712159
:param str building_colocation_owner: (optional) Building colocation owner.
2172-
Only present for offering_type=dedicated locations where provisioning is
2173-
enabled.
2174-
:param str market_geography: (optional) Location geography. Only present
2175-
for locations where provisioning is enabled.
2176-
:param bool mzr: (optional) Is location a multi-zone region (MZR). Only
2177-
present for locations where provisioning is enabled.
2178-
:param str vpc_region: (optional) Location's VPC region. Only present for
2179-
locations where provisioning is enabled.
2160+
Only present for offering_type=dedicated locations.
2161+
:param str vpc_region: (optional) Location's VPC region.
21802162
"""
21812163
self.billing_location = billing_location
21822164
self.building_colocation_owner = building_colocation_owner
@@ -2187,7 +2169,6 @@ def __init__(self,
21872169
self.mzr = mzr
21882170
self.name = name
21892171
self.offering_type = offering_type
2190-
self.provision_enabled = provision_enabled
21912172
self.vpc_region = vpc_region
21922173

21932174
@classmethod
@@ -2196,6 +2177,8 @@ def from_dict(cls, _dict: Dict) -> 'LocationOutput':
21962177
args = {}
21972178
if 'billing_location' in _dict:
21982179
args['billing_location'] = _dict.get('billing_location')
2180+
else:
2181+
raise ValueError('Required property \'billing_location\' not present in LocationOutput JSON')
21992182
if 'building_colocation_owner' in _dict:
22002183
args['building_colocation_owner'] = _dict.get('building_colocation_owner')
22012184
if 'display_name' in _dict:
@@ -2212,8 +2195,12 @@ def from_dict(cls, _dict: Dict) -> 'LocationOutput':
22122195
raise ValueError('Required property \'market\' not present in LocationOutput JSON')
22132196
if 'market_geography' in _dict:
22142197
args['market_geography'] = _dict.get('market_geography')
2198+
else:
2199+
raise ValueError('Required property \'market_geography\' not present in LocationOutput JSON')
22152200
if 'mzr' in _dict:
22162201
args['mzr'] = _dict.get('mzr')
2202+
else:
2203+
raise ValueError('Required property \'mzr\' not present in LocationOutput JSON')
22172204
if 'name' in _dict:
22182205
args['name'] = _dict.get('name')
22192206
else:
@@ -2222,10 +2209,6 @@ def from_dict(cls, _dict: Dict) -> 'LocationOutput':
22222209
args['offering_type'] = _dict.get('offering_type')
22232210
else:
22242211
raise ValueError('Required property \'offering_type\' not present in LocationOutput JSON')
2225-
if 'provision_enabled' in _dict:
2226-
args['provision_enabled'] = _dict.get('provision_enabled')
2227-
else:
2228-
raise ValueError('Required property \'provision_enabled\' not present in LocationOutput JSON')
22292212
if 'vpc_region' in _dict:
22302213
args['vpc_region'] = _dict.get('vpc_region')
22312214
return cls(**args)
@@ -2256,8 +2239,6 @@ def to_dict(self) -> Dict:
22562239
_dict['name'] = self.name
22572240
if hasattr(self, 'offering_type') and self.offering_type is not None:
22582241
_dict['offering_type'] = self.offering_type
2259-
if hasattr(self, 'provision_enabled') and self.provision_enabled is not None:
2260-
_dict['provision_enabled'] = self.provision_enabled
22612242
if hasattr(self, 'vpc_region') and self.vpc_region is not None:
22622243
_dict['vpc_region'] = self.vpc_region
22632244
return _dict
@@ -2736,7 +2717,7 @@ def __ne__(self, other: 'PortsPaginatedCollectionNext') -> bool:
27362717
class ResourceGroupIdentity():
27372718
"""
27382719
Resource group for this resource. If unspecified, the account's [default resource
2739-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
2720+
group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used.
27402721
27412722
:attr str id: Resource group identifier.
27422723
"""
@@ -3068,7 +3049,8 @@ class GatewayTemplateGatewayTypeConnectTemplate(GatewayTemplate):
30683049
:attr str name: The unique user-defined name for this gateway.
30693050
:attr ResourceGroupIdentity resource_group: (optional) Resource group for this
30703051
resource. If unspecified, the account's [default resource
3071-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
3052+
group](https://console.bluemix.net/apidocs/resource-manager#introduction) is
3053+
used.
30723054
:attr int speed_mbps: Gateway speed in megabits per second.
30733055
:attr str type: Gateway type.
30743056
:attr GatewayPortIdentity port: Select Port Label for new type=connect gateway.
@@ -3110,8 +3092,8 @@ def __init__(self,
31103092
ommitted and a CIDR will be selected automatically.
31113093
:param ResourceGroupIdentity resource_group: (optional) Resource group for
31123094
this resource. If unspecified, the account's [default resource
3113-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is
3114-
used.
3095+
group](https://console.bluemix.net/apidocs/resource-manager#introduction)
3096+
is used.
31153097
"""
31163098
# pylint: disable=super-init-not-called
31173099
self.bgp_asn = bgp_asn
@@ -3248,7 +3230,8 @@ class GatewayTemplateGatewayTypeDedicatedTemplate(GatewayTemplate):
32483230
:attr str name: The unique user-defined name for this gateway.
32493231
:attr ResourceGroupIdentity resource_group: (optional) Resource group for this
32503232
resource. If unspecified, the account's [default resource
3251-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
3233+
group](https://console.bluemix.net/apidocs/resource-manager#introduction) is
3234+
used.
32523235
:attr int speed_mbps: Gateway speed in megabits per second.
32533236
:attr str type: Gateway type.
32543237
:attr str carrier_name: Carrier name.
@@ -3302,8 +3285,8 @@ def __init__(self,
33023285
ommitted and a CIDR will be selected automatically.
33033286
:param ResourceGroupIdentity resource_group: (optional) Resource group for
33043287
this resource. If unspecified, the account's [default resource
3305-
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is
3306-
used.
3288+
group](https://console.bluemix.net/apidocs/resource-manager#introduction)
3289+
is used.
33073290
:param str dedicated_hosting_id: (optional) The unique identifier of the
33083291
dedicated hosting instance for this gateway. Valid only for Dedicated
33093292
Hosting Offering.

0 commit comments

Comments
 (0)